mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-04 06:38:27 +08:00
double-literal-format++
This commit is contained in:
@ -48,6 +48,7 @@ dart_code_metrics:
|
|||||||
number-of-methods: 100
|
number-of-methods: 100
|
||||||
rules:
|
rules:
|
||||||
- avoid-ignoring-return-values
|
- avoid-ignoring-return-values
|
||||||
|
- double-literal-format
|
||||||
# - avoid-unused-parameters
|
# - avoid-unused-parameters
|
||||||
# - double-literal-format
|
# - double-literal-format
|
||||||
# - no-boolean-literal-compare
|
# - no-boolean-literal-compare
|
||||||
|
@ -79,7 +79,7 @@ TextEditingController buildController({
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension ColorBrightness on Color {
|
extension ColorBrightness on Color {
|
||||||
Color darken([double amount = .1]) {
|
Color darken([double amount = 0.1]) {
|
||||||
assert(amount >= 0 && amount <= 1);
|
assert(amount >= 0 && amount <= 1);
|
||||||
|
|
||||||
final hsl = HSLColor.fromColor(this);
|
final hsl = HSLColor.fromColor(this);
|
||||||
@ -88,7 +88,7 @@ extension ColorBrightness on Color {
|
|||||||
return hslDark.toColor();
|
return hslDark.toColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
Color lighten([double amount = .1]) {
|
Color lighten([double amount = 0.1]) {
|
||||||
assert(amount >= 0 && amount <= 1);
|
assert(amount >= 0 && amount <= 1);
|
||||||
|
|
||||||
final hsl = HSLColor.fromColor(this);
|
final hsl = HSLColor.fromColor(this);
|
||||||
|
@ -57,7 +57,7 @@ class NoteTile extends StatelessWidget {
|
|||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: textTheme.headline6!
|
style: textTheme.headline6!
|
||||||
.copyWith(fontSize: textTheme.headline6!.fontSize! * 0.80),
|
.copyWith(fontSize: textTheme.headline6!.fontSize! * 0.8),
|
||||||
highlightText: searchTerm,
|
highlightText: searchTerm,
|
||||||
highlightTextLowerCase: searchTermLowerCase,
|
highlightTextLowerCase: searchTermLowerCase,
|
||||||
),
|
),
|
||||||
@ -131,7 +131,7 @@ class NoteTile extends StatelessWidget {
|
|||||||
highlightText: searchTerm,
|
highlightText: searchTerm,
|
||||||
highlightTextLowerCase: searchTermLowerCase,
|
highlightTextLowerCase: searchTermLowerCase,
|
||||||
style: textTheme.subtitle1!
|
style: textTheme.subtitle1!
|
||||||
.copyWith(fontSize: textTheme.subtitle1!.fontSize! * 0.90),
|
.copyWith(fontSize: textTheme.subtitle1!.fontSize! * 0.9),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: _maxLines - 1,
|
maxLines: _maxLines - 1,
|
||||||
);
|
);
|
||||||
|
@ -228,7 +228,7 @@ class PurchaseCard extends StatelessWidget {
|
|||||||
var mediaQuery = MediaQuery.of(context);
|
var mediaQuery = MediaQuery.of(context);
|
||||||
|
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: mediaQuery.size.width * 0.80,
|
width: mediaQuery.size.width * 0.8,
|
||||||
child: Card(
|
child: Card(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(15.0),
|
borderRadius: BorderRadius.circular(15.0),
|
||||||
|
@ -44,9 +44,9 @@ class IconDismissable extends Dismissible {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
dismissThresholds: {
|
dismissThresholds: {
|
||||||
DismissDirection.horizontal: 0.60,
|
DismissDirection.horizontal: 0.6,
|
||||||
DismissDirection.endToStart: 0.60,
|
DismissDirection.endToStart: 0.6,
|
||||||
DismissDirection.startToEnd: 0.60,
|
DismissDirection.startToEnd: 0.6,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user