enable lint unnecessary_const (#19342)
This commit is contained in:
committed by
GitHub
parent
d10e46ea65
commit
cc1cf13eec
@@ -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)),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user