Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
47b5c37f
Unverified
Commit
47b5c37f
authored
Nov 29, 2017
by
amirh
Committed by
GitHub
Nov 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Images demo to the gallery app. (#13141)
parent
dd6af3fd
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
2 deletions
+56
-2
pubspec.yaml
dev/benchmarks/complex_layout/pubspec.yaml
+1
-1
all.dart
examples/flutter_gallery/lib/demo/all.dart
+1
-0
images_demo.dart
examples/flutter_gallery/lib/demo/images_demo.dart
+28
-0
example_code.dart
examples/flutter_gallery/lib/gallery/example_code.dart
+9
-0
item.dart
examples/flutter_gallery/lib/gallery/item.dart
+8
-0
pubspec.yaml
examples/flutter_gallery/pubspec.yaml
+3
-1
live_smoketest.dart
examples/flutter_gallery/test/live_smoketest.dart
+3
-0
transitions_perf_test.dart
...es/flutter_gallery/test_driver/transitions_perf_test.dart
+3
-0
No files found.
dev/benchmarks/complex_layout/pubspec.yaml
View file @
47b5c37f
...
@@ -11,7 +11,7 @@ dependencies:
...
@@ -11,7 +11,7 @@ dependencies:
flutter_gallery_assets
:
flutter_gallery_assets
:
git
:
git
:
url
:
https://flutter.googlesource.com/gallery-assets
url
:
https://flutter.googlesource.com/gallery-assets
ref
:
6427f36af1bdb2fffaeda1c46d5e52d7b636c93d
ref
:
d318485f208376e06d7e330d9f191141d14722b8
dev_dependencies
:
dev_dependencies
:
flutter_test
:
flutter_test
:
...
...
examples/flutter_gallery/lib/demo/all.dart
View file @
47b5c37f
...
@@ -7,6 +7,7 @@ export 'calculator_demo.dart';
...
@@ -7,6 +7,7 @@ export 'calculator_demo.dart';
export
'colors_demo.dart'
;
export
'colors_demo.dart'
;
export
'contacts_demo.dart'
;
export
'contacts_demo.dart'
;
export
'cupertino/cupertino.dart'
;
export
'cupertino/cupertino.dart'
;
export
'images_demo.dart'
;
export
'material/material.dart'
;
export
'material/material.dart'
;
export
'pesto_demo.dart'
;
export
'pesto_demo.dart'
;
export
'shrine_demo.dart'
;
export
'shrine_demo.dart'
;
...
...
examples/flutter_gallery/lib/demo/images_demo.dart
0 → 100644
View file @
47b5c37f
import
'package:flutter/material.dart'
;
import
'../gallery/demo.dart'
;
class
ImagesDemo
extends
StatelessWidget
{
static
const
String
routeName
=
'/images'
;
@override
Widget
build
(
BuildContext
context
)
{
return
new
TabbedComponentDemoScaffold
(
title:
'Animated images'
,
demos:
<
ComponentDemoTabData
>[
new
ComponentDemoTabData
(
tabName:
'ANIMATED WEBP'
,
description:
''
,
exampleCodeTag:
'animated_image'
,
demoWidget:
new
Image
.
asset
(
'packages/flutter_gallery_assets/animated_flutter_stickers.webp'
),
),
new
ComponentDemoTabData
(
tabName:
'ANIMATED GIF'
,
description:
''
,
exampleCodeTag:
'animated_image'
,
demoWidget:
new
Image
.
asset
(
'packages/flutter_gallery_assets/animated_flutter_lgtm.gif'
),
),
]
);
}
}
examples/flutter_gallery/lib/gallery/example_code.dart
View file @
47b5c37f
...
@@ -227,3 +227,12 @@ new GridView.count(
...
@@ -227,3 +227,12 @@ new GridView.count(
// END
// END
}
}
}
}
class
AnimatedImage
{
void
animatedImage
()
{
// START animated_image
new
Image
.
network
(
'https://example.com/animated-image.gif'
);
// END
}
}
examples/flutter_gallery/lib/gallery/item.dart
View file @
47b5c37f
...
@@ -306,6 +306,14 @@ List<GalleryItem> _buildGalleryItems() {
...
@@ -306,6 +306,14 @@ List<GalleryItem> _buildGalleryItems() {
routeName:
CupertinoSwitchDemo
.
routeName
,
routeName:
CupertinoSwitchDemo
.
routeName
,
buildRoute:
(
BuildContext
context
)
=>
new
CupertinoSwitchDemo
(),
buildRoute:
(
BuildContext
context
)
=>
new
CupertinoSwitchDemo
(),
),
),
// Media
new
GalleryItem
(
title:
'Animated images'
,
subtitle:
'GIF and WebP animations'
,
category:
'Media'
,
routeName:
ImagesDemo
.
routeName
,
buildRoute:
(
BuildContext
context
)
=>
new
ImagesDemo
(),
),
// Styles
// Styles
new
GalleryItem
(
new
GalleryItem
(
title:
'Colors'
,
title:
'Colors'
,
...
...
examples/flutter_gallery/pubspec.yaml
View file @
47b5c37f
...
@@ -12,7 +12,7 @@ dependencies:
...
@@ -12,7 +12,7 @@ dependencies:
flutter_gallery_assets
:
flutter_gallery_assets
:
git
:
git
:
url
:
https://flutter.googlesource.com/gallery-assets
url
:
https://flutter.googlesource.com/gallery-assets
ref
:
6427f36af1bdb2fffaeda1c46d5e52d7b636c93d
ref
:
d318485f208376e06d7e330d9f191141d14722b8
dev_dependencies
:
dev_dependencies
:
flutter_test
:
flutter_test
:
...
@@ -67,6 +67,8 @@ flutter:
...
@@ -67,6 +67,8 @@ flutter:
uses-material-design
:
true
uses-material-design
:
true
assets
:
assets
:
-
lib/gallery/example_code.dart
-
lib/gallery/example_code.dart
-
packages/flutter_gallery_assets/animated_flutter_lgtm.gif
-
packages/flutter_gallery_assets/animated_flutter_stickers.webp
-
packages/flutter_gallery_assets/appbar_background.jpg
-
packages/flutter_gallery_assets/appbar_background.jpg
-
packages/flutter_gallery_assets/appbar/appbar_background_layer0.png
-
packages/flutter_gallery_assets/appbar/appbar_background_layer0.png
-
packages/flutter_gallery_assets/appbar/appbar_background_layer1.png
-
packages/flutter_gallery_assets/appbar/appbar_background_layer1.png
...
...
examples/flutter_gallery/test/live_smoketest.dart
View file @
47b5c37f
...
@@ -100,6 +100,9 @@ const List<Demo> demos = const <Demo>[
...
@@ -100,6 +100,9 @@ const List<Demo> demos = const <Demo>[
const
Demo
(
'Sliders'
),
const
Demo
(
'Sliders'
),
const
Demo
(
'Switches'
),
const
Demo
(
'Switches'
),
// Media
const
Demo
(
'Animated Images'
),
// Style
// Style
const
Demo
(
'Colors'
),
const
Demo
(
'Colors'
),
const
Demo
(
'Typography'
),
const
Demo
(
'Typography'
),
...
...
examples/flutter_gallery/test_driver/transitions_perf_test.dart
View file @
47b5c37f
...
@@ -74,6 +74,9 @@ const List<Demo> demos = const <Demo>[
...
@@ -74,6 +74,9 @@ const List<Demo> demos = const <Demo>[
const
Demo
(
'Sliders'
),
const
Demo
(
'Sliders'
),
const
Demo
(
'Switches'
),
const
Demo
(
'Switches'
),
// Media
const
Demo
(
'Animated Images'
),
// Style
// Style
const
Demo
(
'Colors'
),
const
Demo
(
'Colors'
),
const
Demo
(
'Typography'
),
const
Demo
(
'Typography'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment