TF-528 Apply linter for some widget

This commit is contained in:
dab246
2022-05-04 11:15:37 +07:00
committed by Dat H. Pham
parent dbbc13eab4
commit 4088c88649
35 changed files with 198 additions and 223 deletions
@@ -20,14 +20,14 @@ abstract class BaseMailboxController extends BaseController {
List<PresentationMailbox> allMailboxes = <PresentationMailbox>[];
Future buildTree(List<PresentationMailbox> allMailbox) async {
this.allMailboxes = allMailbox;
allMailboxes = allMailbox;
final tupleTree = await _treeBuilder.generateMailboxTreeInUI(allMailbox);
defaultMailboxTree.value = tupleTree.value1;
folderMailboxTree.value = tupleTree.value2;
}
Future refreshTree(List<PresentationMailbox> allMailbox) async {
this.allMailboxes = allMailbox;
allMailboxes = allMailbox;
final tupleTree = await _treeBuilder.generateMailboxTreeInUIAfterRefreshChanges(
allMailbox, defaultMailboxTree.value, folderMailboxTree.value);
defaultMailboxTree.firstRebuild = true;
@@ -5,7 +5,7 @@ import 'package:flutter/cupertino.dart';
mixin AppLoaderMixin {
Widget get loadingWidget {
return Center(child: SizedBox(
return const Center(child: SizedBox(
width: 24,
height: 24,
child: CupertinoActivityIndicator(color: AppColor.colorLoading)));
@@ -21,7 +21,7 @@ mixin MessageDialogActionMixin {
if (_responsiveUtils.isMobile(context)) {
(ConfirmationDialogActionSheetBuilder(context)
..messageText(message)
..styleConfirmButton(TextStyle(fontSize: 20, fontWeight: FontWeight.normal, color: Colors.black))
..styleConfirmButton(const TextStyle(fontSize: 20, fontWeight: FontWeight.normal, color: Colors.black))
..onCancelAction(AppLocalizations.of(context).cancel, () => popBack())
..onConfirmAction(actionName, () {
popBack();
@@ -32,20 +32,20 @@ mixin MessageDialogActionMixin {
context: context,
barrierColor: AppColor.colorDefaultCupertinoActionSheet,
builder: (BuildContext context) => PointerInterceptor(child: (ConfirmDialogBuilder(_imagePaths)
..key(Key('confirm_dialog_action'))
..key(const Key('confirm_dialog_action'))
..title(title ?? '')
..content(message)
..addIcon(icon)
..colorConfirmButton(AppColor.colorTextButton)
..colorCancelButton(AppColor.colorCancelButton)
..paddingTitle(icon != null ? EdgeInsets.only(top: 34) : EdgeInsets.zero)
..paddingTitle(icon != null ? const EdgeInsets.only(top: 34) : EdgeInsets.zero)
..marginIcon(EdgeInsets.zero)
..paddingContent(EdgeInsets.only(left: 44, right: 44, bottom: 24, top: 8))
..paddingButton(hasCancelButton ? null : EdgeInsets.only(bottom: 16, left: 44, right: 44))
..styleTitle(TextStyle(fontSize: 20, fontWeight: FontWeight.bold, color: Colors.black))
..styleContent(TextStyle(fontSize: 14, fontWeight: FontWeight.normal, color: AppColor.colorContentEmail))
..styleTextCancelButton(TextStyle(fontSize: 17, fontWeight: FontWeight.w500, color: AppColor.colorTextButton))
..styleTextConfirmButton(TextStyle(fontSize: 17, fontWeight: FontWeight.w500, color: Colors.white))
..paddingContent(const EdgeInsets.only(left: 44, right: 44, bottom: 24, top: 8))
..paddingButton(hasCancelButton ? null : const EdgeInsets.only(bottom: 16, left: 44, right: 44))
..styleTitle(const TextStyle(fontSize: 20, fontWeight: FontWeight.bold, color: Colors.black))
..styleContent(const TextStyle(fontSize: 14, fontWeight: FontWeight.normal, color: AppColor.colorContentEmail))
..styleTextCancelButton(const TextStyle(fontSize: 17, fontWeight: FontWeight.w500, color: AppColor.colorTextButton))
..styleTextConfirmButton(const TextStyle(fontSize: 17, fontWeight: FontWeight.w500, color: Colors.white))
..onConfirmButtonAction(actionName, () {
popBack();
onConfirmAction.call();
@@ -15,17 +15,17 @@ mixin NetworkConnectionMixin {
color: Colors.white,
borderRadius: BorderRadius.circular(16)),
width: 320,
margin: EdgeInsets.only(bottom: 100),
margin: const EdgeInsets.only(bottom: 100),
child: Material(
elevation: 8,
shape: RoundedRectangleBorder(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(16.0)),
),
child: ListTile(
leading: SvgPicture.asset(_imagePaths.icNotConnection),
title: Text(
AppLocalizations.of(context).no_internet_connection,
style: TextStyle(fontSize: 15, color: Colors.black)),
style: const TextStyle(fontSize: 15, color: Colors.black)),
)
)
);