Fix analyzer warnings
We had a remarkable number of analyzer failures. I'll fix the bots to analyze across the whole project in a follow-up patch, that should prevent this in the future. @abarth
This commit is contained in:
@@ -18,25 +18,25 @@ void main() {
|
||||
|
||||
for(FlexAlignItems alignItems in FlexAlignItems.values) {
|
||||
TextStyle style = const TextStyle(color: const Color(0xFF000000));
|
||||
RenderParagraph paragraph = new RenderParagraph(new RenderStyled(style, [new RenderText("${alignItems}")]));
|
||||
RenderParagraph paragraph = new RenderParagraph(new StyledTextSpan(style, [new PlainTextSpan("${alignItems}")]));
|
||||
table.add(new RenderPadding(child: paragraph, padding: new EdgeDims.only(top: 20.0)));
|
||||
var row = new RenderFlex(alignItems: alignItems, textBaseline: TextBaseline.alphabetic);
|
||||
|
||||
style = new TextStyle(fontSize: 15.0, color: const Color(0xFF000000));
|
||||
row.add(new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(backgroundColor: const Color(0x7FFFCCCC)),
|
||||
child: new RenderParagraph(new RenderStyled(style, [new RenderText('foo foo foo')]))
|
||||
child: new RenderParagraph(new StyledTextSpan(style, [new PlainTextSpan('foo foo foo')]))
|
||||
));
|
||||
style = new TextStyle(fontSize: 10.0, color: const Color(0xFF000000));
|
||||
row.add(new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(backgroundColor: const Color(0x7FCCFFCC)),
|
||||
child: new RenderParagraph(new RenderStyled(style, [new RenderText('foo foo foo')]))
|
||||
child: new RenderParagraph(new StyledTextSpan(style, [new PlainTextSpan('foo foo foo')]))
|
||||
));
|
||||
var subrow = new RenderFlex(alignItems: alignItems, textBaseline: TextBaseline.alphabetic);
|
||||
style = new TextStyle(fontSize: 25.0, color: const Color(0xFF000000));
|
||||
subrow.add(new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(backgroundColor: const Color(0x7FCCCCFF)),
|
||||
child: new RenderParagraph(new RenderStyled(style, [new RenderText('foo foo foo foo')]))
|
||||
child: new RenderParagraph(new StyledTextSpan(style, [new PlainTextSpan('foo foo foo foo')]))
|
||||
));
|
||||
subrow.add(new RenderSolidColorBox(const Color(0x7FCCFFFF), desiredSize: new Size(30.0, 40.0)));
|
||||
row.add(subrow);
|
||||
|
||||
@@ -13,19 +13,19 @@ import 'package:sky/rendering/sky_binding.dart';
|
||||
|
||||
RenderBox getBox(double lh) {
|
||||
RenderParagraph paragraph = new RenderParagraph(
|
||||
new RenderStyled(
|
||||
new StyledTextSpan(
|
||||
new TextStyle(
|
||||
color: const Color(0xFF0000A0)
|
||||
),
|
||||
[
|
||||
new RenderText('test'),
|
||||
new RenderStyled(
|
||||
new PlainTextSpan('test'),
|
||||
new StyledTextSpan(
|
||||
new TextStyle(
|
||||
fontFamily: 'serif',
|
||||
fontSize: 50.0,
|
||||
height: lh
|
||||
),
|
||||
[new RenderText('مرحبا Hello')]
|
||||
[new PlainTextSpan('مرحبا Hello')]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
@@ -65,7 +65,7 @@ void main() {
|
||||
|
||||
// Resizeable image
|
||||
image = new RenderImageGrow(null, new Size(100.0, null));
|
||||
image_cache.load("https://www.dartlang.org/logos/dart-logo.png").then((Image dartLogo) {
|
||||
image_cache.load("https://www.dartlang.org/logos/dart-logo.png").first.then((Image dartLogo) {
|
||||
image.image = dartLogo;
|
||||
});
|
||||
|
||||
@@ -84,9 +84,9 @@ porchetta bacon kevin meatball meatloaf pig beef ribs chicken. Brisket ribeye
|
||||
andouille leberkas capicola meatloaf. Chicken pig ball tip pork picanha bresaola
|
||||
alcatra. Pork pork belly alcatra, flank chuck drumstick biltong doner jowl.
|
||||
Pancetta meatball tongue tenderloin rump tail jowl boudin.""";
|
||||
var text = new RenderStyled(
|
||||
var text = new StyledTextSpan(
|
||||
new TextStyle(color: const Color(0xFF009900)),
|
||||
[new RenderText(meatyString)]);
|
||||
[new PlainTextSpan(meatyString)]);
|
||||
padding = new RenderPadding(
|
||||
padding: const EdgeDims.all(10.0),
|
||||
child: new RenderParagraph(text));
|
||||
|
||||
@@ -21,7 +21,7 @@ void main() {
|
||||
var table = new RenderFlex(direction: FlexDirection.vertical);
|
||||
|
||||
void addRow(FlexJustifyContent justify) {
|
||||
RenderParagraph paragraph = new RenderParagraph(new RenderStyled(style, [new RenderText("${justify}")]));
|
||||
RenderParagraph paragraph = new RenderParagraph(new StyledTextSpan(style, [new PlainTextSpan("${justify}")]));
|
||||
table.add(new RenderPadding(child: paragraph, padding: new EdgeDims.only(top: 20.0)));
|
||||
var row = new RenderFlex(direction: FlexDirection.horizontal);
|
||||
row.add(new RenderSolidColorBox(const Color(0xFFFFCCCC), desiredSize: new Size(80.0, 60.0)));
|
||||
|
||||
@@ -32,9 +32,9 @@ andouille leberkas capicola meatloaf. Chicken pig ball tip pork picanha bresaola
|
||||
alcatra. Pork pork belly alcatra, flank chuck drumstick biltong doner jowl.
|
||||
Pancetta meatball tongue tenderloin rump tail jowl boudin.""";
|
||||
|
||||
var text = new RenderStyled(
|
||||
var text = new StyledTextSpan(
|
||||
new TextStyle(color: const Color(0xFF009900)),
|
||||
[new RenderText(meatyString)]);
|
||||
[new PlainTextSpan(meatyString)]);
|
||||
child = new RenderDecoratedBox(
|
||||
decoration: new BoxDecoration(backgroundColor: const Color(0xFFFFFFFF)),
|
||||
child: new RenderParagraph(text)
|
||||
|
||||
@@ -76,12 +76,12 @@ class RenderTouchDemo extends RenderBox {
|
||||
..color = const Color(0xFFFFFFFF);
|
||||
canvas.drawRect(offset & size, white);
|
||||
for (Dot dot in dots.values)
|
||||
dot.paint(canvas, offset);
|
||||
dot.paint(context, offset);
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
var paragraph = new RenderParagraph(new RenderText("Touch me!"));
|
||||
var paragraph = new RenderParagraph(new PlainTextSpan("Touch me!"));
|
||||
var stack = new RenderStack(children: [
|
||||
new RenderTouchDemo(),
|
||||
paragraph,
|
||||
|
||||
Reference in New Issue
Block a user