animated_dropdown_button 1.0.0 copy "animated_dropdown_button: ^1.0.0" to clipboard
animated_dropdown_button: ^1.0.0 copied to clipboard

outdated

A beautiful animated dropdown button.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Animated Dropdown Button Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'ANIMATED DROPDOWN BUTTON DEMO'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final AnimatedDropdownButtonController animalsController = AnimatedDropdownButtonController(
    items: [
      'Cat',
      'Dog',
      'Bird',
      'Cat',
      'Dog',
    ],
    initialValue: 'Dog',
  );

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: SingleChildScrollView(
          child: Column(
            children: <Widget>[
              const SizedBox(height: 50),
              AnimatedDropdownButton(
                controller: animalsController,
                backgroundColor: Colors.red,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
2
likes
0
points
55
downloads

Publisher

unverified uploader

Weekly Downloads

A beautiful animated dropdown button.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on animated_dropdown_button