flutter_helper_utils
Das Flutter Helper Utils-Paket bietet verschiedene Erweiterungen und Hilfsmethoden, die die Entwicklung effizienter machen können.
Flutter Helper Utils ist ein umfassendes Paket, das darauf abzielt, die Kernfunktionen von Dart und Flutter zu erweitern. Mit einer reichen Auswahl an Erweiterungen und Hilfsmethoden steigert dieses Paket die Produktivität und vereinfacht das Codieren in Flutter-Projekten.
>=6.0.0 <7.0.0{"sdk":"flutter"}>=0.20.0 <1.0.0^6.0.0{"sdk":"flutter"}Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.
Flutter Helper Utils
|
Flutter Helper Utils Logo |
Version 9 intentionally makes the package smaller and more deliberate.
Full documentation: https://omar-hanafy.github.io/flutter_helper_utils/
The site is built from site/ in this repository, so it ships with the
package rather than trailing behind it.
This repository ships a package-specific agent plugin for Claude Code and OpenAI Codex (this is tooling for coding agents, not a runtime feature of the Flutter package). It teaches the agent the exact flutter_helper_utils APIs - breakpoint/adaptive-UI semantics, TypedListView contracts, color parsing and WCAG helpers, navigation and theme member names, the v8-to-v9 breaking migration, and version-aware upgrades.
Install in Claude Code:
/plugin marketplace add omar-hanafy/flutter_helper_utils
/plugin install flutter-helper-utils@flutter-helper-utils-tools
Install in OpenAI Codex (CLI; the IDE extension does not support
plugins - use its $skill-installer there instead):
codex plugin marketplace add omar-hanafy/flutter_helper_utils
codex plugin add flutter-helper-utils@flutter-helper-utils-tools
Start a new agent session after installing so the skills load. Then try
prompts like "make this screen adaptive with flutter_helper_utils
breakpoints" or "migrate this app from flutter_helper_utils 8.x to 9.x",
or invoke a skill explicitly in Claude Code, e.g.
/flutter-helper-utils:use-flutter-helper-utils.
The plugin is installed from this Git repository (not from the pub.dev archive), contains markdown skills only - no hooks, no MCP servers, no telemetry - and its version tracks the package version. Details, the full capability list, updating, and uninstalling are in tooling/ai/flutter-helper-utils/README.md.
dependencies:
flutter_helper_utils: ^9.2.0
Most users should import the package once:
import 'package:flutter_helper_utils/flutter_helper_utils.dart';
If you only want the shortcut-heavy surface, use the opt-in sugar import:
import 'package:flutter_helper_utils/sugar.dart';
Notifier utilities were extracted from this package in v9.
If you need the old notifier-style workflows, use better_value_notifier
runApp(
const PlatformTypeProvider(
child: MyApp(),
),
);
@override
Widget build(BuildContext context) {
final breakpoint = context.watchBreakpoint;
if (breakpoint.isMobile) {
return const MobileLayout();
}
if (breakpoint.isTablet) {
return const TabletLayout();
}
return const DesktopLayout();
}
final report = PlatformEnv.report();
final os = PlatformEnv.operatingSystem;
final locale = PlatformEnv.localeName;
final processors = PlatformEnv.numberOfProcessors;
final brand = tryToColor('#F97316') ?? Colors.orange;
final accent = tryToColor('rgb(14 165 233)') ?? Colors.blue;
final hex = brand.toHex(includeAlpha: true);
final readableText = brand.contrastColor();
final passesAA = brand.meetsWCAG(
readableText,
level: WCAGLevel.aa,
context: WCAGContext.normalText,
);
Color parsing supports:
rgb(...) and rgba(...)hsl(...) and hsla(...)hwb(...)TypedListView<Product>(
items: products,
itemBuilder: (context, index, product) {
return ProductTile(product: product);
},
spacing: 12,
header: const Text('Products'),
);
CustomScrollView(
slivers: [
const SliverAppBar(title: Text('Products')),
products.buildSliverList(
itemBuilder: (context, index, product) {
return ProductTile(product: product);
},
spacing: 12,
),
],
);
Use context.popPage() for guarded back navigation and
context.forcePopPage() when the current route should be removed directly.
context.pushPage(const DetailsPage());
await context.popPage();
context.showSnackBar(const SnackBar(content: Text('Saved')));
context.unfocus();
final theme = context.themeData;
final width = context.widthPx;
final height = context.heightPx;
final padding = 16.edgeInsetsAll;
final hSpace = 12.heightBox();
final radius = 24.allCircular;
final rawColor = 0xFFF97316.color;
0xFFF97316.color lives in sugar.dart, not in the main color toolkit.
Included widgets and widget systems:
PlatformTypeProviderPlatformInfoLayoutBuilderBreakpointLayoutBuilderTypedListViewTypedSliverListGradientWidgetMultiTapDetectorThemeWithoutEffectsVersion 9 includes several breaking changes:
better_value_notifierColor.add* aliases removedGradientWidget.gradientAlignment removedFor the full v9 migration guide, read
migration_guides.md.
The example app in example/ was rebuilt for v9 and acts as the current visual
reference for the package surface.
MIT