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

flutter_numeric_text のカバー
パッケージ詳細v1.3.3

flutter_numeric_text

このウィジェットを使用すると、任意のテキストをアニメーション化できます。このウィジェットは使いやすく、Text(data) をそのまま NumericText(data) に置き換えることができます。

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

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

flutter pub add flutter_numeric_text

パッケージ概要

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

flutter_numeric_text は、テキスト表示のためのスムーズな数値アニメーションを可能にするFlutterパッケージです。標準的なTextウィジェットをアニメーション付きの数値遷移に置き換え、カウンター、スコア、または時間とともに変化する任意の値に最適です。Widgetは簡単に統合できます。Text(data) を NumericText(data) に置き換えるだけで済み、Android、iOS、Web、macOS、Windows、Linuxなどすべての主要プラットフォームをサポートしています。最小限のセットアップでシームレスな視覚体験を提供し、流れるような数値更新が必要な動的UI要素に最適です。

用途

  • アニメーションカウンター
  • スコア表示
  • 動的データの可視化
  • リアルタイムでの数値更新
  • インタラクティブダッシュボード

主な機能

  • スムーズな数値アニメーション
  • シンプルな API の置き換え
  • クロスプラットフォーム対応
  • 最小構成
  • カスタマイズ可能な速度
  • 自動桁処理

適している対象

  • アニメーション付きの数字が必要な開発者
  • UIデザイナーがダッシュボードを向上させています
  • リアルタイムメトリクスを備えたアプリ
  • ゲーム化機能
  • シンプルだが洗練されたアニメーション

注意事項

  • 数値のみに適している
  • 高頻度の更新ではパフォーマンスに影響する可能性があります
  • 整数および小数に制限されています
  • 数値以外のテキストには対応していません
  • 非常に高速な更新には慎重な調整が必要です

元の README

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

Text(data) → NumericText(data)

This widget allows you to animate any text. The animation is reminiscent of the text animation in SwiftUI's .numericText(value:). The widget is easy to use and allows you to seamlessly replace Text(data) with NumericText(data).

Features

  • Automatic text animation
  • Minimal configuration required to get started
  • Supports almost all parameters of the Text() widget
  • No external dependencies required

Usage

import 'package:flutter_numeric_text/flutter_numeric_text.dart';

class MyWidget extends StatelessWidget {
  const MyWidget({super.key});

  @override
  Widget build(BuildContext context) {
    // Simply add the widget, and when its value changes,
    // it will automatically trigger the animation.

    // To use the widget, you only need to provide
    // a data value, other fields are optional.

    NumericText(
      "12345 or text",
      duration: const Duration(milliseconds: 300),
      style: const TextStyle(fontSize: 24, color: Colors.black),
      textAlign: TextAlign.center,
      textDirection: TextDirection.ltr,
      locale: const Locale("en", "US"),
      softWrap: true,
      overflow: TextOverflow.ellipsis,
      maxLines: 1,
      semanticsLabel: "Numeric value",
    );
  }
}
With GoogleFonts
...
    NumericText(
      "12345 or text",
      duration: const Duration(milliseconds: 300),
      style: GoogleFonts.<your_font>(
        fontSize: 24,
        color: Colors.black,
        // Just a friendly reminder to add the [textStyle] field.
        // It'll make sure everything calculates correctly.
        textStyle: Theme.of(context).textTheme.bodyMedium,
      ),
    );
...

Installation

To use this package, add it to your pubspec.yaml file:

dependencies:
  flutter_numeric_text: ^1.0.0 # Replace with the latest version

Contributing

Contributions are welcome! If you have suggestions for improvements or find bugs, please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

カテゴリー

ソースリポジトリ

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

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