File tree Expand file tree Collapse file tree 6 files changed +13
-30
lines changed
Expand file tree Collapse file tree 6 files changed +13
-30
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class MyApp extends StatelessWidget {
3636 colorScheme: ColorScheme .fromSeed (
3737 brightness: Brightness .light,
3838 seedColor: Colors .blue,
39- background : const Color (0xFFF0F0F0 ),
39+ surface : const Color (0xFFF0F0F0 ),
4040 ),
4141 inputDecorationTheme: InputDecorationTheme (
4242 isDense: true ,
@@ -52,7 +52,7 @@ class MyApp extends StatelessWidget {
5252 colorScheme: ColorScheme .fromSeed (
5353 brightness: Brightness .dark,
5454 seedColor: Colors .blue,
55- background : const Color (0xFF0F0F0F ),
55+ surface : const Color (0xFF0F0F0F ),
5656 ),
5757 inputDecorationTheme: InputDecorationTheme (
5858 isDense: true ,
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ class _TagLineState extends State<TagLine> {
179179 Text (
180180 'We help you' ,
181181 style: GoogleFonts .robotoMono ().copyWith (
182- color: Theme .of (context).colorScheme.onBackground ,
182+ color: Theme .of (context).colorScheme.onSurface ,
183183 fontSize: 48 ,
184184 ),
185185 strutStyle: const StrutStyle (
@@ -334,7 +334,7 @@ class _TranslationState extends State<Translation> {
334334 Text (
335335 ', Stranger' ,
336336 style: GoogleFonts .sacramento ().copyWith (
337- color: Theme .of (context).colorScheme.onBackground ,
337+ color: Theme .of (context).colorScheme.onSurface ,
338338 fontSize: 56 ,
339339 ),
340340 strutStyle: const StrutStyle (
Original file line number Diff line number Diff line change @@ -109,6 +109,8 @@ class AnimatedGroup extends StatefulWidget {
109109 /// first time, but subsequent insertions should animate.
110110 final bool triggerAddImmediately;
111111
112+ /// Whether to disable swapping animations for the children when the order
113+ /// of the children changes.
112114 final bool noSwapping;
113115
114116 /// Creates an [AnimatedGroup] with the given parameters.
@@ -187,6 +189,8 @@ class AnimatedChild extends StatefulWidget {
187189 /// child.
188190 final bool useSnapshots;
189191
192+ /// Whether to disable swapping animations for the child when the order of
193+ /// the children changes.
190194 final bool noSwapping;
191195
192196 /// The builder that wraps the given [child] in a widget that animates the
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ class _RollingEffectWidgetState extends State<RollingEffectWidget> {
235235 widget.child! ,
236236 );
237237
238- late final oldRoll = FractionalTranslation (
238+ final oldRoll = FractionalTranslation (
239239 transformHitTests: false ,
240240 translation: slideOutOffset * widget.multiplier,
241241 child: oldChild == null
Original file line number Diff line number Diff line change @@ -25,30 +25,9 @@ extension ScrollPositionExt on ScrollPosition {
2525 bool get atEnd => pixels == maxScrollExtent;
2626}
2727
28+ /// Extension methods for [double] .
2829extension DoubleHelper on double ? {
29- double get clampUnderZero => this == null ? 0 : this ! < 0 ? 0 : this ! ;
30-
31- bool get zeroIsFalse => this == null ? false : this ! <= 0 ;
32-
33- bool get oneIsTrue => this == null ? true : this ! >= 1 ;
34-
35- bool get middlePointBool => this == null ? false : this ! >= 0.5 ;
36-
37- double get magnetize => this == null
38- ? 0
39- : this ! < 0.5
40- ? 0
41- : 1 ;
4230
43- double get magnetizeReverse => this == null
44- ? 1
45- : this ! < 0.5
46- ? 1
47- : 0 ;
48-
49- bool get isZero => this == null ? false : this ! == 0 ;
50-
51- bool get isOne => this == null ? false : this ! == 1 ;
52-
53- bool get isMiddlePoint => this == null ? false : this ! == 0.5 ;
31+ /// Clamps the value to be at least 0.
32+ double get clampUnderZero => this == null ? 0 : this ! < 0 ? 0 : this ! ;
5433}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ dependencies:
2525dev_dependencies :
2626 flutter_test :
2727 sdk : flutter
28- flutter_lints : ^3 .0.2
28+ flutter_lints : ^4 .0.0
2929
3030flutter :
3131
You can’t perform that action at this time.
0 commit comments