enable lint prefer_interpolation_to_compose_strings (#83407)
This commit is contained in:
committed by
GitHub
parent
71e711547f
commit
34059eec2c
@@ -213,9 +213,9 @@ class ListItem extends StatelessWidget {
|
||||
if (count < 10000) {
|
||||
return count.toString();
|
||||
} else if (count < 100000) {
|
||||
return (count / 10000).toStringAsPrecision(2) + 'w';
|
||||
return '${(count / 10000).toStringAsPrecision(2)}w';
|
||||
} else {
|
||||
return (count / 10000).floor().toString() + 'w';
|
||||
return '${(count / 10000).floor()}w';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class StockRow extends StatelessWidget {
|
||||
final String lastSale = '\$${stock.lastSale.toStringAsFixed(2)}';
|
||||
String changeInPrice = '${stock.percentChange.toStringAsFixed(2)}%';
|
||||
if (stock.percentChange > 0)
|
||||
changeInPrice = '+' + changeInPrice;
|
||||
changeInPrice = '+$changeInPrice';
|
||||
return InkWell(
|
||||
key: ValueKey<String>(stock.symbol),
|
||||
onTap: _getHandler(onPressed),
|
||||
|
||||
@@ -22,7 +22,7 @@ class _StockSymbolView extends StatelessWidget {
|
||||
final String lastSale = '\$${stock.lastSale.toStringAsFixed(2)}';
|
||||
String changeInPrice = '${stock.percentChange.toStringAsFixed(2)}%';
|
||||
if (stock.percentChange > 0)
|
||||
changeInPrice = '+' + changeInPrice;
|
||||
changeInPrice = '+$changeInPrice';
|
||||
|
||||
final TextStyle headings = Theme.of(context).textTheme.bodyText1!;
|
||||
return Container(
|
||||
|
||||
Reference in New Issue
Block a user