Skip to content

Commit 0809937

Browse files
committed
fixes tests
1 parent 430df5b commit 0809937

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

lib/src/animation_type_builder.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ class _AnimationTypeHoverBuilderState<T, V>
3131
final _builderKey = GlobalKey();
3232
T? _lastUnlistedValue;
3333

34+
@override
35+
void initState() {
36+
super.initState();
37+
if (!widget.properties.isCurrentListed) {
38+
_lastUnlistedValue = widget.properties.current;
39+
}
40+
}
41+
3442
@override
3543
void didUpdateWidget(covariant _AnimationTypeHoverBuilder<T, V> oldWidget) {
3644
super.didUpdateWidget(oldWidget);

lib/src/widgets/conditional_wrapper.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
// not covered because this widget is not used currently
12
part of 'package:animated_toggle_switch/animated_toggle_switch.dart';
23

4+
// coverage:ignore-start
35
class _ConditionalWrapper extends StatefulWidget {
46
final Widget Function(BuildContext context, Widget child) wrapper;
57
final bool condition;
@@ -25,6 +27,7 @@ class _ConditionalWrapperState extends State<_ConditionalWrapper> {
2527
return child;
2628
}
2729
}
30+
// coverage:ignore-end
2831

2932
class _EmptyWidget extends StatelessWidget {
3033
final Widget child;

0 commit comments

Comments
 (0)