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
e4f53c3a
Commit
e4f53c3a
authored
Oct 19, 2017
by
Sarah Zakarias
Committed by
GitHub
Oct 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'package' argument to IconData (#12560)
parent
ce6f8d3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
15 deletions
+24
-15
icons.dart
packages/flutter/lib/src/cupertino/icons.dart
+16
-15
icon.dart
packages/flutter/lib/src/widgets/icon.dart
+1
-0
icon_data.dart
packages/flutter/lib/src/widgets/icon_data.dart
+7
-0
No files found.
packages/flutter/lib/src/cupertino/icons.dart
View file @
e4f53c3a
...
...
@@ -27,35 +27,36 @@ import 'package:flutter/widgets.dart';
class
CupertinoIcons
{
CupertinoIcons
.
_
();
static
const
String
iconFont
=
'packages/cupertino_icons/CupertinoIcons'
;
static
const
String
iconFont
=
'CupertinoIcons'
;
static
const
String
iconFontPackage
=
'cupertino_icons'
;
// Manually maintained list
static
const
IconData
left_chevron
=
const
IconData
(
0xf3f0
,
fontFamily:
iconFont
);
static
const
IconData
left_chevron
=
const
IconData
(
0xf3f0
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
right_chevron
=
const
IconData
(
0xf3f2
,
fontFamily:
iconFont
);
static
const
IconData
right_chevron
=
const
IconData
(
0xf3f2
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
share
=
const
IconData
(
0xf4ca
,
fontFamily:
iconFont
);
static
const
IconData
share
=
const
IconData
(
0xf4ca
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
book
=
const
IconData
(
0xf3e7
,
fontFamily:
iconFont
);
static
const
IconData
book
=
const
IconData
(
0xf3e7
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
info
=
const
IconData
(
0xf44c
,
fontFamily:
iconFont
);
static
const
IconData
info
=
const
IconData
(
0xf44c
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
reply
=
const
IconData
(
0xf4c6
,
fontFamily:
iconFont
);
static
const
IconData
reply
=
const
IconData
(
0xf4c6
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
conversation_bubble
=
const
IconData
(
0xf3fb
,
fontFamily:
iconFont
);
static
const
IconData
conversation_bubble
=
const
IconData
(
0xf3fb
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
profile_circled
=
const
IconData
(
0xf419
,
fontFamily:
iconFont
);
static
const
IconData
profile_circled
=
const
IconData
(
0xf419
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
plus_circled
=
const
IconData
(
0xf48a
,
fontFamily:
iconFont
);
static
const
IconData
plus_circled
=
const
IconData
(
0xf48a
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
minus_circled
=
const
IconData
(
0xf463
,
fontFamily:
iconFont
);
static
const
IconData
minus_circled
=
const
IconData
(
0xf463
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
flag
=
const
IconData
(
0xf42c
,
fontFamily:
iconFont
);
static
const
IconData
flag
=
const
IconData
(
0xf42c
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
search
=
const
IconData
(
0xf4c6
,
fontFamily:
iconFont
);
static
const
IconData
search
=
const
IconData
(
0xf4c6
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
check_mark
=
const
IconData
(
0xf41e
,
fontFamily:
iconFont
);
static
const
IconData
check_mark
=
const
IconData
(
0xf41e
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
static
const
IconData
check_mark_circled
=
const
IconData
(
0xf41f
,
fontFamily:
iconFont
);
static
const
IconData
check_mark_circled
=
const
IconData
(
0xf41f
,
fontFamily:
iconFont
,
fontPackage:
iconFontPackage
);
}
\ No newline at end of file
packages/flutter/lib/src/widgets/icon.dart
View file @
e4f53c3a
...
...
@@ -132,6 +132,7 @@ class Icon extends StatelessWidget {
color:
iconColor
,
fontSize:
iconSize
,
fontFamily:
icon
.
fontFamily
,
package:
icon
.
fontPackage
,
),
),
),
...
...
packages/flutter/lib/src/widgets/icon_data.dart
View file @
e4f53c3a
...
...
@@ -14,9 +14,13 @@ class IconData {
///
/// Rarely used directly. Instead, consider using one of the predefined icons
/// like the [Icons] collection.
///
/// The [fontPackage] argument must be non-null when using a font family that
/// is included in a package. This is used when selecting the font.
const
IconData
(
this
.
codePoint
,
{
this
.
fontFamily
,
this
.
fontPackage
,
});
/// The Unicode code point at which this icon is stored in the icon font.
...
...
@@ -25,6 +29,9 @@ class IconData {
/// The font family from which the glyph for the [codePoint] will be selected.
final
String
fontFamily
;
// The name of the package from which the font family is included.
final
String
fontPackage
;
@override
bool
operator
==(
dynamic
other
)
{
if
(
runtimeType
!=
other
.
runtimeType
)
...
...
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