flutter-layout — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited flutter-layout (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Master the fundamental Flutter layout rule: Constraints go down. Sizes go up. Parent sets position.
children. A Widget cannot choose its own size independently of its parent's constraints.
the parent.
x and y coordinates of a child Widget exclusively within the parent Widget.Children do not know their own position on the screen.
double.infinity) in the cross-axis of a flexbox (Row or Column) or within scrollable regions (ListView). This causes render exceptions.
Select the appropriate structural Widget based on the required spatial arrangement.
Row and Column: Implement Row for horizontal linear layouts and Column for vertical linear layouts.Control child alignment using mainAxisAlignment and crossAxisAlignment.
Expanded and Flexible: Wrap children of Row or Column in Expanded to force them to fill availablespace, or Flexible to allow them to size themselves up to the available space.
Container: Wrap Widgets in a Container when you need to apply padding, margins, borders, or backgroundcolors.
Stack: Implement Stack when Widgets must overlap on the Z-axis. Use Positioned to anchor children tospecific edges of the Stack.
SizedBox: Enforce strict, tight constraints on a child Widget by wrapping it in a SizedBox with explicitwidth and height values.
Apply conditional logic to handle varying screen sizes and form factors.
LayoutBuilder, Expanded, and Flexible to dynamicallyadjust the size and placement of elements based on the parent's constraints.
structures. For example, render a bottom navigation bar on mobile, but a side navigation rail on tablets/desktop.
Follow this sequential workflow to architect and implement robust Flutter layouts.
#### Task Progress
Stack).ListView or SingleChildScrollView).ListView inside a Column).Scaffold and primary structural Widgets.boxes.
Expanded (if inside a flex box) or wrap the parent in ascrollable Widget.
#### Example: Resolving Unbounded Constraints in Flex Boxes
Anti-pattern: Placing a ListView directly inside a Column causes an unbounded height exception because the Column provides infinite vertical space to the ListView.
// BAD: Throws unbounded height exception
Column(
children: [
Text('Header'),
ListView(
children: [/* items */],
),
],
)Implementation: Wrap the ListView in an Expanded Widget to bound its height to the remaining space in the Column.
// GOOD: ListView is constrained to remaining space
Column(
children: [
Text('Header'),
Expanded(
child: ListView(
children: [/* items */],
),
),
],
)#### Example: Responsive Layout with LayoutBuilder
Implement LayoutBuilder to conditionally render different structural Widgets based on available width.
Widget buildAdaptiveLayout(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) {
// Conditional logic based on screen width
if (constraints.maxWidth > 600) {
// Tablet/Desktop: Side-by-side layout
return const Row(
children: [
SizedBox(width: 250, child: SidebarWidget()),
Expanded(child: MainContentWidget()),
],
);
} else {
// Mobile: Stacked layout with navigation
return const Column(
children: [
Expanded(child: MainContentWidget()),
BottomNavigationBarWidget(),
],
);
}
},
);
}~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.