TF-1487 Apply linter rule
This commit is contained in:
@@ -78,9 +78,9 @@ abstract class BaseController extends GetxController
|
||||
return;
|
||||
}
|
||||
|
||||
final _appToast = Get.find<AppToast>();
|
||||
final _imagePaths = Get.find<ImagePaths>();
|
||||
final _responsiveUtils = Get.find<ResponsiveUtils>();
|
||||
final appToast = Get.find<AppToast>();
|
||||
final imagePaths = Get.find<ImagePaths>();
|
||||
final responsiveUtils = Get.find<ResponsiveUtils>();
|
||||
|
||||
String messageError = '';
|
||||
if (error is MethodLevelErrors) {
|
||||
@@ -92,19 +92,19 @@ abstract class BaseController extends GetxController
|
||||
}
|
||||
|
||||
if (messageError.isNotEmpty && currentContext != null && currentOverlayContext != null) {
|
||||
_appToast.showBottomToast(
|
||||
appToast.showBottomToast(
|
||||
currentOverlayContext!,
|
||||
messageError,
|
||||
leadingIcon: SvgPicture.asset(
|
||||
_imagePaths.icNotConnection,
|
||||
imagePaths.icNotConnection,
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: Colors.white,
|
||||
colorFilter: Colors.white.asFilter(),
|
||||
fit: BoxFit.fill),
|
||||
backgroundColor: AppColor.toastErrorBackgroundColor,
|
||||
textColor: Colors.white,
|
||||
textActionColor: Colors.white,
|
||||
maxWidth: _responsiveUtils.getMaxWidthToast(currentContext!));
|
||||
maxWidth: responsiveUtils.getMaxWidthToast(currentContext!));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ mixin MessageDialogActionMixin {
|
||||
Color? cancelButtonColor,
|
||||
}
|
||||
) {
|
||||
final _responsiveUtils = Get.find<ResponsiveUtils>();
|
||||
final _imagePaths = Get.find<ImagePaths>();
|
||||
final responsiveUtils = Get.find<ResponsiveUtils>();
|
||||
final imagePaths = Get.find<ImagePaths>();
|
||||
|
||||
if (_responsiveUtils.isMobile(context)) {
|
||||
if (responsiveUtils.isMobile(context)) {
|
||||
if (showAsBottomSheet) {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
@@ -38,13 +38,13 @@ mixin MessageDialogActionMixin {
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: true,
|
||||
builder: (BuildContext context) => PointerInterceptor(
|
||||
child: (ConfirmDialogBuilder(_imagePaths, showAsBottomSheet: true)
|
||||
child: (ConfirmDialogBuilder(imagePaths, showAsBottomSheet: true)
|
||||
..key(const Key('confirm_dialog_action'))
|
||||
..title(title ?? '')
|
||||
..content(message)
|
||||
..addIcon(icon)
|
||||
..margin(const EdgeInsets.symmetric(vertical: 42, horizontal: 16))
|
||||
..widthDialog(_responsiveUtils.getSizeScreenWidth(context))
|
||||
..widthDialog(responsiveUtils.getSizeScreenWidth(context))
|
||||
..colorConfirmButton(actionButtonColor ?? AppColor.colorTextButton)
|
||||
..colorCancelButton(cancelButtonColor ?? AppColor.colorCancelButton)
|
||||
..paddingTitle(icon != null ? const EdgeInsets.only(top: 24) : EdgeInsets.zero)
|
||||
@@ -76,7 +76,7 @@ mixin MessageDialogActionMixin {
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierColor: AppColor.colorDefaultCupertinoActionSheet,
|
||||
builder: (BuildContext context) => PointerInterceptor(child: (ConfirmDialogBuilder(_imagePaths)
|
||||
builder: (BuildContext context) => PointerInterceptor(child: (ConfirmDialogBuilder(imagePaths)
|
||||
..key(const Key('confirm_dialog_action'))
|
||||
..title(title ?? '')
|
||||
..content(message)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:core/core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
@@ -24,7 +25,7 @@ mixin PopupMenuWidgetMixin {
|
||||
width: iconSize ?? 20,
|
||||
height: iconSize ?? 20,
|
||||
fit: BoxFit.fill,
|
||||
color: colorIcon
|
||||
colorFilter: colorIcon.asFilter()
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(child: Text(
|
||||
|
||||
@@ -98,8 +98,8 @@ abstract class ReloadableController extends BaseController {
|
||||
} else if (success is GetStoredTokenOidcSuccess) {
|
||||
_handleGetStoredTokenOIDCSuccess(success);
|
||||
} else if (success is GetFCMSubscriptionLocalSuccess) {
|
||||
final _subscriptionId = success.fcmSubscription.subscriptionId;
|
||||
_destroySubscriptionAction(_subscriptionId);
|
||||
final subscriptionId = success.fcmSubscription.subscriptionId;
|
||||
_destroySubscriptionAction(subscriptionId);
|
||||
} else if (success is DestroySubscriptionSuccess) {
|
||||
_checkAuthenticationTypeWhenLogout();
|
||||
}
|
||||
@@ -249,18 +249,18 @@ abstract class ReloadableController extends BaseController {
|
||||
}
|
||||
|
||||
bool fcmEnabled(Session? session, AccountId? accountId) {
|
||||
bool _fcmEnabled = false;
|
||||
bool fcmEnabled = false;
|
||||
try {
|
||||
requireCapability(session!, accountId!, [FirebaseCapability.fcmIdentifier]);
|
||||
if (AppConfig.fcmAvailable) {
|
||||
_fcmEnabled = true;
|
||||
fcmEnabled = true;
|
||||
} else {
|
||||
_fcmEnabled = false;
|
||||
fcmEnabled = false;
|
||||
}
|
||||
} catch (e) {
|
||||
logError('BaseController::fcmEnabled(): exception: $e');
|
||||
}
|
||||
return _fcmEnabled;
|
||||
return fcmEnabled;
|
||||
}
|
||||
|
||||
void logout(Session? session, AccountId? accountId) {
|
||||
|
||||
@@ -3,12 +3,12 @@ import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/utils/style_utils.dart';
|
||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||
import 'package:enough_html_editor/enough_html_editor.dart' as enough_html_editor;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:jmap_dart_client/jmap/identities/identity.dart';
|
||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||
import 'package:rich_text_composer/rich_text_composer.dart' as rich_text_composer;
|
||||
import 'package:rule_filter/rule_filter/rule_condition.dart' as rule_condition;
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/font_name_type.dart';
|
||||
import 'package:tmail_ui_user/features/manage_account/presentation/language_and_region/extensions/locale_extension.dart';
|
||||
@@ -54,7 +54,7 @@ class DropDownButtonWidget<T> extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final _imagePaths = Get.find<ImagePaths>();
|
||||
final imagePaths = Get.find<ImagePaths>();
|
||||
|
||||
return DropdownButtonHideUnderline(
|
||||
child: PointerInterceptor(
|
||||
@@ -91,7 +91,7 @@ class DropDownButtonWidget<T> extends StatelessWidget {
|
||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||
)),
|
||||
if (supportSelectionIcon && item == itemSelected)
|
||||
SvgPicture.asset(_imagePaths.icChecked,
|
||||
SvgPicture.asset(imagePaths.icChecked,
|
||||
width: sizeIconChecked,
|
||||
height: sizeIconChecked,
|
||||
fit: BoxFit.fill)
|
||||
@@ -125,13 +125,13 @@ class DropDownButtonWidget<T> extends StatelessWidget {
|
||||
softWrap: CommonTextStyle.defaultSoftWrap,
|
||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||
)),
|
||||
iconArrowDown ?? SvgPicture.asset(_imagePaths.icDropDown)
|
||||
iconArrowDown ?? SvgPicture.asset(imagePaths.icDropDown)
|
||||
]),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
onChanged: onChanged,
|
||||
icon: iconArrowDown ?? SvgPicture.asset(_imagePaths.icDropDown),
|
||||
icon: iconArrowDown ?? SvgPicture.asset(imagePaths.icDropDown),
|
||||
buttonPadding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
buttonDecoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(radiusButton),
|
||||
@@ -173,7 +173,7 @@ class DropDownButtonWidget<T> extends StatelessWidget {
|
||||
if (item is FontNameType) {
|
||||
return item.fontFamily;
|
||||
}
|
||||
if (item is enough_html_editor.SafeFont) {
|
||||
if (item is rich_text_composer.SafeFont) {
|
||||
return item.name;
|
||||
}
|
||||
if (item is rule_condition.Field) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:core/core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||
@@ -40,7 +41,7 @@ class PopupItemWidget extends StatelessWidget {
|
||||
width: iconSize ?? 20,
|
||||
height: iconSize ?? 20,
|
||||
fit: BoxFit.fill,
|
||||
color: colorIcon
|
||||
colorFilter: colorIcon.asFilter()
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(child: Text(
|
||||
|
||||
Reference in New Issue
Block a user