double-literal-format++

This commit is contained in:
Vishesh Handa
2021-12-14 14:24:52 +01:00
parent 4b658e3580
commit 619eb9f5a8
5 changed files with 9 additions and 8 deletions

View File

@ -48,6 +48,7 @@ dart_code_metrics:
number-of-methods: 100
rules:
- avoid-ignoring-return-values
- double-literal-format
# - avoid-unused-parameters
# - double-literal-format
# - no-boolean-literal-compare

View File

@ -79,7 +79,7 @@ TextEditingController buildController({
}
extension ColorBrightness on Color {
Color darken([double amount = .1]) {
Color darken([double amount = 0.1]) {
assert(amount >= 0 && amount <= 1);
final hsl = HSLColor.fromColor(this);
@ -88,7 +88,7 @@ extension ColorBrightness on Color {
return hslDark.toColor();
}
Color lighten([double amount = .1]) {
Color lighten([double amount = 0.1]) {
assert(amount >= 0 && amount <= 1);
final hsl = HSLColor.fromColor(this);

View File

@ -57,7 +57,7 @@ class NoteTile extends StatelessWidget {
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: textTheme.headline6!
.copyWith(fontSize: textTheme.headline6!.fontSize! * 0.80),
.copyWith(fontSize: textTheme.headline6!.fontSize! * 0.8),
highlightText: searchTerm,
highlightTextLowerCase: searchTermLowerCase,
),
@ -131,7 +131,7 @@ class NoteTile extends StatelessWidget {
highlightText: searchTerm,
highlightTextLowerCase: searchTermLowerCase,
style: textTheme.subtitle1!
.copyWith(fontSize: textTheme.subtitle1!.fontSize! * 0.90),
.copyWith(fontSize: textTheme.subtitle1!.fontSize! * 0.9),
overflow: TextOverflow.ellipsis,
maxLines: _maxLines - 1,
);

View File

@ -228,7 +228,7 @@ class PurchaseCard extends StatelessWidget {
var mediaQuery = MediaQuery.of(context);
return SizedBox(
width: mediaQuery.size.width * 0.80,
width: mediaQuery.size.width * 0.8,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),

View File

@ -44,9 +44,9 @@ class IconDismissable extends Dismissible {
),
),
dismissThresholds: {
DismissDirection.horizontal: 0.60,
DismissDirection.endToStart: 0.60,
DismissDirection.startToEnd: 0.60,
DismissDirection.horizontal: 0.6,
DismissDirection.endToStart: 0.6,
DismissDirection.startToEnd: 0.6,
},
);
}