skip to Main Content

Flutter BLoC structure

I have a nested data structure like this: User |-List<WorkoutPlan> |-List<Workout> |-List<Exercise> Each list is saved on a different json file: -user.json with the list workout plans’ ids -workoutPlans.json: Each workout plan has a list of workouts’ id -workouts.json For…

VIEW QUESTION

LateInitializationError hive using bloc – Flutter

======== Exception caught by widgets library ======================================================= The following LateError was thrown building KeyedSubtree-[GlobalKey#74540]: LateInitializationError: Field '_persondb' has not been initialized. The relevant error-causing widget was: Scaffold Scaffold:file:///C:/Users/Prive/StudioProjects/tanja/lib/person/screens/personsScreen/personsSreen.dart:18:16 When the exception was thrown, this was the stack: C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49 throw…

VIEW QUESTION

Unsupported operation: Cannot add to an unmodifiable list unsing Bloc – Flutter

i am using bloc to add and remove from am list.. my bloc state is like this, @freezed class InterestActionState with _$InterestActionState { factory InterestActionState({ required bool isSubmitting, required List<String> selectedInterest, required Option<Either<InterestFailure, Unit>> intrestFailureOrSuccessOption, }) = Initial; factory InterestActionState.initial()…

VIEW QUESTION
Back To Top
Search