mirror of
https://github.com/gskinnerTeam/flutter-wonderous-app.git
synced 2025-05-17 21:05:59 +08:00
Restored custom time. Added $styles.times to cloud animation.
This commit is contained in:
@ -43,6 +43,9 @@ class AppStyle {
|
||||
/// Animation Durations
|
||||
late final _Times times = _Times(disableAnimations);
|
||||
|
||||
// Custom durations / delays
|
||||
late final _CustomTime customTime = _CustomTime(disableAnimations);
|
||||
|
||||
/// Shared sizes
|
||||
late final _Sizes sizes = _Sizes();
|
||||
}
|
||||
@ -143,6 +146,12 @@ class _Times {
|
||||
late final Duration pageTransition = Duration(milliseconds: disabled ? 1 : 200);
|
||||
}
|
||||
|
||||
class _CustomTime {
|
||||
_CustomTime(this.disabled);
|
||||
final bool disabled;
|
||||
Duration ms(int ms) => Duration(milliseconds: disabled ? 1 : ms);
|
||||
}
|
||||
|
||||
@immutable
|
||||
class _Corners {
|
||||
late final double sm = 4;
|
||||
|
@ -21,7 +21,7 @@ class AnimatedClouds extends StatefulWidget with GetItStatefulWidgetMixin {
|
||||
class _AnimatedCloudsState extends State<AnimatedClouds> with SingleTickerProviderStateMixin, GetItStateMixin {
|
||||
late List<_Cloud> _clouds = [];
|
||||
List<_Cloud> _oldClouds = [];
|
||||
late final AnimationController _anim = AnimationController(vsync: this, duration: 1500.ms);
|
||||
late final AnimationController _anim = AnimationController(vsync: this, duration: $styles.customTime.ms(1500));
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
Reference in New Issue
Block a user