TF-1098 Apply lints for all module

This commit is contained in:
dab246
2022-10-21 13:31:33 +07:00
committed by Dat H. Pham
parent c6e73d4272
commit ae89802845
58 changed files with 442 additions and 348 deletions
@@ -66,7 +66,7 @@ class SloganBuilder {
child: Column(children: [
_logoApp(),
Padding(
padding: _padding ?? EdgeInsets.only(top: 16, left: 16, right: 16),
padding: _padding ?? const EdgeInsets.only(top: 16, left: 16, right: 16),
child: Text(_text ?? '', key: _key, style: _textStyle, textAlign: _textAlign),
),
]),
@@ -77,7 +77,7 @@ class SloganBuilder {
child: Row(children: [
_logoApp(),
Padding(
padding: _padding ?? EdgeInsets.symmetric(horizontal: 10),
padding: _padding ?? const EdgeInsets.symmetric(horizontal: 10),
child: Text(_text ?? '', key: _key, style: _textStyle, textAlign: _textAlign),
),
]),
@@ -96,6 +96,6 @@ class SloganBuilder {
height: _sizeLogo ?? 150,
alignment: Alignment.center);
}
return SizedBox.shrink();
return const SizedBox.shrink();
}
}
@@ -28,13 +28,13 @@ class TextBuilder {
}
Text build() {
return Text(_text ?? '', key: _key ?? Key('TextBuilder'), style: _textStyle ?? CommonTextStyle.textStyleNormal, textAlign: _textAlign ?? TextAlign.center);
return Text(_text ?? '', key: _key ?? const Key('TextBuilder'), style: _textStyle ?? CommonTextStyle.textStyleNormal, textAlign: _textAlign ?? TextAlign.center);
}
}
class CenterTextBuilder extends TextBuilder {
@override
Text build() {
return Text(_text ?? '', key: _key ?? Key('TextBuilder'), style: _textStyle, textAlign: TextAlign.center);
return Text(_text ?? '', key: _key ?? const Key('TextBuilder'), style: _textStyle, textAlign: TextAlign.center);
}
}
@@ -79,7 +79,7 @@ class TextFieldBuilder {
TextField build() {
return TextField(
key: _key ?? Key('TextFieldBuilder'),
key: _key ?? const Key('TextFieldBuilder'),
onChanged: _onTextChange,
cursorColor: _cursorColor ?? AppColor.primaryColor,
controller: _textController,
@@ -89,7 +89,7 @@ class TextFieldBuilder {
maxLines: _maxLines,
minLines: _minLines,
keyboardAppearance: Brightness.light,
style: _textStyle ?? TextStyle(color: AppColor.textFieldTextColor),
style: _textStyle ?? const TextStyle(color: AppColor.textFieldTextColor),
obscureText: _obscureText ?? false,
keyboardType: _keyboardType,
onSubmitted: _onTextSubmitted,