Skip to content

iamdipanshusingh/flutter_animated_hint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Animated Hint

License Version

Screen-Recording-2024-10-03-at-5 26 49 AM

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 animate
    • hints: List of hints to be animated
    • animationType: type of animation to be used for hints by default, [AnimationType.slide] will be used
    • fixedHintTextStyle: style for fixed hint text if null, default [style] will be used
    • hintTextStyle: 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

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. 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.

About

A flutter package that animates the TextField hint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published