(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,38149,e=>{"use strict";var t=e.i(43476);function r({title:e,description:r,controls:a,output:s}){return(0,t.jsxs)("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold tracking-tight text-foreground mb-2",children:e}),(0,t.jsx)("p",{className:"text-muted-foreground",children:r})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 items-start",children:[(0,t.jsx)("div",{className:"space-y-6",children:(0,t.jsx)("div",{className:"bg-card rounded-2xl border border-border p-6 shadow-sm",children:a})}),(0,t.jsx)("div",{className:"lg:sticky lg:top-24",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider px-1",children:"Generated Output"}),s]})})]})]})}e.s(["ToolLayout",()=>r])},74886,e=>{"use strict";let t=(0,e.i(75254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],74886)},55436,e=>{"use strict";let t=(0,e.i(75254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],55436)},48256,e=>{"use strict";let t=(0,e.i(75254).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],48256)},14764,e=>{"use strict";let t=(0,e.i(75254).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",()=>t],14764)},30600,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(38149),s=e.i(55436),i=e.i(74886),o=e.i(48256),l=e.i(86311),d=e.i(14764),c=e.i(86557),n=e.i(38399);let x=(0,e.i(75254).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]),p=[{title:"Basic GET Request (Dio)",category:"networking",icon:o.Globe,code:`final dio = Dio();
final response = await dio.get('https://api.example.com/data');
if (response.statusCode == 200) {
  print(response.data);
}`},{title:"Custom Alert Dialog",category:"dialogs",icon:l.MessageSquare,code:`showDialog(
  context: context,
  builder: (context) => AlertDialog(
    title: Text('Confirm Action'),
    content: Text('Are you sure you want to proceed?'),
    actions: [
      TextButton(onPressed: () => Navigator.pop(context), child: Text('CANCEL')),
      ElevatedButton(onPressed: () {}, child: Text('CONFIRM')),
    ],
  ),
);`},{title:"Named Route Navigation",category:"navigation",icon:d.Send,code:`Navigator.pushNamed(
  context,
  '/details',
  arguments: {'id': 123},
);`},{title:"Form Validation",category:"forms",icon:c.Layout,code:`TextFormField(
  validator: (value) {
    if (value == null || value.isEmpty) {
      return 'Please enter some text';
    }
    return null;
  },
)`},{title:"Hero Transition",category:"animations",icon:n.Braces,code:`Hero(
  tag: 'product-1',
  child: Image.network('https://...'),
)`}];function u(){let[e,o]=(0,r.useState)(""),[l,d]=(0,r.useState)("all"),[c,n]=(0,r.useState)(p[0]),u=p.filter(t=>("all"===l||t.category===l)&&(t.title.toLowerCase().includes(e.toLowerCase())||t.code.toLowerCase().includes(e.toLowerCase())));return(0,t.jsx)(a.ToolLayout,{title:"Flutter Code Snippets",description:"Battle-tested code snippets for everyday Flutter tasks. Save time by using these ready-to-use boilerplate patterns.",controls:(0,t.jsxs)("div",{className:"space-y-6 h-full flex flex-col",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(s.Search,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,t.jsx)("input",{type:"text",value:e,onChange:e=>o(e.target.value),placeholder:"Search snippets...",className:"w-full pl-11 pr-4 py-3 bg-secondary/30 border border-border rounded-2xl outline-none focus:ring-2 focus:ring-primary transition-all font-medium"})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:["all","networking","dialogs","navigation","forms","animations"].map(e=>(0,t.jsx)("button",{onClick:()=>d(e),className:`px-3 py-1.5 rounded-xl text-[10px] font-bold uppercase tracking-wider transition-all ${l===e?"bg-primary text-white":"bg-card border border-border text-muted-foreground hover:border-primary/50"}`,children:e},e))}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 pr-2 custom-scrollbar",children:u.map(e=>(0,t.jsx)("button",{onClick:()=>n(e),className:`w-full p-4 rounded-2xl border text-left transition-all group ${c.title===e.title?"bg-primary/5 border-primary shadow-sm":"bg-card border-border hover:border-primary/50"}`,children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:`p-2 rounded-lg ${c.title===e.title?"bg-primary text-white":"bg-secondary text-muted-foreground group-hover:bg-primary/20 group-hover:text-primary"}`,children:(0,t.jsx)(e.icon,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"font-bold text-sm tracking-tight",children:e.title}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[(0,t.jsx)(x,{className:"w-3 h-3 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground font-bold uppercase",children:e.category})]})]})]})},e.title))})]}),output:(0,t.jsxs)("div",{className:"space-y-6 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[(0,t.jsxs)("div",{className:"p-8 bg-card border border-border rounded-[2.5rem] shadow-xl relative overflow-hidden",children:[(0,t.jsx)("div",{className:"relative z-10",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,t.jsx)("div",{className:"p-2.5 bg-primary/10 rounded-xl",children:(0,t.jsx)(c.icon,{className:"w-6 h-6 text-primary"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-2xl font-black",children:c.title}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Standard implementation for ",(0,t.jsx)("b",{children:c.category}),"."]})]})]})}),(0,t.jsx)("div",{className:"absolute top-0 right-0 p-8 opacity-5",children:(0,t.jsx)(c.icon,{className:"w-32 h-32"})})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground",children:"Flutter Code"}),(0,t.jsxs)("button",{onClick:()=>navigator.clipboard.writeText(c.code),className:"flex items-center gap-2 text-xs font-bold text-primary hover:underline transition-all",children:[(0,t.jsx)(i.Copy,{className:"w-3.5 h-3.5"}),"COPY SNIPPET"]})]}),(0,t.jsxs)("div",{className:"relative group",children:[(0,t.jsx)("pre",{className:"p-8 bg-[#0d0d0d] border border-border rounded-[2rem] text-sm font-mono text-purple-300 overflow-x-auto leading-relaxed custom-scrollbar shadow-inner",children:c.code}),(0,t.jsx)("div",{className:"absolute top-4 right-4 animate-pulse opacity-0 group-hover:opacity-100 transition-opacity",children:(0,t.jsx)("div",{className:"px-2 py-1 bg-primary/20 border border-primary/30 rounded text-[10px] font-bold text-primary",children:"DART"})})]})]}),(0,t.jsx)("div",{className:"p-6 bg-secondary/20 rounded-3xl border border-dashed border-border text-center",children:(0,t.jsx)("p",{className:"text-xs text-muted-foreground italic",children:"“These snippets are regularly updated and checked for compatibility with Flutter 3.x”"})})]})})}e.s(["default",()=>u],30600)}]);