flutter_rounded_dropdown 0.0.1 copy "flutter_rounded_dropdown: ^0.0.1" to clipboard
flutter_rounded_dropdown: ^0.0.1 copied to clipboard

A new Flutter package for a rounded dropdown.

Flutter RoundedDropDown #

pub package License: MIT

A Flutter package with custom implementation of the DrownDown with Soft corner/Rounded

🌟 Getting Started #

To start using this package, add flutter_rounded_dropdown dependency to your pubspec.yaml

dependencies:
  flutter_rounded_dropdown: "<latest_release>"

📌 Simple Example #

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Rounded DropDown Example'),
    );
  }
}

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 List<String> dropDownItems = ['India', 'America', 'China', 'Australia'];
  final String initialDropDownValue = 'India';
  String? selectedValue = '';

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(18.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: <Widget>[
              RoundedDropDown(
                  dropDownItems: dropDownItems,
                  initialDropDownValue: initialDropDownValue,
                  onValueChanged: (String value) {
                    setState(() {
                      selectedValue = value;
                    });
                  }),
              Text(
                '$selectedValue',
                style: Theme.of(context).textTheme.headlineMedium,
              ),
            ],
          ),
        ),
      ),
    );
  }
}

📝 Documentation #

    RoundedDropDown(
                  dropDownItems: ['India', 'America', 'China', 'Australia'],
                  initialDropDownValue: 'India',
                  onValueChanged: (String value) {
                   print('selected value is $value')
                  }),

Screens #

screenshot screenshot screenshot

Issues #

Please file any issues, bugs or feature request as an issue on our GitHub page.

Want to contribute #

If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature)send us your pull request.

2
likes
140
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter package for a rounded dropdown.

Repository (GitHub)

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on flutter_rounded_dropdown