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
8601bb7b
Commit
8601bb7b
authored
Sep 06, 2019
by
Walid Elalaouy
Committed by
Hans Muller
Sep 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add showAboutDialog sample (#39299)
parent
3f4d27c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
0 deletions
+71
-0
about.dart
packages/flutter/lib/src/material/about.dart
+71
-0
No files found.
packages/flutter/lib/src/material/about.dart
View file @
8601bb7b
...
...
@@ -33,6 +33,77 @@ import 'theme.dart';
///
/// If your application does not have a [Drawer], you should provide an
/// affordance to call [showAboutDialog] or (at least) [showLicensePage].
/// {@tool snippet --template=stateless_widget_material}
///
/// This sample shows two ways to open [AboutDialog]. The first one
/// uses an [AboutListTile], and the second uses the [showAboutDialog] function.
///
/// ```dart
///
/// Widget build(BuildContext context) {
/// final TextStyle textStyle = Theme.of(context).textTheme.body1;
/// final List<Widget> aboutBoxChildren = <Widget>[
/// SizedBox(height: 24),
/// RichText(
/// text: TextSpan(
/// children: <TextSpan>[
/// TextSpan(
/// style: textStyle,
/// text: 'Flutter is Google’s UI toolkit for building beautiful, '
/// 'natively compiled applications for mobile, web, and desktop '
/// 'from a single codebase. Learn more about Flutter at '
/// ),
/// TextSpan(
/// style: textStyle.copyWith(color: Theme.of(context).accentColor),
/// text: 'https://flutter.dev'
/// ),
/// TextSpan(
/// style: textStyle,
/// text: '.'
/// ),
/// ],
/// ),
/// ),
/// ];
///
/// return Scaffold(
/// appBar: AppBar(
/// title: Text('Show About Example'),
/// ),
/// drawer: Drawer(
/// child: SingleChildScrollView(
/// child: SafeArea(
/// child: AboutListTile(
/// icon: Icon(Icons.info),
/// applicationIcon: FlutterLogo(),
/// applicationName: 'Show About Example',
/// applicationVersion: 'August 2019',
/// applicationLegalese: '© 2019 The Chromium Authors',
/// aboutBoxChildren: aboutBoxChildren,
/// ),
/// ),
/// ),
/// ),
/// body: Center(
/// child: RaisedButton(
/// child: Text('Show About Example'),
/// onPressed: () {
/// showAboutDialog(
/// context: context,
/// applicationIcon: FlutterLogo(),
/// applicationName: 'Show About Example',
/// applicationVersion: 'August 2019',
/// applicationLegalese: '© 2019 The Chromium Authors',
/// children: aboutBoxChildren,
/// );
/// },
/// ),
/// ),
/// );
///}
/// ```
/// {@end-tool}
///
class
AboutListTile
extends
StatelessWidget
{
/// Creates a list tile for showing an about box.
///
...
...
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