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
16ce090f
Commit
16ce090f
authored
Nov 02, 2016
by
Chris Bracken
Committed by
GitHub
Nov 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate direct access of Typography.black/white in manual tests (#6640)
parent
58630cc2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
card_collection.dart
dev/manual_tests/card_collection.dart
+4
-3
drag_and_drop.dart
dev/manual_tests/drag_and_drop.dart
+1
-1
raw_keyboard.dart
dev/manual_tests/raw_keyboard.dart
+6
-5
No files found.
dev/manual_tests/card_collection.dart
View file @
16ce090f
...
...
@@ -32,8 +32,6 @@ class CardCollectionState extends State<CardCollection> {
static
const
double
kCardMargins
=
8.0
;
static
const
double
kFixedCardHeight
=
100.0
;
final
TextStyle
backgroundTextStyle
=
Typography
.
white
.
title
;
Map
<
int
,
Color
>
_primaryColor
=
Colors
.
deepPurple
;
List
<
CardModel
>
_cardModels
;
DismissDirection
_dismissDirection
=
DismissDirection
.
horizontal
;
...
...
@@ -358,6 +356,9 @@ class CardCollectionState extends State<CardCollection> {
if
(
_dismissDirection
==
DismissDirection
.
endToStart
)
rightArrowIcon
=
new
Opacity
(
opacity:
0.1
,
child:
rightArrowIcon
);
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
TextStyle
backgroundTextStyle
=
theme
.
primaryTextTheme
.
title
;
// The background Widget appears behind the Dismissable card when the card
// moves to the left or right. The Positioned widget ensures that the
// size of the background,card Stack will be based only on the card. The
...
...
@@ -369,7 +370,7 @@ class CardCollectionState extends State<CardCollection> {
child:
new
Viewport
(
child:
new
Container
(
height:
cardModel
.
height
,
decoration:
new
BoxDecoration
(
backgroundColor:
Theme
.
of
(
context
)
.
primaryColor
),
decoration:
new
BoxDecoration
(
backgroundColor:
theme
.
primaryColor
),
child:
new
Row
(
children:
<
Widget
>[
leftArrowIcon
,
...
...
dev/manual_tests/drag_and_drop.dart
View file @
16ce090f
...
...
@@ -186,7 +186,7 @@ class MovableBall extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
Widget
ball
=
new
DefaultTextStyle
(
style:
T
ypography
.
whit
e
.
body1
,
style:
T
heme
.
of
(
context
).
primaryTextThem
e
.
body1
,
textAlign:
TextAlign
.
center
,
child:
new
Dot
(
key:
kBallKey
,
...
...
dev/manual_tests/raw_keyboard.dart
View file @
16ce090f
...
...
@@ -41,6 +41,7 @@ class _HardwareKeyDemoState extends State<RawKeyboardDemo> {
@override
Widget
build
(
BuildContext
context
)
{
final
TextTheme
textTheme
=
Theme
.
of
(
context
).
textTheme
;
bool
focused
=
Focus
.
at
(
context
);
Widget
child
;
if
(!
focused
)
{
...
...
@@ -49,12 +50,12 @@ class _HardwareKeyDemoState extends State<RawKeyboardDemo> {
Focus
.
moveTo
(
config
.
key
);
},
child:
new
Center
(
child:
new
Text
(
'Tap to focus'
,
style:
Typography
.
black
.
display1
),
child:
new
Text
(
'Tap to focus'
,
style:
textTheme
.
display1
),
),
);
}
else
if
(
_event
==
null
)
{
child
=
new
Center
(
child:
new
Text
(
'Press a key'
,
style:
Typography
.
black
.
display1
),
child:
new
Text
(
'Press a key'
,
style:
textTheme
.
display1
),
);
}
else
{
int
codePoint
;
...
...
@@ -67,9 +68,9 @@ class _HardwareKeyDemoState extends State<RawKeyboardDemo> {
child
=
new
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
new
Text
(
'
${_event.runtimeType}
'
,
style:
Typography
.
black
.
body2
),
new
Text
(
'codePoint:
$codePoint
'
,
style:
Typography
.
black
.
display4
),
new
Text
(
'keyCode:
$keyCode
'
,
style:
Typography
.
black
.
display4
),
new
Text
(
'
${_event.runtimeType}
'
,
style:
textTheme
.
body2
),
new
Text
(
'codePoint:
$codePoint
'
,
style:
textTheme
.
display4
),
new
Text
(
'keyCode:
$keyCode
'
,
style:
textTheme
.
display4
),
],
);
}
...
...
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