Motion constructor

const Motion({
  1. Key? key,
  2. MotionController? controller,
  3. required Widget child,
  4. GlareConfiguration? glare = const GlareConfiguration(),
  5. ShadowConfiguration? shadow = const ShadowConfiguration(),
  6. TranslationConfiguration? translation = const TranslationConfiguration(),
  7. BorderRadius? borderRadius,
  8. 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);