mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
Upgrading samples to flutter_lints, part 1 of n (#804)
This commit is contained in:
@@ -11,7 +11,7 @@ import 'package:jsonexample/widgets.dart';
|
||||
void main() {
|
||||
group('SimpleObjectView widget test', () {
|
||||
testWidgets('Typical object is displayed correctly', (tester) async {
|
||||
final simpleObject = ConvertedSimpleObject(
|
||||
const simpleObject = ConvertedSimpleObject(
|
||||
aString: 'Blah, blah, blah',
|
||||
anInt: 1,
|
||||
aDouble: 1.0,
|
||||
@@ -21,7 +21,7 @@ void main() {
|
||||
);
|
||||
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
const MaterialApp(
|
||||
home: SimpleObjectView(simpleObject),
|
||||
),
|
||||
);
|
||||
@@ -35,7 +35,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('Empty lists are displayed as brackets', (tester) async {
|
||||
final simpleObject = ConvertedSimpleObject(
|
||||
const simpleObject = ConvertedSimpleObject(
|
||||
aString: 'Blah, blah, blah',
|
||||
anInt: 1,
|
||||
aDouble: 1.0,
|
||||
@@ -45,7 +45,7 @@ void main() {
|
||||
);
|
||||
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
const MaterialApp(
|
||||
home: SimpleObjectView(simpleObject),
|
||||
),
|
||||
);
|
||||
@@ -54,7 +54,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('Null values are displayed as NULL', (tester) async {
|
||||
final simpleObject = ConvertedSimpleObject(
|
||||
const simpleObject = ConvertedSimpleObject(
|
||||
aString: null,
|
||||
anInt: null,
|
||||
aDouble: null,
|
||||
@@ -64,7 +64,7 @@ void main() {
|
||||
);
|
||||
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
const MaterialApp(
|
||||
home: SimpleObjectView(simpleObject),
|
||||
),
|
||||
);
|
||||
@@ -75,7 +75,7 @@ void main() {
|
||||
|
||||
group('ComplexObjectView widget test', () {
|
||||
testWidgets('Typical object is displayed correctly', (tester) async {
|
||||
final complexObject = ConvertedComplexObject(
|
||||
const complexObject = ConvertedComplexObject(
|
||||
aString: 'Blah, blah, blah',
|
||||
anInt: 1,
|
||||
aDouble: 1.0,
|
||||
@@ -119,7 +119,7 @@ void main() {
|
||||
);
|
||||
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
const MaterialApp(
|
||||
home: ComplexObjectView(complexObject),
|
||||
),
|
||||
);
|
||||
@@ -142,7 +142,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('Empty lists are displayed as brackets', (tester) async {
|
||||
final complexObject = ConvertedComplexObject(
|
||||
const complexObject = ConvertedComplexObject(
|
||||
aString: 'Blah, blah, blah',
|
||||
anInt: 1,
|
||||
aDouble: 1.0,
|
||||
@@ -161,7 +161,7 @@ void main() {
|
||||
);
|
||||
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
const MaterialApp(
|
||||
home: ComplexObjectView(complexObject),
|
||||
),
|
||||
);
|
||||
@@ -170,7 +170,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('Null values are displayed as NULL', (tester) async {
|
||||
final complexObject = ConvertedComplexObject(
|
||||
const complexObject = ConvertedComplexObject(
|
||||
aString: null,
|
||||
anInt: null,
|
||||
aDouble: null,
|
||||
@@ -182,7 +182,7 @@ void main() {
|
||||
);
|
||||
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
const MaterialApp(
|
||||
home: ComplexObjectView(complexObject),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user