forked from firka/flutter
prefer_const_constructor in packages/flutter/lib (#7179)
This commit is contained in:
committed by
Chinmay Garde
parent
37d78753a2
commit
1272e053c7
@@ -14,7 +14,7 @@ import 'term.dart';
|
||||
enum _SymbolType { invalid, external, slack, error, dummy, }
|
||||
|
||||
class _Symbol {
|
||||
const _Symbol(this.type);
|
||||
_Symbol(this.type);
|
||||
|
||||
final _SymbolType type;
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ class _LicensePageState extends State<LicensePage> {
|
||||
),
|
||||
child: new Text(
|
||||
license.packages.join(', '),
|
||||
style: new TextStyle(fontWeight: FontWeight.bold),
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
textAlign: TextAlign.center
|
||||
)
|
||||
));
|
||||
@@ -403,7 +403,7 @@ class _LicensePageState extends State<LicensePage> {
|
||||
padding: const EdgeInsets.only(top: 16.0),
|
||||
child: new Text(
|
||||
paragraph.text,
|
||||
style: new TextStyle(fontWeight: FontWeight.bold),
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
textAlign: TextAlign.center
|
||||
)
|
||||
));
|
||||
|
||||
@@ -426,7 +426,7 @@ class BottomNavigationBarState extends State<BottomNavigationBar> with TickerPro
|
||||
opacity: animations[i],
|
||||
child: new DefaultTextStyle.merge(
|
||||
context: context,
|
||||
style: new TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.white
|
||||
),
|
||||
|
||||
@@ -203,9 +203,9 @@ class _RenderCheckbox extends RenderToggleable {
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = _kStrokeWidth;
|
||||
Path path = new Path();
|
||||
Point start = new Point(_kEdgeSize * 0.15, _kEdgeSize * 0.45);
|
||||
Point mid = new Point(_kEdgeSize * 0.4, _kEdgeSize * 0.7);
|
||||
Point end = new Point(_kEdgeSize * 0.85, _kEdgeSize * 0.25);
|
||||
Point start = const Point(_kEdgeSize * 0.15, _kEdgeSize * 0.45);
|
||||
Point mid = const Point(_kEdgeSize * 0.4, _kEdgeSize * 0.7);
|
||||
Point end = const Point(_kEdgeSize * 0.85, _kEdgeSize * 0.25);
|
||||
Point drawStart = Point.lerp(start, mid, 1.0 - value);
|
||||
Point drawEnd = Point.lerp(mid, end, value);
|
||||
path.moveTo(offsetX + drawStart.x, offsetY + drawStart.y);
|
||||
|
||||
@@ -95,7 +95,7 @@ class Chip extends StatelessWidget {
|
||||
message: 'Delete "$label"',
|
||||
child: new Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4.0),
|
||||
child: new Icon(
|
||||
child: const Icon(
|
||||
Icons.cancel,
|
||||
size: 18.0,
|
||||
color: Colors.black54
|
||||
|
||||
@@ -126,7 +126,7 @@ class GridTileBar extends StatelessWidget {
|
||||
data: darkTheme,
|
||||
child: new IconTheme.merge(
|
||||
context: context,
|
||||
data: new IconThemeData(color: Colors.white),
|
||||
data: const IconThemeData(color: Colors.white),
|
||||
child: new Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: children
|
||||
|
||||
Reference in New Issue
Block a user