TF-1487 Apply linter rule

This commit is contained in:
dab246
2023-02-24 12:12:54 +07:00
committed by Dat Vu
parent 117a8a8fc6
commit 2b71aba278
155 changed files with 798 additions and 1039 deletions
@@ -179,7 +179,7 @@ class VacationController extends BaseController {
onPrimary: Colors.white,
onSurface: Colors.black),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(primary: AppColor.primaryColor))),
style: TextButton.styleFrom(foregroundColor: AppColor.primaryColor))),
child: child!);
}
);
@@ -207,7 +207,7 @@ class VacationController extends BaseController {
onPrimary: Colors.white,
onSurface: Colors.black),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(primary: AppColor.primaryColor))),
style: TextButton.styleFrom(foregroundColor: AppColor.primaryColor))),
child: MediaQuery(
data: const MediaQueryData(alwaysUse24HourFormat: false),
child: child!),
@@ -270,7 +270,7 @@ class VacationController extends BaseController {
final messagePlainText = messageTextController.text;
final messageHtmlText = (BuildUtils.isWeb ? _vacationMessageHtmlText : await _getMessageHtmlText()) ?? '';
if (messagePlainText.isEmpty && messageHtmlText.isEmpty) {
if (messagePlainText.isEmpty && messageHtmlText.isEmpty && context.mounted) {
_appToast.showToastWithIcon(
context,
bgColor: AppColor.toastErrorBackgroundColor,
@@ -1,6 +1,5 @@
import 'package:core/core.dart';
import 'package:enough_html_editor/enough_html_editor.dart' as html_editor_mobile;
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
@@ -468,7 +467,7 @@ class VacationView extends GetWidget<VacationController> with RichTextButtonMixi
),
);
} else {
return html_editor_mobile.HtmlEditor(
return HtmlEditor(
key: controller.htmlKey,
minHeight: controller.htmlEditorMinHeight,
addDefaultSelectionMenuItems: false,