You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install a fresh version of JAWT (delete data before).
create a simple workout with for example one exercise
start the workout
--> workout runner screen turns grey
The following exception is thrown:
======== Exception caught by widgets library =======================================================
The following assertion was thrown building Builder:
Failed assertion: boolean expression must not be null
The relevant error-causing widget was:
MaterialApp file:///home/oxq/StudioProjects/just_another_workout_timer/lib/main.dart:21:41
When the exception was thrown, this was the stack:
#0 _WorkoutPageState.buildTimetable.<anonymous closure>.<anonymous closure> (package:just_another_workout_timer/workout_runner.dart:184:54)
#1 ListMapView.forEach (dart:_internal/list.dart:242:8)
#2 _WorkoutPageState.buildTimetable.<anonymous closure> (package:just_another_workout_timer/workout_runner.dart:128:31)
#3 ListMapView.forEach (dart:_internal/list.dart:242:8)
#4 _WorkoutPageState.buildTimetable (package:just_another_workout_timer/workout_runner.dart:124:27)
...
====================================================================================================
The problem is that some SharedPreferences values (in this case 'halftime') are not set yet and are therefore null. The assertion in workout_runner.dart:184 then throws the exception.
This could be solved by adding a if null operator (??) but I think the cleanest solution is setting the default values in the main() method as done in my pull request.
Kind regards
oxq
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
--> workout runner screen turns grey
The following exception is thrown:
The problem is that some SharedPreferences values (in this case 'halftime') are not set yet and are therefore null. The assertion in workout_runner.dart:184 then throws the exception.
This could be solved by adding a if null operator (??) but I think the cleanest solution is setting the default values in the main() method as done in my pull request.
Kind regards
oxq
The text was updated successfully, but these errors were encountered: