animated_styled_widget
0.5.1, released 3 weeks ago by wenkaifan.com
Serializable CSS-inspired styles with implicit and explicit animations for custom widgets.
What it does
Provides a Style class and widgets like StyledContainer and AnimatedStyledContainer to design customizable UI components with CSS-like properties. It supports implicit animations, local and global explicit animations, and non-Material styled components such as buttons, switches, and sliders.
AI-written summary of version 0.5.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want CSS-like styling and powerful animations for containers and custom components.
- You need non-Material styled widgets like custom buttons, switches, sliders, and checkboxes.
- You require explicit scroll-based, visibility-based, or preset animations.
Skip it when
- You strictly want to rely on the standard Material Design widget library and theming system.
- You need a dedicated layout framework without custom styling engines.
Strengths
- Comprehensive style properties including dimensions, morphable shapes, shadows, and matrix transformations.
- Supports both implicit and advanced explicit animations with triggers like scroll and visibility.
- Includes a variety of styled UI components that can transition smoothly between states.
Weaknesses
- Steeper learning curve if you are not familiar with the package's specific style and animation sequence classes.
- The interface for certain components (like sliders) may change in future updates.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 6
none
Style style = Style(
alignment: Alignment.center,
width: 50.toVWLength,
height: 50.toPercentLength,
backgroundDecoration: BoxDecoration(
gradient: LinearGradient(colors: [Colors.cyanAccent, Colors.purpleAccent]),
),
);
Widget widget = StyledContainer(
style: style,
child: Text('Hello'),
);Alternatives
Packages that do the same job and could replace animated_styled_widget.
- mesh
Fast and customizable animated mesh gradients for Flutter applications.
89Compare - animate_gradient
Creates animated gradient backgrounds with customizable colors and alignments.
59Compare - flutter_animate
Add animated effects and builders in Flutter via a unified, customizable chainable API.
70Compare - siri_wave
Create visually stunning Siri-style waveforms in Flutter.
67Compare
Works with
Packages commonly used together with animated_styled_widget: ones it builds on, ones built on it, and its own family.
- tupleanimated_styled_widget depends on itProvides immutable tuple classes for grouping values.
- provideranimated_styled_widget depends on itA lightweight wrapper around InheritedWidget for state management
- simple_animationsanimated_styled_widget depends on itCreate custom animations and staggered property tweens in stateless widgets.
- flutter_class_parseranimated_styled_widget depends on itSerialize and deserialize common Flutter UI data classes and widgets.
- dimensionanimated_styled_widget depends on itMimics CSS length units (px, percentage, vw, vh, vmin, vmax) for responsive Flutter layouts.
- morphable_shapeanimated_styled_widget depends on itCreate responsive shapes and morph between them in Flutter.
- animated_box_decorationSame familySmoothly animate between any two BoxDecoration including colors, gradients, and images.
- responsive_propertySame familyResponsive values and widgets based on screen size using ScreenScope and Responsive classes