animated_toggle
0.1.3, released 3 years ago by an unverified publisher
Custom animated toggle widget for Flutter
What it does
Provides horizontal and vertical animated toggle with customizable colors, padding, text styles, and callbacks.
AI-written summary of version 0.1.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need a simple animated toggle
- Require RTL support
- Want quick UI customization
- Need both horizontal and vertical variants
Skip it when
- Need complex state management
- Require extensive testing
- Need accessibility features beyond basic
Strengths
- Easy to integrate
- Highly customizable
- Supports RTL alignment
- Includes both horizontal and vertical styles
Weaknesses
- Limited documentation examples
- No unit tests
- No advanced accessibility support
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:animated_toggle/animated_toggle.dart';
AnimatedHorizontalToggle(
taps: const ['First', 'Second', 'Last'],
width: 300,
height: 48,
duration: const Duration(milliseconds: 300),
initialIndex: 0,
background: Colors.black.withOpacity(0.1),
activeColor: Colors.deepPurple,
activeTextStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white),
inActiveTextStyle: const TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Colors.deepPurple),
horizontalPadding: 4,
verticalPadding: 4,
activeHorizontalPadding: 2,
activeVerticalPadding: 4,
radius: 14,
activeButtonRadius: 14,
onChange: (int currentIndex, int targetIndex) {},
showActiveButtonColor: true,
local: 'en',
);Alternatives
Packages that do the same job and could replace animated_toggle.
- flutter_smart_dialog
An elegant Flutter dialog, toast, and loading solution without needing BuildContext.
91Compare - custom_refresh_indicator
Widget that makes it easy to implement a custom pull to refresh gesture.
81Compare - full_screen_menu
Full screen overlay menu for Flutter apps with customized items and gradients.
74Compare - dropdown_flutter
Customizable dropdown with search, multi‑select, and built‑in validation
72Compare
Works with
Packages commonly used together with animated_toggle: ones it builds on, ones built on it, and its own family.