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
0a4f96e2
Commit
0a4f96e2
authored
Jun 25, 2016
by
Hans Muller
Committed by
GitHub
Jun 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gallery about box: state Flutter's status and link to our website (#4746)
parent
ae835f08
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
5 deletions
+50
-5
drawer.dart
examples/flutter_gallery/lib/gallery/drawer.dart
+50
-5
No files found.
examples/flutter_gallery/lib/gallery/drawer.dart
View file @
0a4f96e2
...
@@ -2,7 +2,19 @@
...
@@ -2,7 +2,19 @@
// 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.
import
'package:flutter/gestures.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
class
LinkTextSpan
extends
TextSpan
{
LinkTextSpan
({
TextStyle
style
,
String
url
,
String
text
})
:
super
(
style:
style
,
text:
text
??
url
,
recognizer:
new
TapGestureRecognizer
()..
onTap
=
()
{
UrlLauncher
.
launch
(
url
);
}
);
}
class
GalleryDrawer
extends
StatelessWidget
{
class
GalleryDrawer
extends
StatelessWidget
{
GalleryDrawer
({
GalleryDrawer
({
...
@@ -29,6 +41,10 @@ class GalleryDrawer extends StatelessWidget {
...
@@ -29,6 +41,10 @@ class GalleryDrawer extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
ThemeData
themeData
=
Theme
.
of
(
context
);
TextStyle
aboutTextStyle
=
themeData
.
textTheme
.
body2
;
TextStyle
aboutLinkStyle
=
themeData
.
textTheme
.
body2
.
copyWith
(
color:
themeData
.
accentColor
);
return
new
Drawer
(
return
new
Drawer
(
child:
new
Block
(
child:
new
Block
(
children:
<
Widget
>[
children:
<
Widget
>[
...
@@ -100,12 +116,41 @@ class GalleryDrawer extends StatelessWidget {
...
@@ -100,12 +116,41 @@ class GalleryDrawer extends StatelessWidget {
applicationLegalese:
'© 2016 The Chromium Authors'
,
applicationLegalese:
'© 2016 The Chromium Authors'
,
aboutBoxChildren:
<
Widget
>[
aboutBoxChildren:
<
Widget
>[
new
Padding
(
new
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
24.0
,
bottom:
8.0
),
padding:
const
EdgeInsets
.
only
(
top:
24.0
),
child:
new
Center
(
child:
new
CircularProgressIndicator
())
child:
new
RichText
(
text:
new
TextSpan
(
children:
<
TextSpan
>[
new
TextSpan
(
style:
aboutTextStyle
,
text:
"Flutter is an early-stage, open-source project to help "
"developers build high-performance, high-fidelity, mobile "
"apps for iOS and Android from a single codebase. This "
"gallery is a preview of Flutter's many widgets, behaviors, "
"animations, layouts, and more. Learn more about Flutter at "
),
),
new
Text
(
'Awaiting fix for issue 4512.'
,
textAlign:
TextAlign
.
center
),
new
LinkTextSpan
(
]
style:
aboutLinkStyle
,
url:
'https://flutter.io'
),
new
TextSpan
(
style:
aboutTextStyle
,
text:
".
\n\n
To see the source code for this app, please visit the "
),
new
LinkTextSpan
(
style:
aboutLinkStyle
,
url:
'https://goo.gl/iv1p4G'
,
text:
'flutter github repo'
),
),
new
TextSpan
(
style:
aboutTextStyle
,
text:
"."
)
]
)
)
)
]
)
]
]
)
)
);
);
...
...
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