anim_search_bar 2.0.3 copy "anim_search_bar: ^2.0.3" to clipboard
anim_search_bar: ^2.0.3 copied to clipboard

A flutter package that has an animated search bar with loads of customization

example/main.dart

import 'package:anim_search_bar/anim_search_bar.dart';
import 'package:flutter/material.dart';

void main() async {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Anim search bar Example',
      home: App(),
    );
  }
}

class App extends StatefulWidget {
  @override
  _AppState createState() => _AppState();
}

class _AppState extends State<App> {
  TextEditingController textController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.only(top: 58.0, right: 10, left: 10),

      /// In AnimSearchBar widget, the width, textController, onSuffixTap are required properties.
      /// You have also control over the suffixIcon, prefixIcon, helpText and animationDurationInMilli
      child: AnimSearchBar(
        width: 400,
        textController: textController,
        onSuffixTap: () {
          setState(() {
            textController.clear();
          });
        },
      ),
    );
  }
}
351
likes
120
pub points
95%
popularity

Publisher

verified publishergokula.dev

A flutter package that has an animated search bar with loads of customization

Repository (GitHub)
View/report issues

License

(pending) (LICENSE)

Dependencies

flutter

More

Packages that depend on anim_search_bar