diff --git a/example/lib/non_tc_screen.dart b/example/lib/non_tc_screen.dart index 93237c3..9a2fb00 100644 --- a/example/lib/non_tc_screen.dart +++ b/example/lib/non_tc_screen.dart @@ -380,7 +380,9 @@ class _HomePageState extends State { if (streamSubscription != null) { streamSubscription.cancel(); } - _timer.cancel(); + if (_timer != null) { + _timer.cancel(); + } super.dispose(); } }