forked from firka/flutter
re-re-enable lint unnecessary_const (#20103)
This commit is contained in:
committed by
GitHub
parent
ffbaa97b50
commit
eda03e2586
@@ -13,33 +13,33 @@ void main() {
|
||||
final RenderFlex table = new RenderFlex(direction: Axis.vertical, textDirection: TextDirection.ltr);
|
||||
|
||||
void addAlignmentRow(CrossAxisAlignment crossAxisAlignment) {
|
||||
TextStyle style = const TextStyle(color: const Color(0xFF000000));
|
||||
TextStyle style = const TextStyle(color: Color(0xFF000000));
|
||||
final RenderParagraph paragraph = new RenderParagraph(
|
||||
new TextSpan(style: style, text: '$crossAxisAlignment'),
|
||||
textDirection: TextDirection.ltr,
|
||||
);
|
||||
table.add(new RenderPadding(child: paragraph, padding: const EdgeInsets.only(top: 20.0)));
|
||||
final RenderFlex row = new RenderFlex(crossAxisAlignment: crossAxisAlignment, textBaseline: TextBaseline.alphabetic, textDirection: TextDirection.ltr);
|
||||
style = const TextStyle(fontSize: 15.0, color: const Color(0xFF000000));
|
||||
style = const TextStyle(fontSize: 15.0, color: Color(0xFF000000));
|
||||
row.add(new RenderDecoratedBox(
|
||||
decoration: const BoxDecoration(color: const Color(0x7FFFCCCC)),
|
||||
decoration: const BoxDecoration(color: Color(0x7FFFCCCC)),
|
||||
child: new RenderParagraph(
|
||||
new TextSpan(style: style, text: 'foo foo foo'),
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
));
|
||||
style = const TextStyle(fontSize: 10.0, color: const Color(0xFF000000));
|
||||
style = const TextStyle(fontSize: 10.0, color: Color(0xFF000000));
|
||||
row.add(new RenderDecoratedBox(
|
||||
decoration: const BoxDecoration(color: const Color(0x7FCCFFCC)),
|
||||
decoration: const BoxDecoration(color: Color(0x7FCCFFCC)),
|
||||
child: new RenderParagraph(
|
||||
new TextSpan(style: style, text: 'foo foo foo'),
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
));
|
||||
final RenderFlex subrow = new RenderFlex(crossAxisAlignment: crossAxisAlignment, textBaseline: TextBaseline.alphabetic, textDirection: TextDirection.ltr);
|
||||
style = const TextStyle(fontSize: 25.0, color: const Color(0xFF000000));
|
||||
style = const TextStyle(fontSize: 25.0, color: Color(0xFF000000));
|
||||
subrow.add(new RenderDecoratedBox(
|
||||
decoration: const BoxDecoration(color: const Color(0x7FCCCCFF)),
|
||||
decoration: const BoxDecoration(color: Color(0x7FCCCCFF)),
|
||||
child: new RenderParagraph(
|
||||
new TextSpan(style: style, text: 'foo foo foo foo'),
|
||||
textDirection: TextDirection.ltr,
|
||||
@@ -59,7 +59,7 @@ void main() {
|
||||
addAlignmentRow(CrossAxisAlignment.baseline);
|
||||
|
||||
void addJustificationRow(MainAxisAlignment justify) {
|
||||
const TextStyle style = const TextStyle(color: const Color(0xFF000000));
|
||||
const TextStyle style = TextStyle(color: Color(0xFF000000));
|
||||
final RenderParagraph paragraph = new RenderParagraph(
|
||||
new TextSpan(style: style, text: '$justify'),
|
||||
textDirection: TextDirection.ltr,
|
||||
@@ -82,7 +82,7 @@ void main() {
|
||||
addJustificationRow(MainAxisAlignment.spaceAround);
|
||||
|
||||
final RenderDecoratedBox root = new RenderDecoratedBox(
|
||||
decoration: const BoxDecoration(color: const Color(0xFFFFFFFF)),
|
||||
decoration: const BoxDecoration(color: Color(0xFFFFFFFF)),
|
||||
child: new RenderPadding(child: table, padding: const EdgeInsets.symmetric(vertical: 50.0)),
|
||||
);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class NonStopVSync implements TickerProvider {
|
||||
void main() {
|
||||
// We first create a render object that represents a green box.
|
||||
final RenderBox green = new RenderDecoratedBox(
|
||||
decoration: const BoxDecoration(color: const Color(0xFF00FF00))
|
||||
decoration: const BoxDecoration(color: Color(0xFF00FF00))
|
||||
);
|
||||
// Second, we wrap that green box in a render object that forces the green box
|
||||
// to have a specific size.
|
||||
|
||||
@@ -577,7 +577,7 @@ class RenderSolidColor extends RenderDecoratedSector {
|
||||
@override
|
||||
void handleEvent(PointerEvent event, HitTestEntry entry) {
|
||||
if (event is PointerDownEvent) {
|
||||
decoration = const BoxDecoration(color: const Color(0xFFFF0000));
|
||||
decoration = const BoxDecoration(color: Color(0xFFFF0000));
|
||||
} else if (event is PointerUpEvent) {
|
||||
decoration = new BoxDecoration(color: backgroundColor);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class RenderSolidColorBox extends RenderDecoratedBox {
|
||||
@override
|
||||
void handleEvent(PointerEvent event, BoxHitTestEntry entry) {
|
||||
if (event is PointerDownEvent) {
|
||||
decoration = const BoxDecoration(color: const Color(0xFFFF0000));
|
||||
decoration = const BoxDecoration(color: Color(0xFFFF0000));
|
||||
} else if (event is PointerUpEvent) {
|
||||
decoration = new BoxDecoration(color: backgroundColor);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ void main() {
|
||||
// Create some styled text to tell the user to interact with the app.
|
||||
final RenderParagraph paragraph = new RenderParagraph(
|
||||
const TextSpan(
|
||||
style: const TextStyle(color: Colors.black87),
|
||||
style: TextStyle(color: Colors.black87),
|
||||
text: 'Touch me!',
|
||||
),
|
||||
textDirection: TextDirection.ltr,
|
||||
|
||||
Reference in New Issue
Block a user