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
cdf2779e
Commit
cdf2779e
authored
Nov 27, 2016
by
Ian Hickson
Committed by
GitHub
Nov 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More docs for license screens (#6954)
parent
7c795d5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
5 deletions
+34
-5
licenses.dart
packages/flutter/lib/src/foundation/licenses.dart
+8
-0
about.dart
packages/flutter/lib/src/material/about.dart
+26
-5
No files found.
packages/flutter/lib/src/foundation/licenses.dart
View file @
cdf2779e
...
...
@@ -251,6 +251,14 @@ class LicenseEntryWithLineBreaks extends LicenseEntry {
/// The LICENSE files in each package can either consist of a single license, or
/// can be in the format described above. In the latter case, each component
/// license and list of package names is merged independently.
///
/// See also:
///
/// * [showAboutDialog], which shows a Material-style dialog with information
/// about the application, including a button that shows a [LicensePage] that
/// uses this API to select licenses to show.
/// * [AboutDrawerItem], which is a widget to put in a [Drawer] which
/// automatically calls [showAboutDialog].
class
LicenseRegistry
{
LicenseRegistry
.
_
();
...
...
packages/flutter/lib/src/material/about.dart
View file @
cdf2779e
...
...
@@ -27,11 +27,11 @@ import 'theme.dart';
/// version, icon, and copyright in the appropriate fields.
///
/// The about box will include a button that shows licenses for software used by
/// the application.
/// the application. The licenses shown are those returned by the
/// [LicenseRegistry] API, which can be used to add more licenses to the list.
///
/// If your application does not have a [Drawer], you should provide an
/// affordance to call [showAboutDialog] or (at least) [showLicensePage].
// TODO(ianh): Mention the API for registering more licenses once it exists.
class
AboutDrawerItem
extends
StatelessWidget
{
/// Creates a drawer item for showing an about box.
///
...
...
@@ -137,6 +137,9 @@ class AboutDrawerItem extends StatelessWidget {
///
/// If you do not need an about box in your application, you should at least
/// provide an affordance to call [showLicensePage].
///
/// The licenses shown on the [LicensePage] are those returned by the
/// [LicenseRegistry] API, which can be used to add more licenses to the list.
void
showAboutDialog
(
{
@required
BuildContext
context
,
String
applicationName
,
...
...
@@ -167,7 +170,9 @@ void showAboutDialog({
///
/// The [AboutDialog] shown by [showAboutDialog] includes a button that calls
/// [showLicensePage].
// TODO(ianh): Mention the API for registering more licenses once it exists.
///
/// The licenses shown on the [LicensePage] are those returned by the
/// [LicenseRegistry] API, which can be used to add more licenses to the list.
void
showLicensePage
(
{
@required
BuildContext
context
,
String
applicationName
,
...
...
@@ -191,6 +196,15 @@ void showLicensePage({
/// used by the application.
///
/// To show an [AboutDialog], use [showAboutDialog].
///
/// If the application has a [Drawer], the [AboutDrawerItem] widget can make the
/// process of showing an about dialog simpler.
///
/// The [AboutDialog] shown by [showAboutDialog] includes a button that calls
/// [showLicensePage].
///
/// The licenses shown on the [LicensePage] are those returned by the
/// [LicenseRegistry] API, which can be used to add more licenses to the list.
class
AboutDialog
extends
StatelessWidget
{
/// Creates an about box.
///
...
...
@@ -304,14 +318,21 @@ class AboutDialog extends StatelessWidget {
/// A page that shows licenses for software used by the application.
///
/// To show a [LicensePage], use [showLicensePage].
// TODO(ianh): Mention the API for registering more licenses once it exists.
///
/// The [AboutDialog] shown by [showAboutDialog] and [AboutDrawerItem] includes
/// a button that calls [showLicensePage].
///
/// The licenses shown on the [LicensePage] are those returned by the
/// [LicenseRegistry] API, which can be used to add more licenses to the list.
class
LicensePage
extends
StatefulWidget
{
/// Creates a page that shows licenses for software used by the application.
///
/// The arguments are all optional. The application name, if omitted, will be
/// derived from the nearest [Title] widget. The version and legalese values
/// default to the empty string.
// TODO(ianh): Mention the API for registering more licenses once it exists.
///
/// The licenses shown on the [LicensePage] are those returned by the
/// [LicenseRegistry] API, which can be used to add more licenses to the list.
const
LicensePage
({
Key
key
,
this
.
applicationName
,
...
...
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