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
49bcda52
Unverified
Commit
49bcda52
authored
May 31, 2018
by
Jonah Williams
Committed by
GitHub
May 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove ExcludeSemantics from bottom app bar demo (#18033)
parent
87a6e2b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
30 deletions
+39
-30
bottom_app_bar_demo.dart
...lutter_gallery/lib/demo/material/bottom_app_bar_demo.dart
+39
-30
No files found.
examples/flutter_gallery/lib/demo/material/bottom_app_bar_demo.dart
View file @
49bcda52
...
...
@@ -97,19 +97,19 @@ class _BottomAppBarDemoState extends State<BottomAppBarDemo> {
// App bar color
static
const
List
<
Color
>
kBabColors
=
const
<
Color
>[
null
,
const
Color
(
0xFFFFC100
),
const
Color
(
0xFF91FAFF
),
const
Color
(
0xFF00D1FF
),
const
Color
(
0xFF00BCFF
),
const
Color
(
0xFF009BEE
),
static
const
List
<
_NamedColor
>
kBabColors
=
const
<
_Named
Color
>[
const
_NamedColor
(
null
,
'Clear'
)
,
const
_NamedColor
(
const
Color
(
0xFFFFC100
),
'Orange'
),
const
_NamedColor
(
const
Color
(
0xFF91FAFF
),
'Light Blue'
),
const
_NamedColor
(
const
Color
(
0xFF00D1FF
),
'Cyan'
),
const
_NamedColor
(
const
Color
(
0xFF00BCFF
),
'Cerulean'
),
const
_NamedColor
(
const
Color
(
0xFF009BEE
),
'Blue'
),
];
_ChoiceValue
<
Widget
>
_fabShape
=
kCircularFab
;
_ChoiceValue
<
bool
>
_showNotch
=
kShowNotchTrue
;
_ChoiceValue
<
FloatingActionButtonLocation
>
_fabLocation
=
kFabEndDocked
;
Color
_babColor
=
kBabColors
.
first
;
Color
_babColor
=
kBabColors
.
first
.
color
;
void
_onShowNotchChanged
(
_ChoiceValue
<
bool
>
value
)
{
setState
(()
{
...
...
@@ -250,37 +250,46 @@ class _RadioItem<T> extends StatelessWidget {
}
}
class
_NamedColor
{
const
_NamedColor
(
this
.
color
,
this
.
name
);
final
Color
color
;
final
String
name
;
}
class
_ColorsItem
extends
StatelessWidget
{
const
_ColorsItem
(
this
.
colors
,
this
.
selectedColor
,
this
.
onChanged
);
final
List
<
Color
>
colors
;
final
List
<
_Named
Color
>
colors
;
final
Color
selectedColor
;
final
ValueChanged
<
Color
>
onChanged
;
@override
Widget
build
(
BuildContext
context
)
{
return
new
ExcludeSemantics
(
child:
new
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
colors
.
map
((
Color
color
)
{
return
new
RawMaterialButton
(
onPressed:
()
{
onChanged
(
color
);
},
constraints:
const
BoxConstraints
.
tightFor
(
width:
32.0
,
height:
32.0
,
),
fillColor:
color
,
shape:
new
CircleBorder
(
side:
new
BorderSide
(
color:
color
==
selectedColor
?
Colors
.
black
:
const
Color
(
0xFFD5D7DA
),
width:
2.0
,
),
return
new
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
colors
.
map
((
_NamedColor
namedColor
)
{
return
new
RawMaterialButton
(
onPressed:
()
{
onChanged
(
namedColor
.
color
);
},
constraints:
const
BoxConstraints
.
tightFor
(
width:
32.0
,
height:
32.0
,
),
fillColor:
namedColor
.
color
,
shape:
new
CircleBorder
(
side:
new
BorderSide
(
color:
namedColor
.
color
==
selectedColor
?
Colors
.
black
:
const
Color
(
0xFFD5D7DA
),
width:
2.0
,
),
);
}).
toList
(),
),
),
child:
new
Semantics
(
value:
namedColor
.
name
,
selected:
namedColor
.
color
==
selectedColor
,
),
);
}).
toList
(),
);
}
}
...
...
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