forked from eatvio/eatvio_app
23 lines
757 B
Dart
23 lines
757 B
Dart
import 'package:equatable/equatable.dart';
|
|
import 'package:flutter/material.dart';
|
|
import '/core/app_export.dart';
|
|
import 'package:eatvio_app/presentation/registration/height_screen/models/height_model.dart';
|
|
part 'height_event.dart';
|
|
part 'height_state.dart';
|
|
|
|
/// A bloc that manages the state of a Height according to the event that is dispatched to it.
|
|
class HeightBloc extends Bloc<HeightEvent, HeightState> {
|
|
HeightBloc(HeightState initialState) : super(initialState) {
|
|
on<HeightInitialEvent>(_onInitialize);
|
|
}
|
|
|
|
_onInitialize(
|
|
HeightInitialEvent event,
|
|
Emitter<HeightState> emit,
|
|
) async {
|
|
emit(state.copyWith(
|
|
heightModelObj: state.heightModelObj?.copyWith(),
|
|
heightController: state.heightController));
|
|
}
|
|
}
|