enable lint prefer_interpolation_to_compose_strings (#83407)

This commit is contained in:
Alexandre Ardhuin
2021-06-01 20:14:06 +02:00
committed by GitHub
parent 71e711547f
commit 34059eec2c
96 changed files with 367 additions and 345 deletions

View File

@@ -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),

View File

@@ -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(