TF-1098 Apply lints for all module
This commit is contained in:
@@ -53,7 +53,7 @@ class AppToast {
|
||||
Color? textActionColor,
|
||||
}
|
||||
) {
|
||||
var trailingAction;
|
||||
Widget? trailingAction;
|
||||
|
||||
if (actionName != null) {
|
||||
if (actionIcon == null) {
|
||||
@@ -80,7 +80,7 @@ class AppToast {
|
||||
},
|
||||
customBorder: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 6, horizontal: 8),
|
||||
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 8),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@@ -156,7 +156,7 @@ class AppToast {
|
||||
shadowColor: Colors.black54,
|
||||
borderRadius: BorderRadius.all(Radius.circular(radius ?? 10)),
|
||||
child: Container(
|
||||
padding: padding ?? EdgeInsets.symmetric(horizontal: 12.0, vertical: 14),
|
||||
padding: padding ?? const EdgeInsets.symmetric(horizontal: 12.0, vertical: 14),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(radius ?? 10.0),
|
||||
color: bgColor ?? Colors.white,
|
||||
@@ -172,7 +172,7 @@ class AppToast {
|
||||
fit: BoxFit.fill,
|
||||
color: iconColor),
|
||||
if (icon != null)
|
||||
SizedBox(width: 10.0),
|
||||
const SizedBox(width: 10.0),
|
||||
Expanded(child: Text(
|
||||
message ?? '',
|
||||
style: textStyle ?? TextStyle(fontSize: 15, color: textColor ?? Colors.black))),
|
||||
@@ -184,7 +184,7 @@ class AppToast {
|
||||
fToast.showToast(
|
||||
child: toast,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastDuration: toastLength ?? Duration(seconds: 3),
|
||||
toastDuration: toastLength ?? const Duration(seconds: 3),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
final nameClassToolTip = 'tmail-tooltip';
|
||||
const nameClassToolTip = 'tmail-tooltip';
|
||||
|
||||
final tooltipLinkCss = '''
|
||||
const tooltipLinkCss = '''
|
||||
.$nameClassToolTip .tooltiptext {
|
||||
visibility: hidden;
|
||||
max-width: 400px;
|
||||
@@ -54,13 +54,13 @@ String generateHtml(String content, {
|
||||
${javaScripts ?? ''}
|
||||
</head>
|
||||
<body>
|
||||
<div class="tmail-content">${content}</div>
|
||||
<div class="tmail-content">$content</div>
|
||||
</body>
|
||||
</html>
|
||||
''';
|
||||
}
|
||||
|
||||
final bodyCssStyleForEditor = '''
|
||||
const bodyCssStyleForEditor = '''
|
||||
<style>
|
||||
blockquote {
|
||||
margin-left: 8px;
|
||||
|
||||
@@ -43,9 +43,9 @@ class MessageContentTransformer {
|
||||
|
||||
String _transformMessage(String message) {
|
||||
if (configuration.textTransformers.isNotEmpty) {
|
||||
configuration.textTransformers.forEach((transformer) {
|
||||
for (var transformer in configuration.textTransformers) {
|
||||
message = transformer.process(message);
|
||||
});
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
import 'package:core/utils/build_utils.dart';
|
||||
|
||||
class IconUtils {
|
||||
static final double defaultIconSize = BuildUtils.isWeb ? 20.0 : 24.0;
|
||||
static const double defaultIconSize = BuildUtils.isWeb ? 20.0 : 24.0;
|
||||
}
|
||||
@@ -2,16 +2,16 @@ import 'package:core/core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CommonTextStyle {
|
||||
static final textStyleNormal = TextStyle(
|
||||
static const textStyleNormal = TextStyle(
|
||||
color: AppColor.primaryColor,
|
||||
fontSize: 14,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.normal,
|
||||
);
|
||||
|
||||
static final defaultTextOverFlow = BuildUtils.isWeb
|
||||
static const defaultTextOverFlow = BuildUtils.isWeb
|
||||
? TextOverflow.fade
|
||||
: TextOverflow.ellipsis;
|
||||
|
||||
static final defaultSoftWrap = BuildUtils.isWeb ? false : true;
|
||||
static const defaultSoftWrap = BuildUtils.isWeb ? false : true;
|
||||
}
|
||||
@@ -16,12 +16,12 @@ ThemeData appTheme() {
|
||||
InputDecorationTheme inputDecorationTheme() {
|
||||
OutlineInputBorder outlineInputBorder = OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
borderSide: BorderSide(color: AppColor.baseTextColor),
|
||||
borderSide: const BorderSide(color: AppColor.baseTextColor),
|
||||
gapPadding: 10,
|
||||
);
|
||||
return InputDecorationTheme(
|
||||
floatingLabelBehavior: FloatingLabelBehavior.always,
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 42, vertical: 20),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 42, vertical: 20),
|
||||
enabledBorder: outlineInputBorder,
|
||||
focusedBorder: outlineInputBorder,
|
||||
border: outlineInputBorder,
|
||||
@@ -29,14 +29,14 @@ InputDecorationTheme inputDecorationTheme() {
|
||||
}
|
||||
|
||||
TextTheme textTheme() {
|
||||
return TextTheme(
|
||||
return const TextTheme(
|
||||
bodyText1: TextStyle(color: AppColor.baseTextColor),
|
||||
bodyText2: TextStyle(color: AppColor.baseTextColor),
|
||||
);
|
||||
}
|
||||
|
||||
AppBarTheme appBarTheme() {
|
||||
return AppBarTheme(
|
||||
return const AppBarTheme(
|
||||
color: Colors.white,
|
||||
elevation: 0,
|
||||
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||
|
||||
Reference in New Issue
Block a user