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

View File

@@ -23,7 +23,7 @@ class AdditionalInformationScreen extends StatelessWidget {
create: (context) =>
AdditionalInformationBloc(AdditionalInformationState(additionalInformationModelObj: AdditionalInformationModel(userRegistrationSheet: sheet)))
..add(AdditionalInformationInitialEvent()),
child: AdditionalInformationScreen());
child: AdditionalInformationScreen(),);
}
@override
@@ -42,11 +42,11 @@ class AdditionalInformationScreen extends StatelessWidget {
decoration: BoxDecoration(
color: theme.colorScheme.onPrimary,
borderRadius: BorderRadius.circular(8.h),
border: Border.all(color: theme.colorScheme.primary, width: 1.h)),
border: Border.all(color: theme.colorScheme.primary, width: 1.h),),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.h),
child: LinearProgressIndicator(
value: 1, backgroundColor: theme.colorScheme.onPrimary, valueColor: AlwaysStoppedAnimation<Color>(appTheme.blueA400)))),
value: 1, backgroundColor: theme.colorScheme.onPrimary, valueColor: AlwaysStoppedAnimation<Color>(appTheme.blueA400),),),),
SizedBox(height: 20.v),
SizedBox(height: 73.v),
_buildTextFormField(context),
@@ -56,9 +56,9 @@ class AdditionalInformationScreen extends StatelessWidget {
text: "finish".tr.toUpperCase(),
margin: EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
onPressed: onTapFinish(state, context));
}),
])));
onPressed: onTapFinish(state, context),);
},),
],),),);
}
onTapFinish(AdditionalInformationState state, BuildContext context) {
@@ -67,7 +67,7 @@ class AdditionalInformationScreen extends StatelessWidget {
sheet.additionalInfo = state.editTextController!.text;
final response = await http.post(Uri.parse(dotenv.env['SERVER_ROOT']! + '/register'),
headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}, body: jsonEncode(sheet.toJson()), encoding: utf8);
headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}, body: jsonEncode(sheet.toJson()), encoding: utf8,);
var res = await jsonDecode(response.body);
if (response.statusCode == 200) {
@@ -88,7 +88,7 @@ class AdditionalInformationScreen extends StatelessWidget {
leading:
AppbarLeadingImage(imagePath: ImageConstant.imgArrowLeft, margin: EdgeInsets.only(left: 18.h, top: 15.v, bottom: 15.v), onTap: onTapBack(context)),
centerTitle: true,
title: AppbarTitleImage(imagePath: ImageConstant.imgLogoEatvio));
title: AppbarTitleImage(imagePath: ImageConstant.imgLogoEatvio),);
}
onTapBack(BuildContext context) {
@@ -110,7 +110,7 @@ class AdditionalInformationScreen extends StatelessWidget {
width: 294.h,
margin: EdgeInsets.only(left: 24.h, right: 23.h),
child: Text("enter_additional_information".tr,
maxLines: 2, overflow: TextOverflow.ellipsis, textAlign: TextAlign.center, style: CustomTextStyles.titleMediumSegoeUI)),
maxLines: 2, overflow: TextOverflow.ellipsis, textAlign: TextAlign.center, style: CustomTextStyles.titleMediumSegoeUI,),),
SizedBox(height: 10.v),
BlocSelector<AdditionalInformationBloc, AdditionalInformationState, TextEditingController?>(
selector: (state) => state.editTextController,
@@ -119,10 +119,10 @@ class AdditionalInformationScreen extends StatelessWidget {
controller: editTextController,
hintText: "У меня крепкое здоровье, но последнее время часто утомляюсь, однако, это мне не мешает радоваться жизни",
textInputAction: TextInputAction.done,
maxLines: 8);
})
]))
]));
maxLines: 8,);
},),
],),),
],),);
}
/// Navigates to the previous screen.
@@ -139,7 +139,7 @@ class AdditionalInformationScreen extends StatelessWidget {
title: const Text('Ошибка'),
content: Text(text),
actions: [TextButton(onPressed: onTapOk(context), child: const Text('Ok'))],
));
),);
}
onTapOk(BuildContext context) {