Skip to content

Commit

Permalink
add gif to ImageExample
Browse files Browse the repository at this point in the history
  • Loading branch information
X-Wei committed Oct 10, 2018
1 parent 71a6512 commit eef818b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
17 changes: 16 additions & 1 deletion lib/routes/widgets_image_ex.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,30 @@ class ImageExample extends MyRoute {

@override
Widget buildMyRouteContent(BuildContext context) {
return Column(
return ListView(
children: <Widget>[
ListTile(
title: Text('Image from asset:'),
),
Card(
child: Image.asset('res/images/material_design_2.jpg'),
),
Divider(),
ListTile(
title: Text('Image from url:'),
),
Card(
child: Image.network(
'https://images.freeimages.com/images/large-previews/4ad/coloured-pencils-1427682.jpg'),
),
Divider(),
ListTile(
title: Text('GIF from asset:'),
),
Image.asset(
'res/images/animated_flutter_lgtm.gif',
scale: 1.0,
),
],
);
}
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: A Flutter catalog app with source code.
dependencies:
flutter:
sdk: flutter
url_launcher: "^3.0.3"
tuple: "^1.0.1"
url_launcher: ^3.0.3
tuple: ^1.0.1
fluttertoast: ^2.0.7

# The following adds the Cupertino Icons font to your application.
Expand Down
Binary file added res/images/animated_flutter_lgtm.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit eef818b

Please sign in to comment.