An animated toggle switch which can be fully customized with desired width, colors, text, corner radius, animation etc. It also maintains selection state.
Getting Started
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies: ... switch_up:latest_version
Import it:
import'package:switch_up/switch_up.dart';
Usage Examples
// Here, default theme color are used for selected item.SwitchUp<String>(
backgroundColor: Colors.grey.shade200,
items: const <String>['Home', 'Chat', 'Settings'],
onChanged: (String value) {
print(value);
},
value: 'Settings',
),