feat(chat): add trailing comma rules

This commit is contained in:
mso7nueh
2024-06-25 16:05:55 +03:00
parent 6ea4a23ad6
commit b1b6ffe0f3
120 changed files with 549 additions and 546 deletions

File diff suppressed because one or more lines are too long

View File

@@ -10,7 +10,7 @@ class PlanCreateScreen extends StatelessWidget {
final planID = ModalRoute.of(context)!.settings.arguments;
return BlocProvider<PlanCreateBloc>(
create: (context) => PlanCreateBloc(PlanCreateState(planModelObj: PlanCreateModel(planID: planID.toString())))..add(PlanCreateInitialEvent()),
child: PlanCreateScreen());
child: PlanCreateScreen(),);
}
Widget build(BuildContext context) {
@@ -81,9 +81,9 @@ class PlanCreateScreen extends StatelessWidget {
ElevatedButton(
onPressed: () => context.read<PlanCreateBloc>().add(CreatePlan()),
child: Text('Создать'),
)
]),
)
),
],),
),
],
),
),

View File

@@ -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 {
// Один или несколько ключевых полей отсутствуют, обрабатываем ошибку

View File

@@ -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;

View File

@@ -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('Сохранить'),
)
),
],
),
)
),
],
),
),

View File

@@ -47,12 +47,12 @@ class PlanSelectBloc extends Bloc<PlanSelectEvent, PlanSelectState> {
emit((currentState).copyWith(
posts: data,
myProfileModelObj: currentState.myProfileModelObj,
));
),);
} else {
print('Got unloaded');
emit(PlanSelectLoadedState(
posts: data,
));
),);
}
} else {
// Один или несколько ключевых полей отсутствуют, обрабатываем ошибку

View File

@@ -13,7 +13,7 @@ import 'package:flutter/material.dart';
class PlanSelectScreen extends StatelessWidget {
static Widget builder(BuildContext context) {
return BlocProvider<PlanSelectBloc>(
create: (context) => PlanSelectBloc(PlanSelectState(myProfileModelObj: PlanSelectModel()))..add(PlanSelectInitialEvent()), child: PlanSelectScreen());
create: (context) => PlanSelectBloc(PlanSelectState(myProfileModelObj: PlanSelectModel()))..add(PlanSelectInitialEvent()), child: PlanSelectScreen(),);
}
Widget build(BuildContext context) {
@@ -95,14 +95,14 @@ class PlanSelectScreen extends StatelessWidget {
onTap: () => GoRouter.of(context).goNamed('planCreateScreen'),
child: Icon(Icons.create_outlined),
),
)
),
],
),
),
),
),
SizedBox(height: 20),
_buildPlanList(context, state)
_buildPlanList(context, state),
],
),
),

View File

@@ -14,7 +14,7 @@ class PlanScreen extends StatelessWidget {
static Widget builder(BuildContext context) {
final planID = ModalRoute.of(context)!.settings.arguments;
return BlocProvider<PlanBloc>(
create: (context) => PlanBloc(PlanState(planModelObj: PlanModel(planID: planID.toString())))..add(PlanInitialEvent()), child: PlanScreen());
create: (context) => PlanBloc(PlanState(planModelObj: PlanModel(planID: planID.toString())))..add(PlanInitialEvent()), child: PlanScreen(),);
}
Widget build(BuildContext context) {
@@ -104,9 +104,9 @@ class PlanScreen extends StatelessWidget {
child: Text('Удалить'),
),
],
)
]),
)
),
],),
),
],
),
),