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

animated_hint_textfield のカバー
パッケージ詳細v1.3.0

animated_hint_textfield

テキストフィールドのヒント/ラベルテキストをアニメーション化する Flutter パッケージ。ユーザー体験を向上させるために、ダイナミックで目を引くトランジションを追加します。

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

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

flutter pub add animated_hint_textfield

パッケージ概要

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

テキストフィールドのヒントまたはラベルテキストをアニメーション化するFlutterパッケージで、フィールドがフォーカスされたときやフォーカスが外れたときに滑らかでダイナミックな遷移を実現します。微妙なアニメーションを通じた視覚フィードバックにより、ユーザー体験を向上させ、入力フィールドをより魅力的かつ直感的にします。美しさとインタラクティビティが重視される現代的なUIに最適です。このパッケージはAndroid、iOS、Web、macOS、Windows、Linuxなど複数のプラットフォームをサポートしており、デバイス間での一貫した動作を確保しています。

用途

  • 視覚的フィードバックでフォーム入力を強化
  • モダンでインタラクティブなログイン画面の作成
  • モバイルおよびWebアプリケーションにおけるUXの向上
  • テキストフィールドにマイクロインタラクションを追加する
  • 視覚的に魅力的なデータ入力フォームの設計

主な機能

  • スムーズなフォーカスとぼかしアニメーション
  • カスタマイズ可能なアニメーションの期間とカーブ
  • 複数プラットフォームのサポート
  • 既存のテキストフィールドとの簡単な統合
  • 動的ヒントの位置合わせとスケーリング

適している対象

  • インタラクティブ要素を探しているUI/UXデザイナー
  • 洗練されたフォームを構築する開発者
  • ユーザー参加を重視するアプリ
  • クロスプラットフォームのFlutterプロジェクト
  • 繊細で効果的なアニメーションを必要とするプロジェクト

注意事項

  • 低性能デバイスでのパフォーマンスに影響を与える可能性があります
  • アニメーションパラメータの正確な調整が必要です
  • ヒント/ラベルテキストのアニメーションのみに制限
  • 複雑なフォーム検証ロジックには適していません
  • 最適な結果を得るためには正しいウィジェット階層に依存します

元の README

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

pub package pub points

Animated Hint TextField

A Flutter package designed to animate the label/hint text of a textfield, providing suggestive guidance to the user regarding what to input. Try out our example app.


Platform Support

Android iOS MacOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅



Installing

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  animated_hint_textfield: ^1.0.0
2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get
3. Import it

Now in your Dart code, you can use:

import 'package:animated_hint_textfield/animated_hint_textfield.dart';



Animations

Currently this package supports 3 animations, more animations will be added in the future.

Slide

AnimatedTextField(
  animationType: Animationtype.slide, // Use Animationtype.slide for Slide animations
  decoration: InputDecoration(
    prefixIcon: Icon(Icons.search),
    border: OutlineInputBorder(
      borderSide: BorderSide(color: Colors.red, width: 2,
      ),
      borderRadius: BorderRadius.circular(4),
    ),
    focusedBorder: OutlineInputBorder(
      borderSide: BorderSide(color: Colors.black, width: 2,
      ),
      borderRadius: BorderRadius.circular(4),
    ),
    contentPadding: EdgeInsets.all(12),
  ),
  staticHintText: 'Search for ',
  hintTexts: [
    '"Bengaluru"',
    '"Mumbai"',
    '"Chennai"',
  ],
);

Fade

AnimatedTextField(
  animationType: Animationtype.fade, // Use Animationtype.fade for Fade animations
  decoration: InputDecoration(
    prefixIcon: Icon(Icons.search),
    border: OutlineInputBorder(
      borderSide: BorderSide(color: Colors.red, width: 2,
      ),
      borderRadius: BorderRadius.circular(4),
    ),
    focusedBorder: OutlineInputBorder(
      borderSide: BorderSide(color: Colors.black, width: 2,
      ),
      borderRadius: BorderRadius.circular(4),
    ),
    contentPadding: EdgeInsets.all(12),
  ),
  hintTexts: [
    'Search for "Bengaluru"',
    'Search for "Mumbai"',
    'Search for "Chennai"',
  ],
);

Typer

AnimatedTextField(
  animationType: Animationtype.typer, // Use Animationtype.typer for Type Write Style animations
  hintTextStyle: const TextStyle(
    color: Colors.deepPurple,
    overflow: TextOverflow.ellipsis,
  ),
  hintTexts: const [
    'How is the weather today?',
    'Will it rain today?',
    'What is the temperature',
  ],
  decoration: InputDecoration(
    suffixIcon: const Icon(Icons.search),
    filled: true,
    border: OutlineInputBorder(
      borderSide: const BorderSide(color: Colors.red, width: 2),
      borderRadius: BorderRadius.circular(25),
    ),
    focusedBorder: OutlineInputBorder(
      borderSide: const BorderSide(color: Colors.black, width: 2),
      borderRadius: BorderRadius.circular(25),
    ),
    contentPadding: const EdgeInsets.all(12),
  ),
);
💡 Tip

Use staticHintText when part of the hint should stay fixed while only the animated part changes:

AnimatedTextField(
  staticHintText: 'Search for ',
  hintTexts: const ['Bengaluru', 'Mumbai', 'Chennai'],
);

For suffix-style hints, set staticHintTextPosition:

AnimatedTextField(
  staticHintText: ' nearby',
  staticHintTextPosition: StaticHintTextPosition.suffix,
  hintTexts: const ['Cafe', 'Hotel', 'Restaurant'],
);

By default, the animated hint text can span multiple lines if the text is long. If you want to keep the hint on a single line and show overflow with ellipses (...), set the overflow property in hintTextStyle:

hintTextStyle: TextStyle(
  overflow: TextOverflow.ellipsis,
),

Contributors


Deekshith Shetty

Torregrossa François

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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

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