flutter-pro-max-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +106 -0
- package/assets/.agent/workflows/flutter-pro-max.md +167 -0
- package/assets/.agent/workflows/scripts/core.py +341 -0
- package/assets/.agent/workflows/scripts/search.py +106 -0
- package/assets/.claude/skills/flutter-pro-max/SKILL.md +182 -0
- package/assets/.claude/skills/flutter-pro-max/scripts/core.py +341 -0
- package/assets/.claude/skills/flutter-pro-max/scripts/search.py +106 -0
- package/assets/.codebuddy/commands/flutter-pro-max.md +58 -0
- package/assets/.codebuddy/commands/scripts/core.py +341 -0
- package/assets/.codebuddy/commands/scripts/search.py +106 -0
- package/assets/.codex/skills/flutter-pro-max/SKILL.md +100 -0
- package/assets/.codex/skills/flutter-pro-max/scripts/core.py +341 -0
- package/assets/.codex/skills/flutter-pro-max/scripts/search.py +106 -0
- package/assets/.cursor/commands/flutter-pro-max.md +154 -0
- package/assets/.cursor/commands/scripts/core.py +341 -0
- package/assets/.cursor/commands/scripts/search.py +106 -0
- package/assets/.gemini/skills/flutter-pro-max/SKILL.md +100 -0
- package/assets/.gemini/skills/flutter-pro-max/scripts/core.py +341 -0
- package/assets/.gemini/skills/flutter-pro-max/scripts/search.py +106 -0
- package/assets/.github/prompts/flutter-pro-max.prompt.md +61 -0
- package/assets/.github/prompts/scripts/core.py +341 -0
- package/assets/.github/prompts/scripts/search.py +106 -0
- package/assets/.kiro/steering/flutter-pro-max.md +60 -0
- package/assets/.kiro/steering/scripts/core.py +341 -0
- package/assets/.kiro/steering/scripts/search.py +106 -0
- package/assets/.qoder/rules/flutter-pro-max.md +58 -0
- package/assets/.qoder/rules/scripts/core.py +341 -0
- package/assets/.qoder/rules/scripts/search.py +106 -0
- package/assets/.roo/commands/flutter-pro-max.md +58 -0
- package/assets/.roo/commands/scripts/core.py +341 -0
- package/assets/.roo/commands/scripts/search.py +106 -0
- package/assets/.shared/data/architect.csv +18 -0
- package/assets/.shared/data/charts.csv +26 -0
- package/assets/.shared/data/colors.csv +97 -0
- package/assets/.shared/data/icons.csv +101 -0
- package/assets/.shared/data/landing.csv +31 -0
- package/assets/.shared/data/name_convention.csv +16 -0
- package/assets/.shared/data/package.csv +101 -0
- package/assets/.shared/data/patterns.csv +109 -0
- package/assets/.shared/data/products.csv +97 -0
- package/assets/.shared/data/prompts.csv +24 -0
- package/assets/.shared/data/styles.csv +59 -0
- package/assets/.shared/data/typography.csv +58 -0
- package/assets/.shared/data/ux-guidelines.csv +100 -0
- package/assets/.shared/data/widget.csv +65 -0
- package/assets/.shared/flutter-pro-max/SKILL.md +165 -0
- package/assets/.shared/flutter-pro-max/scripts/core.py +341 -0
- package/assets/.shared/flutter-pro-max/scripts/search.py +106 -0
- package/assets/.trae/skills/flutter-pro-max/SKILL.md +61 -0
- package/assets/.trae/skills/flutter-pro-max/scripts/core.py +341 -0
- package/assets/.trae/skills/flutter-pro-max/scripts/search.py +106 -0
- package/assets/.windsurf/workflows/flutter-pro-max.md +154 -0
- package/assets/.windsurf/workflows/scripts/core.py +341 -0
- package/assets/.windsurf/workflows/scripts/search.py +106 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.js +67 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +31 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/index.js +15 -0
- package/dist/utils/detect.d.ts +8 -0
- package/dist/utils/detect.js +80 -0
- package/dist/utils/extract.d.ts +4 -0
- package/dist/utils/extract.js +83 -0
- package/dist/utils/logger.d.ts +8 -0
- package/dist/utils/logger.js +9 -0
- package/package.json +52 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
No,Category,Issue,Platform,Description,Do,Don't,Code Example Good,Code Example Bad,Severity
|
|
2
|
+
1,Navigation,Smooth Scroll,Web,Anchor links should scroll smoothly to target section,Use scroll-behavior: smooth on html element,Jump directly without transition,html { scroll-behavior: smooth; },<a href='#section'> without CSS,High
|
|
3
|
+
2,Navigation,Sticky Navigation,Web,Fixed nav should not obscure content,Add padding-top to body equal to nav height,Let nav overlap first section content,pt-20 (if nav is h-20),No padding compensation,Medium
|
|
4
|
+
3,Navigation,Active State,All,Current page/section should be visually indicated,Highlight active nav item with color/underline,No visual feedback on current location,text-primary border-b-2,All links same style,Medium
|
|
5
|
+
4,Navigation,Back Button,Mobile,Users expect back to work predictably,Preserve navigation history properly,Break browser/app back button behavior,history.pushState(),location.replace(),High
|
|
6
|
+
5,Navigation,Deep Linking,All,URLs should reflect current state for sharing,Update URL on state/view changes,Static URLs for dynamic content,Use query params or hash,Single URL for all states,Medium
|
|
7
|
+
6,Navigation,Breadcrumbs,Web,Show user location in site hierarchy,Use for sites with 3+ levels of depth,Use for flat single-level sites,Home > Category > Product,Only on deep nested pages,Low
|
|
8
|
+
7,Animation,Excessive Motion,All,Too many animations cause distraction and motion sickness,Animate 1-2 key elements per view maximum,Animate everything that moves,Single hero animation,animate-bounce on 5+ elements,High
|
|
9
|
+
8,Animation,Duration Timing,All,Animations should feel responsive not sluggish,Use 150-300ms for micro-interactions,Use animations longer than 500ms for UI,transition-all duration-200,duration-1000,Medium
|
|
10
|
+
9,Animation,Reduced Motion,All,Respect user's motion preferences,Check prefers-reduced-motion media query,Ignore accessibility motion settings,@media (prefers-reduced-motion: reduce),No motion query check,High
|
|
11
|
+
10,Animation,Loading States,All,Show feedback during async operations,Use skeleton screens or spinners,Leave UI frozen with no feedback,animate-pulse skeleton,Blank screen while loading,High
|
|
12
|
+
11,Animation,Hover vs Tap,All,Hover effects don't work on touch devices,Use click/tap for primary interactions,Rely only on hover for important actions,onClick handler,onMouseEnter only,High
|
|
13
|
+
12,Animation,Continuous Animation,All,Infinite animations are distracting,Use for loading indicators only,Use for decorative elements,animate-spin on loader,animate-bounce on icons,Medium
|
|
14
|
+
13,Animation,Transform Performance,Web,Some CSS properties trigger expensive repaints,Use transform and opacity for animations,Animate width/height/top/left properties,transform: translateY(),top: 10px animation,Medium
|
|
15
|
+
14,Animation,Easing Functions,All,Linear motion feels robotic,Use ease-out for entering ease-in for exiting,Use linear for UI transitions,ease-out,linear,Low
|
|
16
|
+
15,Layout,Z-Index Management,Web,Stacking context conflicts cause hidden elements,Define z-index scale system (10 20 30 50),Use arbitrary large z-index values,z-10 z-20 z-50,z-[9999],High
|
|
17
|
+
16,Layout,Overflow Hidden,Web,Hidden overflow can clip important content,Test all content fits within containers,Blindly apply overflow-hidden,overflow-auto with scroll,overflow-hidden truncating content,Medium
|
|
18
|
+
17,Layout,Fixed Positioning,Web,Fixed elements can overlap or be inaccessible,Account for safe areas and other fixed elements,Stack multiple fixed elements carelessly,Fixed nav + fixed bottom with gap,Multiple overlapping fixed elements,Medium
|
|
19
|
+
18,Layout,Stacking Context,Web,New stacking contexts reset z-index,Understand what creates new stacking context,Expect z-index to work across contexts,Parent with z-index isolates children,z-index: 9999 not working,Medium
|
|
20
|
+
19,Layout,Content Jumping,Web,Layout shift when content loads is jarring,Reserve space for async content,Let images/content push layout around,aspect-ratio or fixed height,No dimensions on images,High
|
|
21
|
+
20,Layout,Viewport Units,Web,100vh can be problematic on mobile browsers,Use dvh or account for mobile browser chrome,Use 100vh for full-screen mobile layouts,min-h-dvh or min-h-screen,h-screen on mobile,Medium
|
|
22
|
+
21,Layout,Container Width,Web,Content too wide is hard to read,Limit max-width for text content (65-75ch),Let text span full viewport width,max-w-prose or max-w-3xl,Full width paragraphs,Medium
|
|
23
|
+
22,Touch,Touch Target Size,Mobile,Small buttons are hard to tap accurately,Minimum 44x44px touch targets,Tiny clickable areas,min-h-[44px] min-w-[44px],w-6 h-6 buttons,High
|
|
24
|
+
23,Touch,Touch Spacing,Mobile,Adjacent touch targets need adequate spacing,Minimum 8px gap between touch targets,Tightly packed clickable elements,gap-2 between buttons,gap-0 or gap-1,Medium
|
|
25
|
+
24,Touch,Gesture Conflicts,Mobile,Custom gestures can conflict with system,Avoid horizontal swipe on main content,Override system gestures,Vertical scroll primary,Horizontal swipe carousel only,Medium
|
|
26
|
+
25,Touch,Tap Delay,Mobile,300ms tap delay feels laggy,Use touch-action CSS or fastclick,Default mobile tap handling,touch-action: manipulation,No touch optimization,Medium
|
|
27
|
+
26,Touch,Pull to Refresh,Mobile,Accidental refresh is frustrating,Disable where not needed,Enable by default everywhere,overscroll-behavior: contain,Default overscroll,Low
|
|
28
|
+
27,Touch,Haptic Feedback,Mobile,Tactile feedback improves interaction feel,Use for confirmations and important actions,Overuse vibration feedback,navigator.vibrate(10),Vibrate on every tap,Low
|
|
29
|
+
28,Interaction,Focus States,All,Keyboard users need visible focus indicators,Use visible focus rings on interactive elements,Remove focus outline without replacement,focus:ring-2 focus:ring-blue-500,outline-none without alternative,High
|
|
30
|
+
29,Interaction,Hover States,Web,Visual feedback on interactive elements,Change cursor and add subtle visual change,No hover feedback on clickable elements,hover:bg-gray-100 cursor-pointer,No hover style,Medium
|
|
31
|
+
30,Interaction,Active States,All,Show immediate feedback on press/click,Add pressed/active state visual change,No feedback during interaction,active:scale-95,No active state,Medium
|
|
32
|
+
31,Interaction,Disabled States,All,Clearly indicate non-interactive elements,Reduce opacity and change cursor,Confuse disabled with normal state,opacity-50 cursor-not-allowed,Same style as enabled,Medium
|
|
33
|
+
32,Interaction,Loading Buttons,All,Prevent double submission during async actions,Disable button and show loading state,Allow multiple clicks during processing,disabled={loading} spinner,Button clickable while loading,High
|
|
34
|
+
33,Interaction,Error Feedback,All,Users need to know when something fails,Show clear error messages near problem,Silent failures with no feedback,Red border + error message,No indication of error,High
|
|
35
|
+
34,Interaction,Success Feedback,All,Confirm successful actions to users,Show success message or visual change,No confirmation of completed action,Toast notification or checkmark,Action completes silently,Medium
|
|
36
|
+
35,Interaction,Confirmation Dialogs,All,Prevent accidental destructive actions,Confirm before delete/irreversible actions,Delete without confirmation,Are you sure modal,Direct delete on click,High
|
|
37
|
+
36,Accessibility,Color Contrast,All,Text must be readable against background,Minimum 4.5:1 ratio for normal text,Low contrast text,#333 on white (7:1),#999 on white (2.8:1),High
|
|
38
|
+
37,Accessibility,Color Only,All,Don't convey information by color alone,Use icons/text in addition to color,Red/green only for error/success,Red text + error icon,Red border only for error,High
|
|
39
|
+
38,Accessibility,Alt Text,All,Images need text alternatives,Descriptive alt text for meaningful images,Empty or missing alt attributes,alt='Dog playing in park',alt='' for content images,High
|
|
40
|
+
39,Accessibility,Heading Hierarchy,Web,Screen readers use headings for navigation,Use sequential heading levels h1-h6,Skip heading levels or misuse for styling,h1 then h2 then h3,h1 then h4,Medium
|
|
41
|
+
40,Accessibility,ARIA Labels,All,Interactive elements need accessible names,Add aria-label for icon-only buttons,Icon buttons without labels,aria-label='Close menu',<button><Icon/></button>,High
|
|
42
|
+
41,Accessibility,Keyboard Navigation,Web,All functionality accessible via keyboard,Tab order matches visual order,Keyboard traps or illogical tab order,tabIndex for custom order,Unreachable elements,High
|
|
43
|
+
42,Accessibility,Screen Reader,All,Content should make sense when read aloud,Use semantic HTML and ARIA properly,Div soup with no semantics,<nav> <main> <article>,<div> for everything,Medium
|
|
44
|
+
43,Accessibility,Form Labels,All,Inputs must have associated labels,Use label with for attribute or wrap input,Placeholder-only inputs,<label for='email'>,placeholder='Email' only,High
|
|
45
|
+
44,Accessibility,Error Messages,All,Error messages must be announced,Use aria-live or role=alert for errors,Visual-only error indication,role='alert',Red border only,High
|
|
46
|
+
45,Accessibility,Skip Links,Web,Allow keyboard users to skip navigation,Provide skip to main content link,No skip link on nav-heavy pages,Skip to main content link,100 tabs to reach content,Medium
|
|
47
|
+
46,Performance,Image Optimization,All,Large images slow page load,Use appropriate size and format (WebP),Unoptimized full-size images,srcset with multiple sizes,4000px image for 400px display,High
|
|
48
|
+
47,Performance,Lazy Loading,All,Load content as needed,Lazy load below-fold images and content,Load everything upfront,loading='lazy',All images eager load,Medium
|
|
49
|
+
48,Performance,Code Splitting,Web,Large bundles slow initial load,Split code by route/feature,Single large bundle,dynamic import(),All code in main bundle,Medium
|
|
50
|
+
49,Performance,Caching,Web,Repeat visits should be fast,Set appropriate cache headers,No caching strategy,Cache-Control headers,Every request hits server,Medium
|
|
51
|
+
50,Performance,Font Loading,Web,Web fonts can block rendering,Use font-display swap or optional,Invisible text during font load,font-display: swap,FOIT (Flash of Invisible Text),Medium
|
|
52
|
+
51,Performance,Third Party Scripts,Web,External scripts can block rendering,Load non-critical scripts async/defer,Synchronous third-party scripts,async or defer attribute,<script src='...'> in head,Medium
|
|
53
|
+
52,Performance,Bundle Size,Web,Large JavaScript slows interaction,Monitor and minimize bundle size,Ignore bundle size growth,Bundle analyzer,No size monitoring,Medium
|
|
54
|
+
53,Performance,Render Blocking,Web,CSS/JS can block first paint,Inline critical CSS defer non-critical,Large blocking CSS files,Critical CSS inline,All CSS in head,Medium
|
|
55
|
+
54,Forms,Input Labels,All,Every input needs a visible label,Always show label above or beside input,Placeholder as only label,<label>Email</label><input>,placeholder='Email' only,High
|
|
56
|
+
55,Forms,Error Placement,All,Errors should appear near the problem,Show error below related input,Single error message at top of form,Error under each field,All errors at form top,Medium
|
|
57
|
+
56,Forms,Inline Validation,All,Validate as user types or on blur,Validate on blur for most fields,Validate only on submit,onBlur validation,Submit-only validation,Medium
|
|
58
|
+
57,Forms,Input Types,All,Use appropriate input types,Use email tel number url etc,Text input for everything,type='email',type='text' for email,Medium
|
|
59
|
+
58,Forms,Autofill Support,Web,Help browsers autofill correctly,Use autocomplete attribute properly,Block or ignore autofill,autocomplete='email',autocomplete='off' everywhere,Medium
|
|
60
|
+
59,Forms,Required Indicators,All,Mark required fields clearly,Use asterisk or (required) text,No indication of required fields,* required indicator,Guess which are required,Medium
|
|
61
|
+
60,Forms,Password Visibility,All,Let users see password while typing,Toggle to show/hide password,No visibility toggle,Show/hide password button,Password always hidden,Medium
|
|
62
|
+
61,Forms,Submit Feedback,All,Confirm form submission status,Show loading then success/error state,No feedback after submit,Loading -> Success message,Button click with no response,High
|
|
63
|
+
62,Forms,Input Affordance,All,Inputs should look interactive,Use distinct input styling,Inputs that look like plain text,Border/background on inputs,Borderless inputs,Medium
|
|
64
|
+
63,Forms,Mobile Keyboards,Mobile,Show appropriate keyboard for input type,Use inputmode attribute,Default keyboard for all inputs,inputmode='numeric',Text keyboard for numbers,Medium
|
|
65
|
+
64,Responsive,Mobile First,Web,Design for mobile then enhance for larger,Start with mobile styles then add breakpoints,Desktop-first causing mobile issues,Default mobile + md: lg: xl:,Desktop default + max-width queries,Medium
|
|
66
|
+
65,Responsive,Breakpoint Testing,Web,Test at all common screen sizes,Test at 320 375 414 768 1024 1440,Only test on your device,Multiple device testing,Single device development,Medium
|
|
67
|
+
66,Responsive,Touch Friendly,Web,Mobile layouts need touch-sized targets,Increase touch targets on mobile,Same tiny buttons on mobile,Larger buttons on mobile,Desktop-sized targets on mobile,High
|
|
68
|
+
67,Responsive,Readable Font Size,All,Text must be readable on all devices,Minimum 16px body text on mobile,Tiny text on mobile,text-base or larger,text-xs for body text,High
|
|
69
|
+
68,Responsive,Viewport Meta,Web,Set viewport for mobile devices,Use width=device-width initial-scale=1,Missing or incorrect viewport,<meta name='viewport'...>,No viewport meta tag,High
|
|
70
|
+
69,Responsive,Horizontal Scroll,Web,Avoid horizontal scrolling,Ensure content fits viewport width,Content wider than viewport,max-w-full overflow-x-hidden,Horizontal scrollbar on mobile,High
|
|
71
|
+
70,Responsive,Image Scaling,Web,Images should scale with container,Use max-width: 100% on images,Fixed width images overflow,max-w-full h-auto,width='800' fixed,Medium
|
|
72
|
+
71,Responsive,Table Handling,Web,Tables can overflow on mobile,Use horizontal scroll or card layout,Wide tables breaking layout,overflow-x-auto wrapper,Table overflows viewport,Medium
|
|
73
|
+
72,Typography,Line Height,All,Adequate line height improves readability,Use 1.5-1.75 for body text,Cramped or excessive line height,leading-relaxed (1.625),leading-none (1),Medium
|
|
74
|
+
73,Typography,Line Length,Web,Long lines are hard to read,Limit to 65-75 characters per line,Full-width text on large screens,max-w-prose,Full viewport width text,Medium
|
|
75
|
+
74,Typography,Font Size Scale,All,Consistent type hierarchy aids scanning,Use consistent modular scale,Random font sizes,Type scale (12 14 16 18 24 32),Arbitrary sizes,Medium
|
|
76
|
+
75,Typography,Font Loading,Web,Fonts should load without layout shift,Reserve space with fallback font,Layout shift when fonts load,font-display: swap + similar fallback,No fallback font,Medium
|
|
77
|
+
76,Typography,Contrast Readability,All,Body text needs good contrast,Use darker text on light backgrounds,Gray text on gray background,text-gray-900 on white,text-gray-400 on gray-100,High
|
|
78
|
+
77,Typography,Heading Clarity,All,Headings should stand out from body,Clear size/weight difference,Headings similar to body text,Bold + larger size,Same size as body,Medium
|
|
79
|
+
78,Feedback,Loading Indicators,All,Show system status during waits,Show spinner/skeleton for operations > 300ms,No feedback during loading,Skeleton or spinner,Frozen UI,High
|
|
80
|
+
79,Feedback,Empty States,All,Guide users when no content exists,Show helpful message and action,Blank empty screens,No items yet. Create one!,Empty white space,Medium
|
|
81
|
+
80,Feedback,Error Recovery,All,Help users recover from errors,Provide clear next steps,Error without recovery path,Try again button + help link,Error message only,Medium
|
|
82
|
+
81,Feedback,Progress Indicators,All,Show progress for multi-step processes,Step indicators or progress bar,No indication of progress,Step 2 of 4 indicator,No step information,Medium
|
|
83
|
+
82,Feedback,Toast Notifications,All,Transient messages for non-critical info,Auto-dismiss after 3-5 seconds,Toasts that never disappear,Auto-dismiss toast,Persistent toast,Medium
|
|
84
|
+
83,Feedback,Confirmation Messages,All,Confirm successful actions,Brief success message,Silent success,Saved successfully toast,No confirmation,Medium
|
|
85
|
+
84,Content,Truncation,All,Handle long content gracefully,Truncate with ellipsis and expand option,Overflow or broken layout,line-clamp-2 with expand,Overflow or cut off,Medium
|
|
86
|
+
85,Content,Date Formatting,All,Use locale-appropriate date formats,Use relative or locale-aware dates,Ambiguous date formats,2 hours ago or locale format,01/02/03,Low
|
|
87
|
+
86,Content,Number Formatting,All,Format large numbers for readability,Use thousand separators or abbreviations,Long unformatted numbers,"1.2K or 1,234",1234567,Low
|
|
88
|
+
87,Content,Placeholder Content,All,Show realistic placeholders during dev,Use realistic sample data,Lorem ipsum everywhere,Real sample content,Lorem ipsum,Low
|
|
89
|
+
88,Onboarding,User Freedom,All,Users should be able to skip tutorials,Provide Skip and Back buttons,Force linear unskippable tour,Skip Tutorial button,Locked overlay until finished,Medium
|
|
90
|
+
89,Search,Autocomplete,Web,Help users find results faster,Show predictions as user types,Require full type and enter,Debounced fetch + dropdown,No suggestions,Medium
|
|
91
|
+
90,Search,No Results,Web,Dead ends frustrate users,Show 'No results' with suggestions,Blank screen or '0 results',Try searching for X instead,No results found.,Medium
|
|
92
|
+
91,Data Entry,Bulk Actions,Web,Editing one by one is tedious,Allow multi-select and bulk edit,Single row actions only,Checkbox column + Action bar,Repeated actions per row,Low
|
|
93
|
+
92,AI Interaction,Disclaimer,All,Users need to know they talk to AI,Clearly label AI generated content,Present AI as human,AI Assistant label,Fake human name without label,High
|
|
94
|
+
93,AI Interaction,Streaming,All,Waiting for full text is slow,Stream text response token by token,Show loading spinner for 10s+,Typewriter effect,Spinner until 100% complete,Medium
|
|
95
|
+
94,Spatial UI,Gaze Hover,VisionOS,Elements should respond to eye tracking before pinch,Scale/highlight element on look,Static element until pinch,hoverEffect(),onTap only,High
|
|
96
|
+
95,Spatial UI,Depth Layering,VisionOS,UI needs Z-depth to separate content from environment,Use glass material and z-offset,Flat opaque panels blocking view,.glassBackgroundEffect(),bg-white,Medium
|
|
97
|
+
96,Sustainability,Auto-Play Video,Web,Video consumes massive data and energy,Click-to-play or pause when off-screen,Auto-play high-res video loops,playsInline muted preload='none',autoplay loop,Medium
|
|
98
|
+
97,Sustainability,Asset Weight,Web,Heavy 3D/Image assets increase carbon footprint,Compress and lazy load 3D models,Load 50MB textures,Draco compression,Raw .obj files,Medium
|
|
99
|
+
98,AI Interaction,Feedback Loop,All,AI needs user feedback to improve,Thumps up/down or 'Regenerate',Static output only,Feedback component,Read-only text,Low
|
|
100
|
+
99,Accessibility,Motion Sensitivity,All,Parallax/Scroll-jacking causes nausea,Respect prefers-reduced-motion,Force scroll effects,@media (prefers-reduced-motion),ScrollTrigger.create(),High
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Widget Name,Category,Description,Key Properties,Usage Context & Pro-Tips
|
|
2
|
+
Container,Layout,"Widget đa năng kết hợp painting, positioning, sizing.","decoration, padding, margin, constraints, alignment","Pro-Tip: Đừng dùng Container chỉ để thêm padding (dùng Padding) hoặc kích thước (dùng SizedBox). Nó nặng hơn các widget chuyên biệt."
|
|
3
|
+
SizedBox,Layout,Hộp có kích thước cố định.,"width, height","Pro-Tip: Dùng SizedBox.shrink() để ẩn widget (kích thước 0). Dùng làm separator trong Row/Column."
|
|
4
|
+
Column,Layout,Xếp con theo chiều dọc.,"mainAxisAlignment, crossAxisAlignment, children","Cảnh báo: Không đặt ListView trong Column mà không bọc ListView trong Expanded (gây lỗi Unbounded Height)."
|
|
5
|
+
Row,Layout,Xếp con theo chiều ngang.,"mainAxisAlignment, crossAxisAlignment, children","Cảnh báo: Dễ bị lỗi overflow (vạch vàng đen) nếu nội dung quá rộng. Dùng Expanded hoặc Flexible để khắc phục."
|
|
6
|
+
Stack,Layout,Xếp chồng các con lên nhau.,"alignment, fit, children","Dùng Positioned để định vị con tuyệt đối trong Stack."
|
|
7
|
+
IndexedStack,Layout,Stack hiển thị 1 con tại 1 thời điểm.,"index, children","Pro-Tip: Dùng cho BottomNav để giữ trạng thái (scroll position) của các tab khi chuyển đổi."
|
|
8
|
+
Expanded,Layout,Ép con lấp đầy chỗ trống trong Row/Column.,"flex, child","flex mặc định là 1. Tương đương Flexible(fit: FlexFit.tight)."
|
|
9
|
+
Flexible,Layout,Cho phép con co giãn trong Row/Column.,"fit, flex, child","Dùng fit: FlexFit.loose nếu muốn con chỉ to bằng kích thước thật của nó nhưng có thể co lại nếu cần."
|
|
10
|
+
Spacer,Layout,Tạo khoảng trống linh hoạt.,flex,"Tương đương Expanded(child: SizedBox()). Giúp code gọn hơn."
|
|
11
|
+
SafeArea,Layout,"Tránh các vùng hệ thống (tai thỏ, home bar).","minimum, maintainBottom, child","Luôn bọc Scaffold body trong SafeArea nếu không muốn nội dung bị che khuất trên iPhone đời mới."
|
|
12
|
+
LayoutBuilder,Layout,Build dựa trên constraints của cha.,"builder(context, constraints)","Dùng để quyết định layout mobile hay desktop dựa trên maxWidth."
|
|
13
|
+
Flow,Layout,Layout tối ưu cho animation biến đổi.,"delegate, children","Hiệu năng cực cao cho animation menu di chuyển phức tạp vì tránh layout pass."
|
|
14
|
+
CustomMultiChildLayout,Layout,Layout tùy chỉnh vị trí con phụ thuộc nhau.,"delegate, children","Dùng khi vị trí widget A phụ thuộc kích thước widget B."
|
|
15
|
+
Wrap,Layout,Tự động xuống dòng khi hết chỗ.,"spacing, runSpacing, children","Thay thế Row khi số lượng item không xác định và có thể tràn màn hình (ví dụ: danh sách tag/chip)."
|
|
16
|
+
ListView,Scrolling,Danh sách cuộn tuyến tính.,"itemBuilder, controller, physics","Pro-Tip: Luôn dùng ListView.builder hoặc separated cho danh sách động để bật lazy loading."
|
|
17
|
+
GridView,Scrolling,Lưới cuộn 2D.,"gridDelegate, itemBuilder","Dùng SliverGridDelegateWithFixedCrossAxisCount cho lưới cột cố định."
|
|
18
|
+
SingleChildScrollView,Scrolling,Cuộn một con duy nhất.,"child, controller","Chỉ dùng cho nội dung tĩnh, ngắn (như form đăng nhập). Không hỗ trợ lazy loading."
|
|
19
|
+
CustomScrollView,Scrolling,Root widget cho hiệu ứng Sliver.,"slivers, controller","Cho phép kết hợp List, Grid, và Appbar co giãn trong cùng một vùng cuộn."
|
|
20
|
+
SliverAppBar,Scrolling,Appbar co giãn/trôi nổi.,"pinned, floating, snap, expandedHeight","Đặt trong CustomScrollView. Dùng FlexibleSpaceBar làm background."
|
|
21
|
+
SliverList,Scrolling,Sliver phiên bản của ListView.,delegate,"Dùng SliverChildBuilderDelegate để tối ưu bộ nhớ."
|
|
22
|
+
SliverGrid,Scrolling,Sliver phiên bản của GridView.,"gridDelegate, delegate","Kết hợp với SliverList trong cùng CustomScrollView."
|
|
23
|
+
SliverToBoxAdapter,Scrolling,Chứa widget thường trong Sliver.,child,"Lưu ý: Con của widget này được render ngay lập tức, không lazy load. Không dùng cho list dài."
|
|
24
|
+
SliverFillRemaining,Scrolling,Lấp đầy vùng trống còn lại.,"hasScrollBody, child","Dùng để center thông báo lỗi/loading khi danh sách trống."
|
|
25
|
+
SliverPersistentHeader,Scrolling,Header ghim lại khi cuộn qua.,"delegate, pinned","Dùng để tạo sticky headers (như danh bạ điện thoại: A, B, C...)."
|
|
26
|
+
CarouselView,Scrolling,M3 Carousel tự động resize item.,"itemExtent, itemSnapping, children","Widget mới (2025). Tự động xử lý hiệu ứng co giãn item ở mép màn hình."
|
|
27
|
+
DraggableScrollableSheet,Scrolling,Bottom sheet có thể kéo dãn.,"builder, initialChildSize, snap","Builder phải trả về một ScrollView (như ListView) gắn controller được cung cấp."
|
|
28
|
+
Text,Display,Hiển thị văn bản đơn giản.,"style, textAlign, overflow","Dùng RichText nếu cần style hỗn hợp (đậm nhạt khác nhau) trong 1 dòng."
|
|
29
|
+
Image,Display,Hiển thị hình ảnh.,"image, fit, loadingBuilder","Image.network không cache mặc định. Cân nhắc dùng cached_network_image cho production."
|
|
30
|
+
Icon,Display,Hiển thị vector icon (font).,"icon, size, color","Tự động lấy màu từ IconTheme nếu không set color."
|
|
31
|
+
Card,Display,Surface có bo góc và shadow.,"elevation, shape, color","Trong M3, Card có 3 biến thể: Elevated, Filled, Outlined."
|
|
32
|
+
ListTile,Display,"Hàng định dạng chuẩn (icon, title, subtitle).","leading, title, subtitle, trailing","Rất hữu ích cho menu, danh sách cài đặt. Tự động xử lý padding chuẩn Material."
|
|
33
|
+
CircleAvatar,Display,Hình tròn đại diện người dùng/ảnh.,"backgroundImage, radius, child","Thường dùng trong ListTile leading."
|
|
34
|
+
Divider,Display,Đường kẻ ngang phân cách.,"height, thickness, color","Dùng VerticalDivider cho đường dọc."
|
|
35
|
+
Badge,Display,Thông báo nhỏ trên widget khác.,"label, child, isLabelVisible","Widget M3 mới. Thay thế cho các thư viện badge bên ngoài."
|
|
36
|
+
Chip,Display,Phần tử nén thông tin/hành động.,"label, avatar, onDeleted","Các biến thể: InputChip, FilterChip, ChoiceChip, ActionChip."
|
|
37
|
+
LinearProgressIndicator,Display,Thanh tiến trình ngang.,"value, backgroundColor, color","value: null sẽ hiển thị dạng indeterminate (chạy liên tục)."
|
|
38
|
+
CircularProgressIndicator,Display,Vòng tròn tiến trình.,"value, strokeWidth","Thường dùng để báo loading."
|
|
39
|
+
FilledButton,Input,Nút bấm chính M3 (nền màu).,"onPressed, child","Nút có độ nhấn mạnh cao nhất trong M3."
|
|
40
|
+
ElevatedButton,Input,Nút bấm nổi (có shadow).,"onPressed, style","Dùng khi cần tách biệt nút khỏi nền."
|
|
41
|
+
OutlinedButton,Input,Nút viền (nền trong suốt).,"onPressed, style","Dùng cho hành động phụ (secondary actions)."
|
|
42
|
+
TextButton,Input,Nút văn bản đơn giản.,"onPressed, child","Dùng trong Dialogs hoặc Card actions."
|
|
43
|
+
IconButton,Input,Nút chỉ có icon.,"icon, onPressed, tooltip","Nên luôn cung cấp tooltip cho accessibility."
|
|
44
|
+
FloatingActionButton,Input,Nút hành động chính nổi.,"onPressed, child","Thường đặt trong Scaffold.floatingActionButton."
|
|
45
|
+
SegmentedButton,Input,Chọn 1 hoặc nhiều trong nhóm.,"segments, selected, onSelectionChanged","Thay thế ToggleButtons trong M3."
|
|
46
|
+
TextField,Input,Ô nhập liệu văn bản.,"controller, decoration, onChanged","Luôn gọi controller.dispose()."
|
|
47
|
+
TextFormField,Input,TextField tích hợp Form validation.,"validator, onSaved","Dùng trong widget Form. Validator trả về null là hợp lệ."
|
|
48
|
+
Checkbox,Input,Hộp kiểm (True/False).,"value, onChanged","tristate: true cho phép giá trị null (chưa xác định)."
|
|
49
|
+
Switch,Input,Công tắc bật/tắt.,"value, onChanged","Thường dùng cho settings."
|
|
50
|
+
Radio,Input,Chọn 1 trong nhiều.,"value, groupValue, onChanged","Dùng RadioListTile để có cả nhãn bấm được."
|
|
51
|
+
Slider,Input,Thanh trượt chọn giá trị.,"value, min, max, onChanged","Dùng RangeSlider để chọn khoảng giá trị."
|
|
52
|
+
InkWell,Input,Vùng cảm ứng có hiệu ứng ripple.,"onTap, child","Phải nằm trong widget Material."
|
|
53
|
+
GestureDetector,Input,"Phát hiện cử chỉ thô (tap, drag, scale).","onTap, onPanUpdate","Không có hiệu ứng hình ảnh (ripple). Dùng cho logic tương tác thuần túy."
|
|
54
|
+
FutureBuilder,Async,Build UI từ Future.,"future, builder","Cảnh báo: Không tạo Future trong hàm build (gây loop)."
|
|
55
|
+
StreamBuilder,Async,Build UI từ Stream.,"stream, builder","Xử lý snapshot.hasError và trạng thái loading cẩn thận."
|
|
56
|
+
ValueListenableBuilder,Async,Rebuild khi ValueNotifier đổi.,"valueListenable, builder","Rất nhẹ. Tốt để update cục bộ (ví dụ: đếm ký tự TextField) mà không rebuild cả trang."
|
|
57
|
+
AnimatedBuilder,Animation,Build UI theo AnimationController.,"animation, builder","Tối ưu hiệu năng animation bằng cách chỉ rebuild phần builder trả về."
|
|
58
|
+
Hero,Animation,Chuyển cảnh chia sẻ phần tử (Hero transition).,"tag, child","tag phải duy nhất giữa 2 màn hình."
|
|
59
|
+
ShaderMask,Effect,Mask child bằng gradient/shader.,"shaderCallback, blendMode","Dùng để tạo hiệu ứng fade text."
|
|
60
|
+
BackdropFilter,Effect,Blur nền phía sau widget.,"filter, child","Phải có clip (như ClipRect) bọc ngoài để giới hạn vùng blur."
|
|
61
|
+
OverlayPortal,Overlay,Render widget lên lớp Overlay.,"controller, overlayChildBuilder","Tốt hơn OverlayEntry cho tooltip/menu dropdown phức tạp."
|
|
62
|
+
Semantics,A11y,Thêm ngữ nghĩa cho Screen Reader.,"label, hint, onTap","Dùng MergeSemantics để gộp nhóm tương tác."
|
|
63
|
+
InteractiveViewer,Interaction,Cho phép pan/zoom/scale nội dung.,"minScale, maxScale, boundaryMargin","Dùng cho xem ảnh chi tiết, bản đồ."
|
|
64
|
+
WillPopScope,Interaction,Chặn nút Back hệ thống.,onWillPop,"Đã bị deprecated (2025). Dùng PopScope thay thế."
|
|
65
|
+
PopScope,Interaction,Kiểm soát việc thoát màn hình.,"canPop, onPopInvoked","Thay thế WillPopScope trong Android 14+."
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flutter-pro-max
|
|
3
|
+
description: Chuyên gia Flutter với kiến thức sâu về Clean Architecture, Performance và Modern Dart 3
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Flutter Pro Max - Flutter Design Intelligence
|
|
7
|
+
|
|
8
|
+
Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Chỉ cần Python (không cần pip install):
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
python3 --version || python --version
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## How to Use This Skill
|
|
21
|
+
|
|
22
|
+
Khi user yêu cầu Flutter work (design, build, create, implement, review, fix, improve), follow workflow này:
|
|
23
|
+
|
|
24
|
+
### Step 1: Analyze User Requirements
|
|
25
|
+
|
|
26
|
+
Trích xuất thông tin từ request:
|
|
27
|
+
- **Architecture**: Clean Architecture, Feature-First, DDD
|
|
28
|
+
- **State Management**: Riverpod (default), Bloc, Provider
|
|
29
|
+
- **UI Components**: Widgets, Layouts, Animations
|
|
30
|
+
- **Package needs**: Networking, Database, Security, etc.
|
|
31
|
+
|
|
32
|
+
### Step 2: Search Relevant Data
|
|
33
|
+
|
|
34
|
+
Sử dụng `search.py` để tìm kiếm (auto-detect domain):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
python3 .shared/flutter-pro-max/scripts/search.py "<keyword>" --top 5
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Với domain cụ thể:**
|
|
41
|
+
```bash
|
|
42
|
+
python3 .shared/flutter-pro-max/scripts/search.py "<keyword>" --domain widget --top 5
|
|
43
|
+
python3 .shared/flutter-pro-max/scripts/search.py "<keyword>" --domain package --top 5
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Với stack filter (loại bỏ conflicts):**
|
|
47
|
+
```bash
|
|
48
|
+
python3 .shared/flutter-pro-max/scripts/search.py "<keyword>" --stack riverpod --top 5
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Available domains:** `widget`, `package`, `pattern`, `architect`, `chart`, `color`, `typography`, `style`, `ux`, `icon`, `landing`, `naming`, `product`, `prompt`
|
|
52
|
+
|
|
53
|
+
**Available stacks:** `riverpod`, `bloc`, `provider`
|
|
54
|
+
|
|
55
|
+
### Step 3: Apply Technical Standards
|
|
56
|
+
|
|
57
|
+
Luôn tuân thủ các tiêu chuẩn:
|
|
58
|
+
|
|
59
|
+
#### Dart 3 Modern Syntax
|
|
60
|
+
```dart
|
|
61
|
+
// ✅ Records
|
|
62
|
+
(String name, int age) getUserInfo() => ('John', 25);
|
|
63
|
+
|
|
64
|
+
// ✅ Pattern Matching
|
|
65
|
+
String getMessage(UIState state) => switch (state) {
|
|
66
|
+
LoadingState() => 'Loading...',
|
|
67
|
+
DataState(data: var d) => 'Data: $d',
|
|
68
|
+
ErrorState(message: var m) => 'Error: $m',
|
|
69
|
+
};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### Performance Rules
|
|
73
|
+
- Luôn dùng `const` constructor khi có thể
|
|
74
|
+
- Ưu tiên `SizedBox` hơn `Container` cho spacing
|
|
75
|
+
- Dùng `ListView.builder` thay vì `ListView` + `children`
|
|
76
|
+
|
|
77
|
+
#### State Management
|
|
78
|
+
- **Default**: Riverpod với `riverpod_generator`
|
|
79
|
+
- **Alternative**: Bloc (khi user yêu cầu)
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Search Reference
|
|
84
|
+
|
|
85
|
+
### Available Data
|
|
86
|
+
|
|
87
|
+
| Domain | File | Content |
|
|
88
|
+
|--------|------|---------|
|
|
89
|
+
| Widgets | `widget.csv` | 65+ Flutter widgets với pro-tips |
|
|
90
|
+
| Packages | `package.csv` | 100+ packages với best practices |
|
|
91
|
+
| Patterns | `patterns.csv` | 100+ design patterns với code snippets |
|
|
92
|
+
| Architecture | `architect.csv` | Clean Architecture layer paths |
|
|
93
|
+
| Charts | `charts.csv` | Chart type recommendations |
|
|
94
|
+
| Colors | `colors.csv` | Color palettes by product type |
|
|
95
|
+
| Typography | `typography.csv` | Font pairings |
|
|
96
|
+
| Styles | `styles.csv` | UI style guidelines |
|
|
97
|
+
| UX Guidelines | `ux-guidelines.csv` | UX best practices |
|
|
98
|
+
| Icons | `icons.csv` | Icon recommendations |
|
|
99
|
+
| Landing | `landing.csv` | Landing page patterns |
|
|
100
|
+
| Naming | `name_convention.csv` | Naming conventions |
|
|
101
|
+
| Products | `products.csv` | Product type styling |
|
|
102
|
+
| Prompts | `prompts.csv` | AI prompt templates |
|
|
103
|
+
|
|
104
|
+
### Search Examples
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Auto-detect domain
|
|
108
|
+
python3 .shared/flutter-pro-max/scripts/search.py "ListView" --top 5
|
|
109
|
+
|
|
110
|
+
# Specific domain
|
|
111
|
+
python3 .shared/flutter-pro-max/scripts/search.py "network http" --domain package --top 5
|
|
112
|
+
|
|
113
|
+
# Stack filter
|
|
114
|
+
python3 .shared/flutter-pro-max/scripts/search.py "state" --stack riverpod --top 5
|
|
115
|
+
|
|
116
|
+
# JSON output
|
|
117
|
+
python3 .shared/flutter-pro-max/scripts/search.py "login" --json --top 3
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Example Workflow
|
|
123
|
+
|
|
124
|
+
**User Request:** "Tạo màn hình đăng nhập với Riverpod"
|
|
125
|
+
|
|
126
|
+
1. **Search widgets:**
|
|
127
|
+
```bash
|
|
128
|
+
python3 .shared/flutter-pro-max/scripts/search.py "form input" --domain widget --top 5
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
2. **Search patterns:**
|
|
132
|
+
```bash
|
|
133
|
+
python3 .shared/flutter-pro-max/scripts/search.py "authentication login" --domain pattern --top 5
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
3. **Search packages:**
|
|
137
|
+
```bash
|
|
138
|
+
python3 .shared/flutter-pro-max/scripts/search.py "validation" --domain package --stack riverpod --top 5
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
4. **Apply results** to generate code với Riverpod state management
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Pre-Delivery Checklist
|
|
146
|
+
|
|
147
|
+
### Code Quality
|
|
148
|
+
- [ ] Sử dụng `const` constructors
|
|
149
|
+
- [ ] Sound Null Safety (không dùng `!` bừa bãi)
|
|
150
|
+
- [ ] Dart 3 syntax (Records, Pattern Matching)
|
|
151
|
+
|
|
152
|
+
### Performance
|
|
153
|
+
- [ ] `ListView.builder` cho lists dài
|
|
154
|
+
- [ ] `SizedBox` thay vì `Container` cho spacing
|
|
155
|
+
- [ ] `const` widgets được đánh dấu
|
|
156
|
+
|
|
157
|
+
### Architecture
|
|
158
|
+
- [ ] Tuân thủ Clean Architecture layers
|
|
159
|
+
- [ ] Dependency Injection đúng cách
|
|
160
|
+
- [ ] Repository pattern cho data access
|
|
161
|
+
|
|
162
|
+
### State Management
|
|
163
|
+
- [ ] Riverpod providers được tổ chức hợp lý
|
|
164
|
+
- [ ] Không leak state giữa các features
|
|
165
|
+
- [ ] Error handling với AsyncValue
|