animated_hint 0.0.1 animated_hint: ^0.0.1 copied to clipboard
A flutter package that animates the TextField hint
Animated Hint #
Table of Contents #
Description #
The Animated Hint package allows you to animate the hint of a TextView effortlessly. This package provides a unique way to enhance the user experience by animating the hint, making your text input fields more interactive and visually appealing.
Getting Started #
Installation #
Add the package to your Flutter project by using the following command:
flutter pub add animated_hint
Usage #
To use the animated hint feature, simply replace your traditional TextView with the AnimatedHintTextField
widget.
import 'package:flutter/material.dart';
import 'package:animated_hint/animated_hint.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Animated Hint TextField Example')),
body: Center(
child: AnimatedHintTextField(
fixedHint: "Search",
hints: const ['\"Flights\"', '\"Accounts\"'],
animationType: AnimationType.slide,
),
),
),
);
}
}
API Reference #
AnimatedHintTextField #
- Properties:
fixedHint
: This part of hint will remain fixed and will not animatehints
: List of hints to be animatedanimationType
: type of animation to be used for hints by default, [AnimationType.slide] will be usedfixedHintTextStyle
: style for fixed hint text if null, default [style] will be usedhintTextStyle
: style for animated hint text if null, default [style] will be used
Contributing #
We welcome contributions! If you have any ideas or improvements, feel free to create an issue or submit a pull request.
Steps to Contribute #
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
License #
This project is licensed under the MIT License - see the LICENSE file for details.
Contact #
If you have any questions or need support, please create an issue on GitHub.
- Author: Dipanshu Singh
- GitHub: iamdipanshusingh
- Email: me@iamdipanshus.in