Skip to content

Commit 1ee64cc

Browse files
committed
chore(example): code clean up
1 parent 76e271e commit 1ee64cc

File tree

5 files changed

+15
-29
lines changed

5 files changed

+15
-29
lines changed

example/lib/demo_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ class DemoPage extends StatelessWidget {
1010

1111
@override
1212
Widget build(BuildContext context) {
13-
return new Scaffold(
14-
appBar: new AppBar(
15-
title: new Text("Offline Demo"),
13+
return Scaffold(
14+
appBar: AppBar(
15+
title: Text("Offline Demo"),
1616
),
1717
body: child,
1818
);

example/lib/main.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import './widgets/demo_1.dart';
55
import './widgets/demo_2.dart';
66
import './widgets/demo_3.dart';
77

8-
void main() => runApp(new MyApp());
8+
void main() => runApp(MyApp());
99

1010
class MyApp extends StatelessWidget {
1111
@override
1212
Widget build(BuildContext context) {
13-
return new MaterialApp(
13+
return MaterialApp(
1414
title: 'Offline Demo',
15-
theme: new ThemeData.dark(),
15+
theme: ThemeData.dark(),
1616
home: Builder(
1717
builder: (BuildContext context) {
1818
return Column(

example/lib/widgets/demo_1.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,8 @@ class Demo1 extends StatelessWidget {
5151
child: Column(
5252
mainAxisAlignment: MainAxisAlignment.center,
5353
children: <Widget>[
54-
new Text(
55-
'There are no bottons to push :)',
56-
),
57-
new Text(
58-
'Just turn off your internet.',
59-
),
54+
Text('There are no bottons to push :)'),
55+
Text('Just turn off your internet.'),
6056
],
6157
),
6258
);

example/lib/widgets/demo_2.dart

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,11 @@ class Demo2 extends StatelessWidget {
2626
},
2727
builder: (BuildContext context) {
2828
return Center(
29-
child: new Column(
29+
child: Column(
3030
mainAxisAlignment: MainAxisAlignment.center,
3131
children: <Widget>[
32-
new Text(
33-
'There are no bottons to push :)',
34-
),
35-
new Text(
36-
'Just turn off your internet.',
37-
),
32+
Text('There are no bottons to push :)'),
33+
Text('Just turn off your internet.'),
3834
],
3935
),
4036
);

example/lib/widgets/demo_3.dart

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,12 @@ class Demo3 extends StatelessWidget {
2525
return child;
2626
},
2727
child: Center(
28-
child: new Column(
28+
child: Column(
2929
mainAxisAlignment: MainAxisAlignment.center,
3030
children: <Widget>[
31-
new Text(
32-
'There are no bottons to push :)',
33-
),
34-
new Text(
35-
'Just turn off your internet.',
36-
),
37-
new Text(
38-
'This one has a bit of a delay.',
39-
),
31+
Text('There are no bottons to push :)'),
32+
Text('Just turn off your internet.'),
33+
Text('This one has a bit of a delay.'),
4034
],
4135
),
4236
),

0 commit comments

Comments
 (0)