패키지, 저장소 및 앱 카테고리 검색

animated_hint_textfield 표지
패키지 상세v1.3.0

animated_hint_textfield

텍스트 필드 힌트/레이블 텍스트를 애니메이션화하는 Flutter 패키지로 사용자 경험을 향상시키기 위해 동적이고 눈에 띄는 전환 효과를 추가합니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
3.5천
좋아요
107
Pub 점수
160

패키지 설치

flutter pub add animated_hint_textfield

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

텍스트 필드의 힌트 또는 레이블 텍스트를 애니메이션 처리하는 플러터 패키지로, 필드가 포커스되었을 때 또는 포커스를 잃었을 때 부드럽고 동적인 전환 효과를 생성합니다. 미세한 애니메이션을 통해 시각적 피드백을 제공하여 사용자 경험을 향상시키고, 입력 필드를 더 매력적이고 직관적으로 만듭니다. 디자인과 상호작용이 중요한 현대적인 UI에 적합합니다. 이 패키지는 Android, iOS, 웹, macOS, Windows, Linux 등 여러 플랫폼을 지원하며, 다양한 기기에서 일관된 동작을 보장합니다.

사용 사례

  • 시각적 피드백을 통한 폼 입력 개선
  • 현대적이고 상호작용 가능한 로그인 화면 만들기
  • 모바일 및 웹 애플리케이션의 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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.