CloudConfig constructor
- @JsonSerializable(converters: [ColorSerializer()])
const
CloudConfig(
{ - @Default(250.0) double size,
- @Default(Color.fromARGB(170, 255, 255, 255)) Color color,
- @Default(Icons.cloud_rounded) @JsonKey(ignore: true) IconData icon,
- @JsonKey(ignore: true) Widget? widgetCloud,
- @Default(70.0) double x,
- @Default(5.0) double y,
- @Default(1.0) double scaleBegin,
- @Default(1.1) double scaleEnd,
- @Default(Curves.fastOutSlowIn) @JsonKey(ignore: true) Curve scaleCurve,
- @Default(11.0) double slideX,
- @Default(5.0) double slideY,
- @Default(2000) int slideDurMill,
- @Default(Curves.fastOutSlowIn) @JsonKey(ignore: true) Curve slideCurve,
})
Implementation
@JsonSerializable(converters: [ColorSerializer()])
const factory CloudConfig({
/// Cloud size.
@Default(250.0) double size,
/// The color of the cloud.
@Default(Color.fromARGB(170, 255, 255, 255)) Color color,
/// Cloud icon. You can use a custom widget [widgetCloud].
@Default(Icons.cloud_rounded) @JsonKey(ignore: true) IconData icon,
/// Specify the cloud widget. In this case, the fields [icon] and
/// [color] be ignored.
@JsonKey(ignore: true) Widget? widgetCloud,
/// The coordinate of cloud displacement along the x-axis (in pixels).
@Default(70.0) double x,
/// The coordinate of cloud displacement along the x-axis (in pixels).
@Default(5.0) double y,
/// The scale factor of the widget at the beginning of the animation.
@Default(1.0) double scaleBegin,
/// The scale factor of the widget at the end of the animation.
@Default(1.1) double scaleEnd,
/// Animation curve for [ScaleTransition].
@Default(Curves.fastOutSlowIn) @JsonKey(ignore: true) Curve scaleCurve,
/// Offset of the widget along the X-axis during the slide animation (in pixels).
@Default(11.0) double slideX,
/// Offset of the widget along the Y-axis during the slide animation (in pixels).
@Default(5.0) double slideY,
/// Shift duration (in milliseconds).
@Default(2000) int slideDurMill,
/// Animation curve for [SlideTransition].
@Default(Curves.fastOutSlowIn) @JsonKey(ignore: true) Curve slideCurve,
}) = _CloudConfig;