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
c5996629
Unverified
Commit
c5996629
authored
Mar 16, 2018
by
Hans Muller
Committed by
GitHub
Mar 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a Backdrop demo to the Gallery (#15579)
parent
dd0acea1
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
417 additions
and
6 deletions
+417
-6
backdrop_demo.dart
...ples/flutter_gallery/lib/demo/material/backdrop_demo.dart
+402
-0
material.dart
examples/flutter_gallery/lib/demo/material/material.dart
+1
-0
item.dart
examples/flutter_gallery/lib/gallery/item.dart
+7
-0
theme.dart
examples/flutter_gallery/lib/gallery/theme.dart
+3
-3
example_code_display_test.dart
examples/flutter_gallery/test/example_code_display_test.dart
+2
-3
smoke_test.dart
examples/flutter_gallery/test/smoke_test.dart
+2
-0
No files found.
examples/flutter_gallery/lib/demo/material/backdrop_demo.dart
0 → 100644
View file @
c5996629
This diff is collapsed.
Click to expand it.
examples/flutter_gallery/lib/demo/material/material.dart
View file @
c5996629
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
export
'backdrop_demo.dart'
;
export
'bottom_navigation_demo.dart'
;
export
'bottom_navigation_demo.dart'
;
export
'buttons_demo.dart'
;
export
'buttons_demo.dart'
;
export
'cards_demo.dart'
;
export
'cards_demo.dart'
;
...
...
examples/flutter_gallery/lib/gallery/item.dart
View file @
c5996629
...
@@ -81,6 +81,13 @@ List<GalleryItem> _buildGalleryItems() {
...
@@ -81,6 +81,13 @@ List<GalleryItem> _buildGalleryItems() {
buildRoute:
(
BuildContext
context
)
=>
const
VideoDemo
(),
buildRoute:
(
BuildContext
context
)
=>
const
VideoDemo
(),
),
),
// Material Components
// Material Components
new
GalleryItem
(
title:
'Backdrop'
,
subtitle:
'Select a front layer from back layer'
,
category:
'Material Components'
,
routeName:
BackdropDemo
.
routeName
,
buildRoute:
(
BuildContext
context
)
=>
new
BackdropDemo
(),
),
new
GalleryItem
(
new
GalleryItem
(
title:
'Bottom navigation'
,
title:
'Bottom navigation'
,
subtitle:
'Bottom navigation with cross-fading views'
,
subtitle:
'Bottom navigation with cross-fading views'
,
...
...
examples/flutter_gallery/lib/gallery/theme.dart
View file @
c5996629
...
@@ -11,16 +11,16 @@ class GalleryTheme {
...
@@ -11,16 +11,16 @@ class GalleryTheme {
final
ThemeData
theme
;
final
ThemeData
theme
;
}
}
const
int
_kPurplePrimaryValue
=
0xFF6200EE
;
const
MaterialColor
_kPurpleSwatch
=
const
MaterialColor
(
const
MaterialColor
_kPurpleSwatch
=
const
MaterialColor
(
500
,
_kPurplePrimaryValue
,
const
<
int
,
Color
>
{
const
<
int
,
Color
>
{
50
:
const
Color
(
0xFFF2E7FE
),
50
:
const
Color
(
0xFFF2E7FE
),
100
:
const
Color
(
0xFFD7B7FD
),
100
:
const
Color
(
0xFFD7B7FD
),
200
:
const
Color
(
0xFFBB86FC
),
200
:
const
Color
(
0xFFBB86FC
),
300
:
const
Color
(
0xFF9E55FC
),
300
:
const
Color
(
0xFF9E55FC
),
400
:
const
Color
(
0xFF7F22FD
),
400
:
const
Color
(
0xFF7F22FD
),
500
:
const
Color
(
0xFF6200EE
),
500
:
const
Color
(
_kPurplePrimaryValue
),
600
:
const
Color
(
0xFF4B00D1
),
700
:
const
Color
(
0xFF3700B3
),
700
:
const
Color
(
0xFF3700B3
),
800
:
const
Color
(
0xFF270096
),
800
:
const
Color
(
0xFF270096
),
900
:
const
Color
(
0xFF190078
),
900
:
const
Color
(
0xFF190078
),
...
...
examples/flutter_gallery/test/example_code_display_test.dart
View file @
c5996629
...
@@ -23,9 +23,8 @@ void main() {
...
@@ -23,9 +23,8 @@ void main() {
final
Offset
allDemosOrigin
=
tester
.
getTopRight
(
find
.
text
(
'Demos'
));
final
Offset
allDemosOrigin
=
tester
.
getTopRight
(
find
.
text
(
'Demos'
));
final
Finder
button
=
find
.
text
(
'Buttons'
);
final
Finder
button
=
find
.
text
(
'Buttons'
);
while
(
button
.
evaluate
().
isEmpty
)
{
while
(
button
.
evaluate
().
isEmpty
)
{
await
tester
.
dragFrom
(
allDemosOrigin
,
const
Offset
(
0.0
,
-
100.0
));
await
tester
.
dragFrom
(
allDemosOrigin
,
const
Offset
(
0.0
,
-
200.0
));
await
tester
.
pump
();
// start the scroll
await
tester
.
pumpAndSettle
();
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
}
}
// Launch the buttons demo and then prove that showing the example
// Launch the buttons demo and then prove that showing the example
...
...
examples/flutter_gallery/test/smoke_test.dart
View file @
c5996629
...
@@ -128,6 +128,8 @@ Future<Null> runSmokeTest(WidgetTester tester) async {
...
@@ -128,6 +128,8 @@ Future<Null> runSmokeTest(WidgetTester tester) async {
final
Finder
finder
=
findGalleryItemByRouteName
(
tester
,
routeName
);
final
Finder
finder
=
findGalleryItemByRouteName
(
tester
,
routeName
);
Scrollable
.
ensureVisible
(
tester
.
element
(
finder
),
alignment:
0.5
);
Scrollable
.
ensureVisible
(
tester
.
element
(
finder
),
alignment:
0.5
);
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
if
(
routeName
==
'/material/backdrop'
)
continue
;
await
smokeDemo
(
tester
,
routeName
);
await
smokeDemo
(
tester
,
routeName
);
tester
.
binding
.
debugAssertNoTransientCallbacks
(
'A transient callback was still active after leaving route
$routeName
'
);
tester
.
binding
.
debugAssertNoTransientCallbacks
(
'A transient callback was still active after leaving route
$routeName
'
);
}
}
...
...
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