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
fed6887a
Unverified
Commit
fed6887a
authored
Mar 23, 2020
by
Ferhat
Committed by
GitHub
Mar 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove implements Function (#53113)
parent
197ac525
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
28 deletions
+28
-28
icon_button_test.dart
packages/flutter/test/material/icon_button_test.dart
+15
-15
implicit_animations_test.dart
packages/flutter/test/widgets/implicit_animations_test.dart
+13
-13
No files found.
packages/flutter/test/material/icon_button_test.dart
View file @
fed6887a
...
...
@@ -12,10 +12,10 @@ import '../rendering/mock_canvas.dart';
import
'../widgets/semantics_tester.dart'
;
import
'feedback_tester.dart'
;
class
MockOnPressedFunction
implements
Function
{
class
MockOnPressedFunction
{
int
called
=
0
;
void
call
()
{
void
handler
()
{
called
++;
}
}
...
...
@@ -31,7 +31,7 @@ void main() {
await
tester
.
pumpWidget
(
wrap
(
child:
IconButton
(
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
link
),
),
),
...
...
@@ -49,7 +49,7 @@ void main() {
wrap
(
child:
IconButton
(
iconSize:
10.0
,
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
link
),
),
),
...
...
@@ -65,7 +65,7 @@ void main() {
child:
IconButton
(
iconSize:
10.0
,
padding:
const
EdgeInsets
.
all
(
30.0
),
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
link
),
),
),
...
...
@@ -80,7 +80,7 @@ void main() {
wrap
(
child:
IconButton
(
iconSize:
10.0
,
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
link
),
constraints:
const
BoxConstraints
(),
),
...
...
@@ -100,7 +100,7 @@ void main() {
child:
IconButton
(
iconSize:
10.0
,
padding:
const
EdgeInsets
.
all
(
3.0
),
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
link
),
constraints:
const
BoxConstraints
(),
),
...
...
@@ -121,7 +121,7 @@ void main() {
data:
ThemeData
(
visualDensity:
const
VisualDensity
(
horizontal:
1
,
vertical:
-
1
)),
child:
IconButton
(
iconSize:
10.0
,
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
link
),
constraints:
const
BoxConstraints
(
minWidth:
32.0
,
minHeight:
32.0
),
),
...
...
@@ -143,7 +143,7 @@ void main() {
wrap
(
child:
IconButton
(
padding:
EdgeInsets
.
zero
,
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
ac_unit
),
iconSize:
80.0
,
),
...
...
@@ -163,7 +163,7 @@ void main() {
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
children:
<
Widget
>
[
IconButton
(
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
ac_unit
),
),
],
...
...
@@ -180,7 +180,7 @@ void main() {
await
tester
.
pumpWidget
(
wrap
(
child:
IconButton
(
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
ac_unit
),
iconSize:
80.0
,
),
...
...
@@ -197,7 +197,7 @@ void main() {
home:
Material
(
child:
Center
(
child:
IconButton
(
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
ac_unit
),
),
),
...
...
@@ -215,7 +215,7 @@ void main() {
home:
Material
(
child:
Center
(
child:
IconButton
(
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
ac_unit
),
tooltip:
'Test tooltip'
,
),
...
...
@@ -239,7 +239,7 @@ void main() {
actions:
<
Widget
>[
IconButton
(
padding:
EdgeInsets
.
zero
,
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
ac_unit
),
),
],
...
...
@@ -343,7 +343,7 @@ void main() {
await
tester
.
pumpWidget
(
wrap
(
child:
IconButton
(
onPressed:
mockOnPressedFunction
,
onPressed:
mockOnPressedFunction
.
handler
,
icon:
const
Icon
(
Icons
.
link
,
semanticLabel:
'link'
),
),
),
...
...
packages/flutter/test/widgets/implicit_animations_test.dart
View file @
fed6887a
...
...
@@ -6,10 +6,10 @@ import 'package:flutter/material.dart';
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/widgets.dart'
;
class
MockOnEndFunction
implements
Function
{
class
MockOnEndFunction
{
int
called
=
0
;
void
call
()
{
void
handler
()
{
called
++;
}
}
...
...
@@ -70,7 +70,7 @@ void main() {
testWidgets
(
'AnimatedContainer onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
wrap
(
child:
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestAnimatedContainerWidgetState
(),
)
...
...
@@ -91,7 +91,7 @@ void main() {
testWidgets
(
'AnimatedPadding onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
wrap
(
child:
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestAnimatedPaddingWidgetState
(),
)
...
...
@@ -112,7 +112,7 @@ void main() {
testWidgets
(
'AnimatedAlign onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
wrap
(
child:
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestAnimatedAlignWidgetState
(),
)
...
...
@@ -133,7 +133,7 @@ void main() {
testWidgets
(
'AnimatedPositioned onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
wrap
(
child:
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestAnimatedPositionedWidgetState
(),
)
...
...
@@ -154,7 +154,7 @@ void main() {
testWidgets
(
'AnimatedPositionedDirectional onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
wrap
(
child:
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestAnimatedPositionedDirectionalWidgetState
(),
)
...
...
@@ -175,7 +175,7 @@ void main() {
testWidgets
(
'AnimatedOpacity onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
wrap
(
child:
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestAnimatedOpacityWidgetState
(),
)
...
...
@@ -223,7 +223,7 @@ void main() {
testWidgets
(
'SliverAnimatedOpacity onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestSliverAnimatedOpacityWidgetState
(),
));
...
...
@@ -271,7 +271,7 @@ void main() {
testWidgets
(
'AnimatedDefaultTextStyle onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
wrap
(
child:
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestAnimatedDefaultTextStyleWidgetState
(),
)
...
...
@@ -292,7 +292,7 @@ void main() {
testWidgets
(
'AnimatedPhysicalModel onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
wrap
(
child:
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestAnimatedPhysicalModelWidgetState
(),
)
...
...
@@ -313,7 +313,7 @@ void main() {
testWidgets
(
'TweenAnimationBuilder onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
wrap
(
child:
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestTweenAnimationBuilderWidgetState
(),
)
...
...
@@ -334,7 +334,7 @@ void main() {
testWidgets
(
'AnimatedTheme onEnd callback test'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
wrap
(
child:
TestAnimatedWidget
(
callback:
mockOnEndFunction
,
callback:
mockOnEndFunction
.
handler
,
switchKey:
switchKey
,
state:
_TestAnimatedThemeWidgetState
(),
)
...
...
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