Motion constructor
const
Motion({
- Key? key,
- MotionController? controller,
- required Widget child,
- GlareConfiguration? glare = const GlareConfiguration(),
- ShadowConfiguration? shadow = const ShadowConfiguration(),
- TranslationConfiguration? translation = const TranslationConfiguration(),
- BorderRadius? borderRadius,
- FilterQuality? filterQuality = defaultFilterQuality,
Creates a Motion widget with the given child
and controller
, applying all of the default effects.
The controller
can be used to create a unique controller for each widget.
When omitted, the default controller is used. It is a shared instance that will apply the same rotation to all widgets. If multiple Motion widgets are displayed at the same time, they should have unique controllers.
You may provide a custom glare
, shadow
and translation
configuration to override the default effects.
An optional borderRadius
can be provided to apply a border radius to the widget.
Implementation
const Motion({
Key? key,
this.controller,
required this.child,
this.glare = const GlareConfiguration(),
this.shadow = const ShadowConfiguration(),
this.translation = const TranslationConfiguration(),
this.borderRadius,
this.filterQuality = defaultFilterQuality,
}) : super(key: key);