forked from eatvio/eatvio_app
feat(chat): add trailing comma rules
This commit is contained in:
@@ -49,13 +49,13 @@ class PlanEditBloc extends Bloc<PlanEditEvent, PlanEditState> {
|
||||
plan: currentState.plan,
|
||||
name: currentState.name,
|
||||
duration: currentState.duration,
|
||||
details: currentState.details));
|
||||
details: currentState.details,),);
|
||||
} else {
|
||||
emit(PlanEditLoadedState(
|
||||
plan: data,
|
||||
name: TextEditingController(text: data['name']),
|
||||
details: TextEditingController(text: data['details']),
|
||||
duration: TextEditingController(text: data['duration'].toString())));
|
||||
duration: TextEditingController(text: data['duration'].toString()),),);
|
||||
}
|
||||
} else {
|
||||
// Один или несколько ключевых полей отсутствуют, обрабатываем ошибку
|
||||
|
||||
@@ -23,7 +23,7 @@ class PlanEditState extends Equatable {
|
||||
|
||||
class PlanEditLoadedState extends PlanEditState {
|
||||
PlanEditLoadedState(
|
||||
{this.planModelObj, this.plan, this.name, this.details, this.duration});
|
||||
{this.planModelObj, this.plan, this.name, this.details, this.duration,});
|
||||
|
||||
PlanEditModel? planModelObj;
|
||||
Map<String, dynamic>? plan;
|
||||
|
||||
@@ -12,7 +12,7 @@ class PlanEditScreen extends StatelessWidget {
|
||||
final planID = ModalRoute.of(context)!.settings.arguments;
|
||||
return BlocProvider<PlanEditBloc>(
|
||||
create: (context) => PlanEditBloc(PlanEditState(planModelObj: PlanEditModel(planID: planID.toString())))..add(PlanEditInitialEvent()),
|
||||
child: PlanEditScreen());
|
||||
child: PlanEditScreen(),);
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
@@ -98,10 +98,10 @@ class PlanEditScreen extends StatelessWidget {
|
||||
ElevatedButton(
|
||||
onPressed: () => context.read<PlanEditBloc>().add(EditPlan()),
|
||||
child: Text('Сохранить'),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user