WT1.1.3 logo change, error fixes
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:aitrainer_app/model/exercise.dart';
|
||||
import 'package:aitrainer_app/repository/exercise_repository.dart';
|
||||
import 'package:bloc/bloc.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flurry/flurry.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
part 'exercise_log_event.dart';
|
||||
@@ -14,17 +15,22 @@ class ExerciseLogBloc extends Bloc<ExerciseLogEvent, ExerciseLogState> {
|
||||
@override
|
||||
ExerciseLogBloc({this.exerciseRepository}) : super(ExerciseLogInitial());
|
||||
|
||||
|
||||
@override
|
||||
Stream<ExerciseLogState> mapEventToState(ExerciseLogEvent event) async* {
|
||||
try {
|
||||
if (event is ExerciseLogLoad) {
|
||||
yield ExerciseLogLoading();
|
||||
Flurry.logEvent("exerciseLog");
|
||||
yield ExerciseLogReady();
|
||||
} else if ( event is ExerciseLogDelete ) {
|
||||
} else if (event is ExerciseLogDelete) {
|
||||
yield ExerciseLogLoading();
|
||||
exerciseRepository.exerciseList.remove(event.exercise);
|
||||
await exerciseRepository.deleteExercise(event.exercise);
|
||||
Flurry.logEvent("exerciseDelete");
|
||||
yield ExerciseLogReady();
|
||||
} else if (event is ExerciseResult) {
|
||||
yield ExerciseLogLoading();
|
||||
Flurry.logEvent("exerciseResult");
|
||||
yield ExerciseLogReady();
|
||||
}
|
||||
} on Exception catch (e) {
|
||||
|
||||
@@ -18,5 +18,8 @@ class ExerciseLogDelete extends ExerciseLogEvent {
|
||||
|
||||
@override
|
||||
List<Object> get props => [exercise];
|
||||
}
|
||||
|
||||
class ExerciseResult extends ExerciseLogEvent {
|
||||
const ExerciseResult();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user