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
c7c730d0
Commit
c7c730d0
authored
Mar 02, 2016
by
Hixie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide icons in the accessibility tree.
parent
3d9e70ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
11 deletions
+27
-11
icon.dart
packages/flutter/lib/src/material/icon.dart
+27
-11
No files found.
packages/flutter/lib/src/material/icon.dart
View file @
c7c730d0
...
...
@@ -9,11 +9,24 @@ import 'icons.dart';
import
'icon_theme.dart'
;
import
'theme.dart'
;
/// A material design icon.
///
/// Available icons are shown on this page:
/// <https://design.google.com/icons/>
///
/// Icons are identified by their name (as given on that page), with
/// spaces converted to underscores, from the [Icons] class. For
/// example, the "alarm add" icon is [Icons.alarm_add].
///
/// To use this class, make sure you set `uses-material-design: true`
/// in your project's `flutter.yaml` file. This ensures that the
/// MaterialIcons font is included in your application. This font is
/// used to display the icons.
class
Icon
extends
StatelessComponent
{
Icon
({
Key
key
,
this
.
size
:
24.0
,
this
.
icon
,
this
.
size
:
24.0
,
this
.
color
})
:
super
(
key:
key
)
{
assert
(
size
!=
null
);
...
...
@@ -52,16 +65,19 @@ class Icon extends StatelessComponent {
if
(
iconAlpha
!=
255
)
iconColor
=
color
.
withAlpha
((
iconAlpha
*
color
.
opacity
).
round
());
return
new
SizedBox
(
width:
size
,
height:
size
,
child:
new
Center
(
child:
new
Text
(
new
String
.
fromCharCode
(
icon
.
codePoint
),
style:
new
TextStyle
(
inherit:
false
,
color:
iconColor
,
fontSize:
size
,
fontFamily:
'MaterialIcons'
return
new
ExcludeSemantics
(
child:
new
SizedBox
(
width:
size
,
height:
size
,
child:
new
Center
(
child:
new
Text
(
new
String
.
fromCharCode
(
icon
.
codePoint
),
style:
new
TextStyle
(
inherit:
false
,
color:
iconColor
,
fontSize:
size
,
fontFamily:
'MaterialIcons'
)
)
)
)
...
...
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