パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v10.0.0

flutter_helper_utils

Flutter Helper Utils パッケージは、開発をより効率的にするさまざまな拡張機能とヘルパー メソッドを提供しています。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
1300
いいね数
48
Pub ポイント
160

パッケージをインストール

flutter pub add flutter_helper_utils

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Flutter Helper Utilsパッケージは、Flutter開発をスムーズにするために設計された拡張機能とユーティリティメソッドのコレクションを提供します。文字列操作、日付フォーマット、ウィジェットユーティリティなどの一般的なタスクに便利で再利用可能な関数を提供することで生産性を向上させます。シンプルさを最優先に設計されており、複数のプラットフォームで既存のプロジェクトにシームレスに統合できます。軽量な性質により、パフォーマンスへの影響を最小限に抑えながら、開発者の効率を最大限に高めます。ボイラープレートコードを減らし、一貫したコーディング慣習を維持したいチームに最適です。

用途

  • 文字列および日付操作の簡素化
  • 繰り返しのあるウィジェットコードの削減
  • プロジェクト間でのユーティリティ関数の標準化
  • UI開発の高速化
  • コードの可読性の向上
  • クロスプラットフォームの一貫性の有効化

主な機能

  • 有用な拡張機能の豊富なセット
  • クロスプラットフォーム互換性
  • 最小限のパフォーマンスオーバーヘッド
  • pub を通じた簡単な統合
  • 洗練された、読みやすい API デザイン
  • 詳細なドキュメント付きのユーティリティメソッド

適している対象

  • 初心者から上級者までのFlutter開発者
  • コード標準化を求めるチーム
  • 迅速なプロトタイピングを必要とするプロジェクト
  • ボイラープレートを減らしたい開発者
  • 複数のプラットフォームをターゲットにするアプリ

注意事項

  • 使用されていない機能が含まれると、依存関係の肥大化を引き起こす可能性がある
  • 拡張スコープの注意深いレビューが必要です
  • 非常に専門的な用途には適していません
  • カスタマイズオプションが限定的
  • 他のユーティリティと併用するのが最適です
  • 安定した Dart/Flutter のバージョンに依存しています

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Flutter Helper Utils

flutter_helper_utils is a curated Flutter utility package focused on a few high-value areas:

  • adaptive UI and breakpoint helpers
  • color parsing, transformation, and accessibility utilities
  • typed list and sliver list widgets
  • focused BuildContext and UI extensions
  • dart_helper_utils re-exported for the Dart-only helpers that still fit the package surface
Flutter Helper Utils Logo

Version 9 intentionally makes the package smaller and more deliberate.

Documentation

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.

AI coding-assistant support

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.

Install

dependencies:
  flutter_helper_utils: ^9.2.0

Imports

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';

Notifiers

Notifier utilities were extracted from this package in v9.

If you need the old notifier-style workflows, use better_value_notifier

Highlights

Adaptive UI
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();
}
PlatformEnv
final report = PlatformEnv.report();
final os = PlatformEnv.operatingSystem;
final locale = PlatformEnv.localeName;
final processors = PlatformEnv.numberOfProcessors;
Color Toolkit
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:

  • hex strings
  • rgb(...) and rgba(...)
  • hsl(...) and hsla(...)
  • hwb(...)
  • CSS named colors
Typed Lists
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,
    ),
  ],
);
BuildContext and UI Helpers

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;
Opt-in Sugar
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.

Widgets

Included widgets and widget systems:

  • PlatformTypeProvider
  • PlatformInfoLayoutBuilder
  • BreakpointLayoutBuilder
  • TypedListView
  • TypedSliverList
  • GradientWidget
  • MultiTapDetector
  • ThemeWithoutEffects

Migration

Version 9 includes several breaking changes:

  • notifier utilities moved to better_value_notifier
  • deprecated Color.add* aliases removed
  • GradientWidget.gradientAlignment removed
  • explicit navigation naming finalized
  • focus helper naming finalized

For the full v9 migration guide, read migration_guides.md.

Example

The example app in example/ was rebuilt for v9 and acts as the current visual reference for the package surface.

License

MIT

カテゴリー

依存関係

依存関係一覧 3 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。