Check a page for accessibility
Review supplied markup or descriptions for practical accessibility issues and fixes.
5,260,421 AI resources indexedWorking toward the world’s largest AI resource index.
Modern layout and widget composition standards.
---
name: idiomatic-flutter
description: Modern layout and widget composition standards.
metadata:
labels: [flutter, clean-code, widgets]
triggers:
files: ['lib/presentation/**/*.dart']
keywords: [context.mounted, SizedBox, Gap, composition, shrink]
---
# Idiomatic Flutter (P1)
- **Async Gaps**: Check `if (context.mounted)` before using `BuildContext` after `await`.
- **Composition**: Extract complex UI into small widgets. Avoid deep nesting or large helper methods.
- **Layout**:
- Spacing: Use `Gap(n)` or `SizedBox` over `Padding` for simple gaps.
- Empty UI: Use `const SizedBox.shrink()`.
- Intrinsic: Avoid `IntrinsicWidth/Height`; use `Stack` + `FractionallySizedBox` for overlays.
- **Optimization**: Use `ColoredBox`/`Padding`/`DecoratedBox` instead of `Container` when possible.
- **Themes**: Use extensions for `Theme.of(context)` access.
---
name: idiomatic-flutter
description: Modern layout and widget composition standards.
metadata:
labels: [flutter, clean-code, widgets]
triggers:
files: ['lib/presentation/**/*.dart']
keywords: [context.mounted, SizedBox, Gap, composition, shrink]
---
# Idiomatic Flutter (P1)
- **Async Gaps**: Check `if (context.mounted)` before using `BuildContext` after `await`.
- **Composition**: Extract complex UI into small widgets. Avoid deep nesting or large helper methods.
- **Layout**:
- Spacing: Use `Gap(n)` or `SizedBox` over `Padding` for simple gaps.
- Empty UI: Use `const SizedBox.shrink()`.
- Intrinsic: Avoid `IntrinsicWidth/Height`; use `Stack` + `FractionallySizedBox` for overlays.
- **Optimization**: Use `ColoredBox`/`Padding`/`DecoratedBox` instead of `Container` when possible.
- **Themes**: Use extensions for `Theme.of(context)` access.
Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.