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
cdf80b64
Unverified
Commit
cdf80b64
authored
Apr 19, 2018
by
xster
Committed by
GitHub
Apr 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't show the 'preview' banner on published gallery (#16727)
parent
133c98a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
10 deletions
+42
-10
travis_script.sh
dev/bots/travis_script.sh
+23
-5
home.dart
examples/flutter_gallery/lib/gallery/home.dart
+6
-5
main_publish.dart
examples/flutter_gallery/lib/main_publish.dart
+13
-0
No files found.
dev/bots/travis_script.sh
View file @
cdf80b64
...
...
@@ -10,25 +10,43 @@ if [ "$SHARD" = "build_and_deploy_gallery" ]; then
if
[
"
$TRAVIS_OS_NAME
"
=
"linux"
]
;
then
echo
"Building Flutter Gallery for Android..."
export
ANDROID_HOME
=
`
pwd
`
/android-sdk
(
cd
examples/flutter_gallery
;
flutter build apk
--release
)
(
cd
examples/flutter_gallery
flutter build apk
--release
-t
lib/main_publish.dart
)
echo
"Android Flutter Gallery built"
if
[[
"
$TRAVIS_PULL_REQUEST
"
==
"false"
&&
"
$TRAVIS_BRANCH
"
==
"dev"
&&
$version
!=
*
"pre"
*
]]
;
then
echo
"Deploying to Play Store..."
(
cd
examples/flutter_gallery/android
;
bundle
install
&&
bundle
exec
fastlane deploy_play_store
)
(
cd
examples/flutter_gallery/android
bundle
install
bundle
exec
fastlane deploy_play_store
)
else
echo
"Flutter Gallery is only deployed to the Play Store on merged and tagged dev branch commits"
fi
elif
[
"
$TRAVIS_OS_NAME
"
=
"osx"
]
;
then
echo
"Building Flutter Gallery for iOS..."
(
cd
examples/flutter_gallery
;
flutter build ios
--release
--no-codesign
)
(
cd
examples/flutter_gallery
flutter build ios
--release
--no-codesign
-t
lib/main_publish.dart
)
echo
"iOS Flutter Gallery built"
if
[[
"
$TRAVIS_PULL_REQUEST
"
==
"false"
]]
;
then
if
[[
"
$TRAVIS_BRANCH
"
==
"dev"
&&
$version
!=
*
"pre"
*
]]
;
then
echo
"Archiving with distribution profile and deploying to TestFlight..."
(
cd
examples/flutter_gallery/ios
;
bundle
install
&&
bundle
exec
fastlane build_and_deploy_testflight upload:true
)
(
cd
examples/flutter_gallery/ios
bundle
install
bundle
exec
fastlane build_and_deploy_testflight upload:true
)
else
echo
"Archiving with distribution profile..."
(
cd
examples/flutter_gallery/ios
;
bundle
install
&&
bundle
exec
fastlane build_and_deploy_testflight
)
(
cd
examples/flutter_gallery/ios
bundle
install
bundle
exec
fastlane build_and_deploy_testflight
)
echo
"Archive is only deployed to TestFlight on tagged dev branch commits"
fi
else
...
...
examples/flutter_gallery/lib/gallery/home.dart
View file @
cdf80b64
...
...
@@ -85,6 +85,10 @@ class GalleryHome extends StatefulWidget {
assert
(
onTimeDilationChanged
!=
null
),
super
(
key:
key
);
// In checked mode our MaterialApp will show the default "debug" banner.
// Otherwise show the "preview" banner.
static
bool
showPreviewBanner
=
true
;
final
GalleryTheme
galleryTheme
;
final
ValueChanged
<
GalleryTheme
>
onThemeChanged
;
...
...
@@ -206,15 +210,12 @@ class GalleryHomeState extends State<GalleryHome> with SingleTickerProviderState
)
);
// In checked mode our MaterialApp will show the default "debug" banner.
// Otherwise show the "preview" banner.
bool
showPreviewBanner
=
true
;
assert
(()
{
showPreviewBanner
=
false
;
GalleryHome
.
showPreviewBanner
=
false
;
return
true
;
}());
if
(
showPreviewBanner
)
{
if
(
GalleryHome
.
showPreviewBanner
)
{
home
=
new
Stack
(
fit:
StackFit
.
expand
,
children:
<
Widget
>[
...
...
examples/flutter_gallery/lib/main_publish.dart
0 → 100644
View file @
cdf80b64
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'gallery/home.dart'
;
import
'main.dart'
as
other_main
;
// This main chain-calls main.dart's main. This file is used for publishing
// the gallery and removes the 'PREVIEW' banner.
void
main
(
)
{
GalleryHome
.
showPreviewBanner
=
false
;
other_main
.
main
();
}
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