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
6b7634b7
Unverified
Commit
6b7634b7
authored
Aug 05, 2020
by
Hans Muller
Committed by
GitHub
Aug 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed old button widget references from dev/manual_tests (#62816)
parent
76a2f42e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
145 additions
and
93 deletions
+145
-93
actions.dart
dev/manual_tests/lib/actions.dart
+13
-5
density.dart
dev/manual_tests/lib/density.dart
+11
-9
focus.dart
dev/manual_tests/lib/focus.dart
+11
-4
hover.dart
dev/manual_tests/lib/hover.dart
+10
-6
text.dart
dev/manual_tests/lib/text.dart
+100
-69
No files found.
dev/manual_tests/lib/actions.dart
View file @
6b7634b7
...
...
@@ -328,10 +328,18 @@ class _DemoButtonState extends State<DemoButton> {
@override
Widget
build
(
BuildContext
context
)
{
return
Fla
tButton
(
return
Tex
tButton
(
focusNode:
_focusNode
,
focusColor:
Colors
.
red
,
hoverColor:
Colors
.
blue
,
style:
ButtonStyle
(
foregroundColor:
MaterialStateProperty
.
all
<
Color
>(
Colors
.
black
),
overlayColor:
MaterialStateProperty
.
resolveWith
<
Color
>((
Set
<
MaterialState
>
states
)
{
if
(
states
.
contains
(
MaterialState
.
focused
))
return
Colors
.
red
;
if
(
states
.
contains
(
MaterialState
.
hovered
))
return
Colors
.
blue
;
return
null
;
}),
),
onPressed:
()
=>
_handleOnPressed
(),
child:
Text
(
widget
.
name
,
key:
_nameKey
),
);
...
...
@@ -447,7 +455,7 @@ class _FocusDemoState extends State<FocusDemo> {
children:
<
Widget
>[
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
const
Text
(
'UNDO'
),
onPressed:
canUndo
?
()
{
...
...
@@ -458,7 +466,7 @@ class _FocusDemoState extends State<FocusDemo> {
),
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
Rais
edButton
(
child:
Elevat
edButton
(
child:
const
Text
(
'REDO'
),
onPressed:
canRedo
?
()
{
...
...
dev/manual_tests/lib/density.dart
View file @
6b7634b7
...
...
@@ -535,25 +535,27 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
_ControlTile
(
label:
_model
.
rtl
?
'زر مسطح'
:
'Flat Button'
,
child:
FlatButton
(
color:
m2Swatch
[
200
],
label:
_model
.
rtl
?
'زر مسطح'
:
'Text Button'
,
child:
TextButton
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
white
,
backgroundColor:
m2Swatch
[
200
]
),
onPressed:
_model
.
enable
?
()
{}
:
null
,
child:
label
,
),
),
_ControlTile
(
label:
_model
.
rtl
?
'أثارت زر'
:
'
Rais
ed Button'
,
child:
Rais
edButton
(
color:
m2Swatch
[
200
]
,
label:
_model
.
rtl
?
'أثارت زر'
:
'
Elevat
ed Button'
,
child:
Elevat
edButton
(
style:
TextButton
.
styleFrom
(
backgroundColor:
m2Swatch
[
200
])
,
onPressed:
_model
.
enable
?
()
{}
:
null
,
child:
label
,
),
),
_ControlTile
(
label:
_model
.
rtl
?
'زر المخطط التفصيلي'
:
'Outline Button'
,
child:
OutlineButton
(
color:
m2Swatch
[
500
],
label:
_model
.
rtl
?
'زر المخطط التفصيلي'
:
'Outlined Button'
,
child:
OutlinedButton
(
onPressed:
_model
.
enable
?
()
{}
:
null
,
child:
label
,
),
...
...
dev/manual_tests/lib/focus.dart
View file @
6b7634b7
...
...
@@ -57,11 +57,18 @@ class _DemoButtonState extends State<DemoButton> {
@override
Widget
build
(
BuildContext
context
)
{
return
Fla
tButton
(
return
Tex
tButton
(
focusNode:
focusNode
,
autofocus:
widget
.
autofocus
,
focusColor:
Colors
.
red
,
hoverColor:
Colors
.
blue
,
style:
ButtonStyle
(
overlayColor:
MaterialStateProperty
.
resolveWith
<
Color
>((
Set
<
MaterialState
>
states
)
{
if
(
states
.
contains
(
MaterialState
.
focused
))
return
Colors
.
red
.
withOpacity
(
0.25
);
if
(
states
.
contains
(
MaterialState
.
hovered
))
return
Colors
.
blue
.
withOpacity
(
0.25
);
return
null
;
}),
),
onPressed:
()
=>
_handleOnPressed
(),
child:
Text
(
widget
.
name
),
);
...
...
@@ -178,7 +185,7 @@ class _FocusDemoState extends State<FocusDemo> {
DemoButton
(
name:
'Six'
),
],
),
OutlineButton
(
onPressed:
()
=>
print
(
'pressed'
),
child:
const
Text
(
'PRESS ME'
)),
Outline
d
Button
(
onPressed:
()
=>
print
(
'pressed'
),
child:
const
Text
(
'PRESS ME'
)),
const
Padding
(
padding:
EdgeInsets
.
all
(
8.0
),
child:
TextField
(
...
...
dev/manual_tests/lib/hover.dart
View file @
6b7634b7
...
...
@@ -4,7 +4,6 @@
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/widgets.dart'
;
void
main
(
)
{
runApp
(
const
MaterialApp
(
...
...
@@ -24,7 +23,7 @@ class DemoButton extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
Fla
tButton
(
return
Tex
tButton
(
onPressed:
()
=>
_handleOnPressed
(),
child:
Text
(
name
),
);
...
...
@@ -42,6 +41,11 @@ class _HoverDemoState extends State<HoverDemo> {
@override
Widget
build
(
BuildContext
context
)
{
final
TextTheme
textTheme
=
Theme
.
of
(
context
).
textTheme
;
final
ButtonStyle
overrideFocusColor
=
ButtonStyle
(
overlayColor:
MaterialStateProperty
.
resolveWith
<
Color
>((
Set
<
MaterialState
>
states
)
{
return
states
.
contains
(
MaterialState
.
focused
)
?
Colors
.
deepOrangeAccent
:
null
;
})
);
return
DefaultTextStyle
(
style:
textTheme
.
headline4
,
...
...
@@ -60,15 +64,15 @@ class _HoverDemoState extends State<HoverDemo> {
children:
<
Widget
>[
Row
(
children:
<
Widget
>[
Rais
edButton
(
Elevat
edButton
(
onPressed:
()
=>
print
(
'Button pressed.'
),
child:
const
Text
(
'Button'
),
focusColor:
Colors
.
deepOrangeAccent
,
style:
overrideFocusColor
,
),
Fla
tButton
(
Tex
tButton
(
onPressed:
()
=>
print
(
'Button pressed.'
),
child:
const
Text
(
'Button'
),
focusColor:
Colors
.
deepOrangeAccent
,
style:
overrideFocusColor
,
),
IconButton
(
onPressed:
()
=>
print
(
'Button pressed'
),
...
...
dev/manual_tests/lib/text.dart
View file @
6b7634b7
...
...
@@ -43,41 +43,53 @@ class _HomeState extends State<Home> {
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
<
Widget
>[
FlatButton
(
child:
const
Text
(
'Test Underlines'
),
color:
Colors
.
red
.
shade800
,
textColor:
Colors
.
white
,
TextButton
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
white
,
backgroundColor:
Colors
.
red
.
shade800
,
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'underlines'
);
},
child:
const
Text
(
'Test Underlines'
),
),
FlatButton
(
child:
const
Text
(
'Test Font Fallback'
),
color:
Colors
.
orange
.
shade700
,
textColor:
Colors
.
white
,
TextButton
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
white
,
backgroundColor:
Colors
.
orange
.
shade700
,
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'fallback'
);
},
child:
const
Text
(
'Test Font Fallback'
),
),
FlatButton
(
child:
const
Text
(
'Test Bidi Formatting'
),
color:
Colors
.
yellow
.
shade700
,
textColor:
Colors
.
black
,
TextButton
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
black
,
backgroundColor:
Colors
.
yellow
.
shade700
,
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'bidi'
);
},
child:
const
Text
(
'Test Bidi Formatting'
),
),
FlatButton
(
child:
const
Text
(
'TextSpan Fuzzer'
),
color:
Colors
.
green
.
shade400
,
textColor:
Colors
.
black
,
TextButton
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
black
,
backgroundColor:
Colors
.
green
.
shade400
,
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'fuzzer'
);
},
child:
const
Text
(
'TextSpan Fuzzer'
),
),
FlatButton
(
child:
const
Text
(
'Diacritics Fuzzer'
),
color:
Colors
.
blue
.
shade400
,
textColor:
Colors
.
white
,
TextButton
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
white
,
backgroundColor:
Colors
.
blue
.
shade400
,
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'zalgo'
);
},
child:
const
Text
(
'Diacritics Fuzzer'
),
),
FlatButton
(
child:
const
Text
(
'Painting Fuzzer'
),
color:
Colors
.
purple
.
shade200
,
textColor:
Colors
.
black
,
TextButton
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
black
,
backgroundColor:
Colors
.
purple
.
shade200
,
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'painting'
);
},
child:
const
Text
(
'Painting Fuzzer'
),
),
],
),
...
...
@@ -560,6 +572,7 @@ class _UnderlinesState extends State<Underlines> {
return
Container
(
color:
Colors
.
black
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
<
Widget
>[
Expanded
(
child:
SingleChildScrollView
(
...
...
@@ -578,37 +591,48 @@ class _UnderlinesState extends State<Underlines> {
),
),
Material
(
child:
ButtonBar
(
children:
<
Widget
>[
FlatButton
(
onPressed:
()
{
setState
(()
{
_text
+=
'i'
;
});
},
color:
Colors
.
yellow
,
child:
const
Text
(
'ADD i'
),
),
FlatButton
(
onPressed:
()
{
setState
(()
{
_text
+=
'w'
;
});
},
color:
Colors
.
yellow
,
child:
const
Text
(
'ADD w'
),
),
FlatButton
(
onPressed:
_text
==
''
?
null
:
()
{
setState
(()
{
_text
=
_text
.
substring
(
0
,
_text
.
length
-
1
);
});
},
color:
Colors
.
red
,
textColor:
Colors
.
white
,
child:
const
Text
(
'REMOVE'
),
),
],
child:
Container
(
alignment:
AlignmentDirectional
.
centerEnd
,
padding:
const
EdgeInsets
.
all
(
8
),
child:
OverflowBar
(
spacing:
8
,
children:
<
Widget
>[
TextButton
(
onPressed:
()
{
setState
(()
{
_text
+=
'i'
;
});
},
style:
TextButton
.
styleFrom
(
backgroundColor:
Colors
.
yellow
,
),
child:
const
Text
(
'ADD i'
),
),
TextButton
(
onPressed:
()
{
setState
(()
{
_text
+=
'w'
;
});
},
style:
TextButton
.
styleFrom
(
backgroundColor:
Colors
.
yellow
,
),
child:
const
Text
(
'ADD w'
),
),
TextButton
(
style:
TextButton
.
styleFrom
(
primary:
Colors
.
white
,
backgroundColor:
Colors
.
red
,
),
onPressed:
_text
==
''
?
null
:
()
{
setState
(()
{
_text
=
_text
.
substring
(
0
,
_text
.
length
-
1
);
});
},
child:
const
Text
(
'REMOVE'
),
),
],
),
),
),
],
...
...
@@ -1013,6 +1037,7 @@ class _PaintingState extends State<Painting> with SingleTickerProviderStateMixin
),
Material
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
<
Widget
>[
SwitchListTile
(
title:
const
Text
(
'Enable Fuzzer'
),
...
...
@@ -1042,20 +1067,26 @@ class _PaintingState extends State<Painting> with SingleTickerProviderStateMixin
const
ListTile
(
title:
Text
(
'There should be no red visible.'
),
),
ButtonBar
(
children:
<
Widget
>[
FlatButton
(
onPressed:
_ticker
.
isActive
?
null
:
()
=>
_update
(
null
),
child:
const
Text
(
'ITERATE'
),
),
FlatButton
(
onPressed:
_ticker
.
isActive
?
null
:
()
{
print
(
'The currently visible text is:
$_text
'
);
print
(
_text
.
runes
.
map
<
String
>((
int
value
)
=>
'U+
${value.toRadixString(16).padLeft(4, '0').toUpperCase()}
'
).
join
(
' '
));
},
child:
const
Text
(
'DUMP TEXT TO LOGS'
),
),
],
Container
(
alignment:
AlignmentDirectional
.
centerEnd
,
padding:
const
EdgeInsets
.
all
(
8
),
child:
OverflowBar
(
spacing:
8
,
children:
<
Widget
>[
TextButton
(
onPressed:
_ticker
.
isActive
?
null
:
()
=>
_update
(
null
),
child:
const
Text
(
'ITERATE'
),
),
TextButton
(
onPressed:
_ticker
.
isActive
?
null
:
()
{
print
(
'The currently visible text is:
$_text
'
);
print
(
_text
.
runes
.
map
<
String
>((
int
value
)
=>
'U+
${value.toRadixString(16).padLeft(4, '0').toUpperCase()}
'
).
join
(
' '
));
},
child:
const
Text
(
'DUMP TEXT TO LOGS'
),
),
],
),
),
],
),
...
...
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