From Flutter Helper Utils
Builds responsive Flutter layouts and typed lists using flutter_helper_utils: breakpoint detection, BreakpointLayoutBuilder, TypedListView with pull-to-refresh, infinite scroll, and empty states.
How this skill is triggered — by the user, by Claude, or both
Slash command
/flutter-helper-utils:adaptive-ui-and-lists-with-flutter-helper-utilsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Two surfaces where agents invent parameter names and misremember the
Two surfaces where agents invent parameter names and misremember the breakpoint model. Use the exact contracts below.
Defaults (Breakpoint.defaults): mobile width 600, tablet width
1200, desktop width 1800. Matching returns the FIRST breakpoint
whose width >= available width (widths are ceilings, NOT min-widths):
Do not assume the common min-width model (mobile 0+, tablet 600+,
desktop 1200+) - boundaries land differently (600 exactly is MOBILE here).
Custom sets: Breakpoint(width: 900, name: 'compact'); the provider sorts
them by width. Comparisons: bp.isMobile/isTablet/isDesktop (name
match), >/</isBetween(lower, upper) (width match).
runApp(PlatformTypeProvider( // safe ABOVE MaterialApp (9.0+)
// breakpoints: Breakpoint.defaults,
child: MyApp(),
));
final bp = context.watchBreakpoint; // rebuilds on change (NOT context.breakpoint)
final bp2 = context.readBreakpoint; // one-shot, no rebuild (NOT .of(listen: false))
FlutterError - there is no null fallback;
wrap the app root, not a subtree, unless scoping is intentional.BreakpointLayoutBuilder(builder: (context, breakpoint) => ...) and
PlatformInfoLayoutBuilder(builder: (context, info) => ...) are the
widget forms; PlatformSizeInfo carries breakpoint, orientation,
and platform (from PlatformEnv.targetPlatform).TypedListView<Product>(
items: products,
itemBuilder: (context, index, item) => ProductTile(item), // THIS order
spacing: 12, // gap; do NOT also pass separatorBuilder
emptyBuilder: (context) => const EmptyState(), // NOT emptyWidget
onRefresh: () => reload(), // wraps in RefreshIndicator
onEndReached: () => loadMore(), // NOT onLoadMore/onPaginate
onEndReachedThreshold: 200, // px before the end (default 200)
isLoadingMore: isLoading, // gates repeat onEndReached calls
header: const ListHeader(), // direct widgets, not builders
footer: const ListFooter(),
paginationWidget: const LoadingSpinner(), // shown before footer
itemKeyBuilder: (item) => ValueKey(item.id), // stable keys + correct
) // findChildIndexCallback
// Same surface as an extension:
products.buildListView(itemBuilder: (context, index, item) => ...);
Assert matrix (violations crash in debug):
separatorBuilder XOR spacing - never both.itemExtent XOR prototypeItem - never both.itemExtent/prototypeItem require NO header/footer/pagination/
separators/spacing (every child must have the same extent).cacheExtent (deprecated 9.1) XOR scrollCacheExtent; prefer
scrollCacheExtent: ScrollCacheExtent.pixels(300) or
ScrollCacheExtent.viewport(1.5).Behavior notes:
onEndReached fires on scroll notifications whenever remaining extent
<= threshold and isLoadingMore is false - keep isLoadingMore true
until the fetch settles or it will re-fire.showScrollbar: true wraps in Scrollbar using the SAME controller
you pass; provide one when you enable it.buildListView eagerly copies the iterable to a list.TypedSliverList mirrors items/itemBuilder/header/footer/separators/
spacing/itemKeyBuilder for CustomScrollView use (no physics/refresh/
scrollbar - those belong to the outer scroll view).controller.animateToStart() / animateToEnd() / jumpToEnd(),
animateBy(delta), pageScroll(...), scrollToPercentage(50),
snapToIndex(i, itemExtent: 72), scrollProgress (0-1),
isAtStart/isAtEnd, isNearEnd(threshold: 50), canScroll,
isUserScrollingForward, debugPrintScrollInfo(). Guard multi-client
controllers with hasSingleClient.
grep -A2 'flutter_helper_utils' pubspec.lock
(9.x documented here; TypedListView pre-8.5 had itemBuilder(item)
and headerBuilder/footerBuilder - see the migrate skill).grep -rn "PlatformTypeProvider" lib/ -
nesting a second provider silently re-scopes breakpoints.flutter analyze; assert-matrix violations only appear at RUNTIME in
debug builds, so run the affected screen or a widget test.FlutterError: ... does not contain a PlatformTypeProvider: the
provider is missing or below the calling context - move it up.onEndReached firing repeatedly: isLoadingMore is not being set.npx claudepluginhub omar-hanafy/flutter_helper_utils --plugin flutter-helper-utilsGuides building Flutter layouts that adapt to screen size using LayoutBuilder, MediaQuery, and Expanded/Flexible. Use when UI must work across mobile, tablet, and desktop form factors.
Guides correct usage of the flutter_helper_utils package v9: context extensions, MediaQuery shortcuts, navigation helpers, platform detection, and import decisions between the main package and sugar.dart.
Provides mobile development patterns for React Native and Flutter covering navigation, state management, and responsive UI design.