Skip to content

Commit dcc663f

Browse files
committed
small changes
1 parent 39862a1 commit dcc663f

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

lib/collapsing_toolbar/main_collapsing_toolbar.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
6767
@override
6868
Widget build(
6969
BuildContext context, double shrinkOffset, bool overlapsContent) {
70-
return new Container(
70+
return Container(
7171
child: _tabBar,
7272
);
7373
}

lib/fetch_data/main_fetch_data.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class _MainFetchDataState extends State<MainFetchData> {
4040
bottomNavigationBar: Padding(
4141
padding: const EdgeInsets.all(8.0),
4242
child: RaisedButton(
43-
child: new Text("Fetch Data"),
43+
child: Text("Fetch Data"),
4444
onPressed: _fetchData,
4545
),
4646
),
@@ -53,8 +53,8 @@ class _MainFetchDataState extends State<MainFetchData> {
5353
itemBuilder: (BuildContext context, int index) {
5454
return ListTile(
5555
contentPadding: EdgeInsets.all(10.0),
56-
title: new Text(list[index].title),
57-
trailing: new Image.network(
56+
title: Text(list[index].title),
57+
trailing: Image.network(
5858
list[index].thumbnailUrl,
5959
fit: BoxFit.cover,
6060
height: 40.0,

lib/fetch_data/photo.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Photo {
55
Photo._({this.title, this.thumbnailUrl});
66

77
factory Photo.fromJson(Map<String, dynamic> json) {
8-
return new Photo._(
8+
return Photo._(
99
title: json['title'],
1010
thumbnailUrl: json['thumbnailUrl'],
1111
);

lib/hero_animations/hero_dialog_route.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class HeroDialogRoute<T> extends PageRoute<T> {
2323
@override
2424
Widget buildTransitions(BuildContext context, Animation<double> animation,
2525
Animation<double> secondaryAnimation, Widget child) {
26-
return new FadeTransition(
27-
opacity: new CurvedAnimation(parent: animation, curve: Curves.easeOut),
26+
return FadeTransition(
27+
opacity: CurvedAnimation(parent: animation, curve: Curves.easeOut),
2828
child: child);
2929
}
3030

lib/persistent_tabbar/page1.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class _Page1State extends State<Page1> {
1515
final response =
1616
await http.get("https://jsonplaceholder.typicode.com/posts/");
1717
if (response.statusCode == 200) {
18-
await new Future.delayed(const Duration(seconds: 1));
19-
if (mounted){
18+
await Future.delayed(const Duration(seconds: 1));
19+
if (mounted) {
2020
setState(() {
2121
list = json.decode(response.body) as List;
2222
});
23-
}
23+
}
2424
} else {
2525
throw Exception('Failed to load posts');
2626
}

lib/persistent_tabbar/page2.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class _Page2State extends State<Page2>
1616
final response =
1717
await http.get("https://jsonplaceholder.typicode.com/photos/");
1818
if (response.statusCode == 200) {
19-
await new Future.delayed(const Duration(seconds: 1));
19+
await Future.delayed(const Duration(seconds: 1));
2020
if (mounted) {
2121
setState(() {
2222
list = json.decode(response.body) as List;

0 commit comments

Comments
 (0)