PageSourceSearch

https://duit.pro/assets/js/30376861.d00bd3db.js

js duit.pro collected 2026-10-06 07:13:59 UTC 13,269 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkduit_webdoc=self.webpackChunkduit_webdoc||[]).push([[3145],{2567:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var n=r(4848),l=r(8453);r(1470),r(9365);const s={},a="Badge",i={id:"widgets/flutter/badge",title:"Badge",description:"| \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u0430| \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 | \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e | \u041c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 | \u0421\u0441\u044b\u043b\u043a\u0430 |",source:"@site/docs/widgets/flutter/badge.mdx",sourceDirName:"widgets/flutter",slug:"/widgets/flutter/badge",permalink:"/docs/widgets/flutter/badge",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docs",previous:{title:"BackdropFilter",permalink:"/docs/widgets/flutter/backdrop_filter"},next:{title:"Baseline",permalink:"/docs/widgets/flutter/baseline"}},d={},c=[{value:"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b",id:"\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b",level:2},{value:"\u0414\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b",id:"\u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b",level:2}];function o(e){const t={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"badge",children:"Badge"})}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u0430"}),(0,n.jsx)(t.th,{children:"\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432"}),(0,n.jsx)(t.th,{children:"\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e"}),(0,n.jsx)(t.th,{children:"\u041c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435"}),(0,n.jsx)(t.th,{children:"\u0421\u0441\u044b\u043b\u043a\u0430"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Badge"}),(0,n.jsx)(t.td,{children:"\u2714\ufe0f"}),(0,n.jsx)(t.td,{children:"\u2717"}),(0,n.jsx)(t.td,{children:"\u2717"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.a,{href:"https://api.flutter.dev/flutter/material/Badge-class.html",children:"link"})})]})})]}),"\n",(0,n.jsx)(t.p,{children:"\u0412\u0438\u0434\u0436\u0435\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u043a\u0430 (badge) \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0432\u0438\u0434\u0436\u0435\u0442\u0435. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430: \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0438 \u0441\u0447\u0451\u0442\u0447\u0438\u043a."}),"\n",(0,n.jsx)(t.h2,{id:"\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b",children:"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"\u0410\u0442\u0440\u0438\u0431\u0443\u0442"}),(0,n.jsx)(t.th,{children:"\u0422\u0438\u043f"}),(0,n.jsx)(t.th,{children:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"variant"}),(0,n.jsx)(t.td,{children:"string/int"}),(0,n.jsx)(t.td,{children:'\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u0438\u0434\u0436\u0435\u0442\u0430: "common" (0) \u0438\u043b\u0438 "count" (1)'})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"backgroundColor"}),(0,n.jsx)(t.td,{children:"Color"}),(0,n.jsx)(t.td,{children:"\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u0437\u043d\u0430\u0447\u043a\u0430"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"textColor"}),(0,n.jsx)(t.td,{children:"Color"}),(0,n.jsx)(t.td,{children:"\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0437\u043d\u0430\u0447\u043a\u0430"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"smallSize"}),(0,n.jsx)(t.td,{children:"double"}),(0,n.jsx)(t.td,{children:"\u0420\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u043a\u0430"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"largeSize"}),(0,n.jsx)(t.td,{children:"double"}),(0,n.jsx)(t.td,{children:"\u0420\u0430\u0437\u043c\u0435\u0440 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u043a\u0430"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"textStyle"}),(0,n.jsx)(t.td,{children:"TextStyle"}),(0,n.jsx)(t.td,{children:"\u0421\u0442\u0438\u043b\u044c \u0442\u0435\u043a\u0441\u0442\u0430"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"padding"}),(0,n.jsx)(t.td,{children:"EdgeInsets"}),(0,n.jsx)(t.td,{children:"\u041e\u0442\u0441\u0442\u0443\u043f\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u043d\u0430\u0447\u043a\u0430"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"alignment"}),(0,n.jsx)(t.td,{children:"Alignment"}),(0,n.jsx)(t.td,{children:"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u043a\u0430"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"offset"}),(0,n.jsx)(t.td,{children:"Offset"}),(0,n.jsx)(t.td,{children:"\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u043a\u0430"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"isLabelVisible"}),(0,n.jsx)(t.td,{children:"bool"}),(0,n.jsx)(t.td,{children:"\u0412\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0435\u0442\u043a\u0438 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: true)"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"count"}),(0,n.jsx)(t.td,{children:"int"}),(0,n.jsx)(t.td,{children:'\u0427\u0438\u0441\u043b\u043e \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f variant: "count")'})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"\u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b",children:"\u0414\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"\u041f\u0435\u0440\u0432\u044b\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 (children[0]) \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f badge"}),"\n",(0,n.jsx)(t.li,{children:'\u0412\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 (children[1]) \u2014 \u043c\u0435\u0442\u043a\u0430 (label), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f variant: "common"'}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},9365:(e,t,r)=>{r.d(t,{A:()=>a});r(6540);var n=r(4164);const l={tabItem:"tabItem_Ymn6"};var s=r(4848);function a(e){let{children:t,hidden:r,className:a}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(l.tabItem,a),hidden:r,children:t})}},1470:(e,t,r)=>{r.d(t,{A:()=>y});
1var n=r(6540),l=r(4164),s=r(3104),a=r(6347),i=r(205),d=r(7485),c=r(1682),o=r(679);function u(e){return n.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??function(e){return u(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:l}}=e;return{value:t,label:r,attributes:n,default:l}}))}(r);return function(e){const t=(0,c.XI)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[t,r])}function x(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:r}=e;const l=(0,a.W6)(),s=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,d.aZ)(s),(0,n.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(l.location.search);t.set(s,e),l.replace({...l.location,search:t.toString()})}),[s,l])]}function j(e){const{defaultValue:t,queryString:r=!1,groupId:l}=e,s=h(e),[a,d]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(t){if(!x({value:t,tabValues:r}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:s}))),[c,u]=b({queryString:r,groupId:l}),[j,f]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[l,s]=(0,o.Dv)(r);return[l,(0,n.useCallback)((e=>{r&&s.set(e)}),[r,s])]}({groupId:l}),p=(()=>{const e=c??j;return x({value:e,tabValues:s})?e:null})();(0,i.A)((()=>{p&&d(p)}),[p]);return{selectedValue:a,selectValue:(0,n.useCallback)((e=>{if(!x({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);d(e),u(e),f(e)}),[u,f,s]),tabValues:s}}var f=r(2303);const p={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=r(4848);function g(e){let{className:t,block:r,selectedValue:n,selectValue:a,tabValues:i}=e;const d=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),o=e=>{const t=e.currentTarget,r=d.indexOf(t),l=i[r].value;l!==n&&(c(t),a(l))},u=e=>{let t=null;switch(e.key){case"Enter":o(e);break;case"ArrowRight":{const r=d.indexOf(e.currentTarget)+1;t=d[r]??d[0];break}case"ArrowLeft":{const r=d.indexOf(e.currentTarget)-1;t=d[r]??d[d.length-1];break}}t?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.A)("tabs",{"tabs--block":r},t),children:i.map((e=>{let{value:t,label:r,attributes:s}=e;return(0,m.jsx)("li",{role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:e=>d.push(e),onKeyDown:u,onClick:o,...s,className:(0,l.A)("tabs__item",p.tabItem,s?.className,{"tabs__item--active":n===t}),children:r??t},t)}))})}function v(e){let{lazy:t,children:r,selectedValue:s}=e;const a=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=a.find((e=>e.props.value===s));return e?(0,n.cloneElement)(e,{className:(0,l.A)("margin-top--md",e.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:a.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==s})))})}function w(e){const t=j(e);return(0,m.jsxs)("div",{className:(0,l.A)("tabs-container",p.tabList),
1children:[(0,m.jsx)(g,{...t,...e}),(0,m.jsx)(v,{...t,...e})]})}function y(e){const t=(0,f.A)();return(0,m.jsx)(w,{...e,children:u(e.children)},String(t))}},8453:(e,t,r)=>{r.d(t,{R:()=>a,x:()=>i});var n=r(6540);const l={},s=n.createContext(l);function a(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:a(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.