split_dropdown_button 1.0.0+4
split_dropdown_button: ^1.0.0+4 copied to clipboard
Multi Purpose Button.
split_dropdown_button #
A customizable Flutter widget that separates the main button tap and dropdown action β ideal for adding more control to your dropdowns.
β¨ Features #
- π Split tap and dropdown behavior
- π― Customizable child widget
- π» Supports Android, iOS, and Web
- π§± Easy to integrate into existing UIs
π¦ Installation #
Add this to your pubspec.yaml
:
dependencies:
split_dropdown_button: ^1.0.0
Quick Example #
π Quick Example
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:split_dropdown_button/Button.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Split Dropdown Example')),
body: Center(
child: SplitDropdownButton(
prefixIcon: const Icon(Icons.ac_unit),
suffixIcon: const Icon(
Icons.keyboard_arrow_down_rounded,
color: Colors.white,
),
options: const ['Apple', 'Banana', 'Cherry'],
onSelected: (value) {
log('Selected value: $value');
},
onMainButtonPressed: (val) {
log(val);
},
),
),
),
);
}
}
π€ Contributing
Found a bug or want to improve this? PRs and issues are welcome. Letβs build together. π