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
97816e15
Commit
97816e15
authored
Mar 20, 2017
by
Adam Barth
Committed by
GitHub
Mar 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Dismissable to Dismissible (#8919)
The latter is the proper spelling. Fixes #8883
parent
11c2032a
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
73 additions
and
73 deletions
+73
-73
card_collection.dart
dev/manual_tests/card_collection.dart
+2
-2
cupertino_dialog_demo.dart
...ter_gallery/lib/demo/cupertino/cupertino_dialog_demo.dart
+1
-1
leave_behind_demo.dart
.../flutter_gallery/lib/demo/material/leave_behind_demo.dart
+1
-1
bottom_sheet.dart
packages/flutter/lib/src/material/bottom_sheet.dart
+1
-1
dialog.dart
packages/flutter/lib/src/material/dialog.dart
+7
-7
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+1
-1
popup_menu.dart
packages/flutter/lib/src/material/popup_menu.dart
+1
-1
snack_bar.dart
packages/flutter/lib/src/material/snack_bar.dart
+2
-2
dismissible.dart
packages/flutter/lib/src/widgets/dismissible.dart
+23
-23
modal_barrier.dart
packages/flutter/lib/src/widgets/modal_barrier.dart
+6
-6
pages.dart
packages/flutter/lib/src/widgets/pages.dart
+5
-5
routes.dart
packages/flutter/lib/src/widgets/routes.dart
+3
-3
widgets.dart
packages/flutter/lib/widgets.dart
+1
-1
dialog_test.dart
packages/flutter/test/material/dialog_test.dart
+2
-2
dismissible_test.dart
packages/flutter/test/widgets/dismissible_test.dart
+13
-13
modal_barrier_test.dart
packages/flutter/test/widgets/modal_barrier_test.dart
+3
-3
MANIFEST.txt
...y/osx/simulator_application_binary/vmservice/MANIFEST.txt
+1
-1
No files found.
dev/manual_tests/card_collection.dart
View file @
97816e15
...
...
@@ -248,7 +248,7 @@ class CardCollectionState extends State<CardCollection> {
Widget
_buildCard
(
BuildContext
context
,
int
index
)
{
final
CardModel
cardModel
=
_cardModels
[
index
];
final
Widget
card
=
new
Dismiss
a
ble
(
final
Widget
card
=
new
Dismiss
i
ble
(
key:
new
ObjectKey
(
cardModel
),
direction:
_dismissDirection
,
onDismissed:
(
DismissDirection
direction
)
{
dismissCard
(
cardModel
);
},
...
...
@@ -313,7 +313,7 @@ class CardCollectionState extends State<CardCollection> {
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
TextStyle
backgroundTextStyle
=
theme
.
primaryTextTheme
.
title
;
// The background Widget appears behind the Dismiss
a
ble card when the card
// The background Widget appears behind the Dismiss
i
ble 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
// Viewport ensures that when the card's resize animation occurs, the
...
...
examples/flutter_gallery/lib/demo/cupertino/cupertino_dialog_demo.dart
View file @
97816e15
...
...
@@ -19,7 +19,7 @@ class _CupertinoDialogDemoState extends State<CupertinoDialogDemo> {
showDialog
<
T
>(
context:
context
,
child:
child
,
barrierDismiss
a
ble:
false
,
barrierDismiss
i
ble:
false
,
)
.
then
<
Null
>((
T
value
)
{
// The value passed to Navigator.pop() or null.
if
(
value
!=
null
)
{
...
...
examples/flutter_gallery/lib/demo/material/leave_behind_demo.dart
View file @
97816e15
...
...
@@ -85,7 +85,7 @@ class LeaveBehindDemoState extends State<LeaveBehindDemo> {
Widget
buildItem
(
LeaveBehindItem
item
)
{
final
ThemeData
theme
=
Theme
.
of
(
context
);
return
new
Dismiss
a
ble
(
return
new
Dismiss
i
ble
(
key:
new
ObjectKey
(
item
),
direction:
_dismissDirection
,
onDismissed:
(
DismissDirection
direction
)
{
...
...
packages/flutter/lib/src/material/bottom_sheet.dart
View file @
97816e15
...
...
@@ -215,7 +215,7 @@ class _ModalBottomSheetRoute<T> extends PopupRoute<T> {
Duration
get
transitionDuration
=>
_kBottomSheetDuration
;
@override
bool
get
barrierDismiss
a
ble
=>
true
;
bool
get
barrierDismiss
i
ble
=>
true
;
@override
Color
get
barrierColor
=>
Colors
.
black54
;
...
...
packages/flutter/lib/src/material/dialog.dart
View file @
97816e15
...
...
@@ -317,10 +317,10 @@ class SimpleDialog extends StatelessWidget {
class
_DialogRoute
<
T
>
extends
PopupRoute
<
T
>
{
_DialogRoute
({
@required
this
.
theme
,
bool
barrierDismiss
a
ble:
true
,
bool
barrierDismiss
i
ble:
true
,
@required
this
.
child
,
})
:
_barrierDismiss
able
=
barrierDismissa
ble
{
assert
(
barrierDismiss
a
ble
!=
null
);
})
:
_barrierDismiss
ible
=
barrierDismissi
ble
{
assert
(
barrierDismiss
i
ble
!=
null
);
}
final
Widget
child
;
...
...
@@ -330,8 +330,8 @@ class _DialogRoute<T> extends PopupRoute<T> {
Duration
get
transitionDuration
=>
const
Duration
(
milliseconds:
150
);
@override
bool
get
barrierDismiss
able
=>
_barrierDismissa
ble
;
final
bool
_barrierDismiss
a
ble
;
bool
get
barrierDismiss
ible
=>
_barrierDismissi
ble
;
final
bool
_barrierDismiss
i
ble
;
@override
Color
get
barrierColor
=>
Colors
.
black54
;
...
...
@@ -368,12 +368,12 @@ class _DialogRoute<T> extends PopupRoute<T> {
/// * <https://material.google.com/components/dialogs.html>
Future
<
T
>
showDialog
<
T
>({
@required
BuildContext
context
,
bool
barrierDismiss
a
ble:
true
,
bool
barrierDismiss
i
ble:
true
,
@required
Widget
child
,
})
{
return
Navigator
.
push
(
context
,
new
_DialogRoute
<
T
>(
child:
child
,
theme:
Theme
.
of
(
context
,
shadowThemeOnly:
true
),
barrierDismiss
able:
barrierDismissa
ble
,
barrierDismiss
ible:
barrierDismissi
ble
,
));
}
packages/flutter/lib/src/material/dropdown.dart
View file @
97816e15
...
...
@@ -307,7 +307,7 @@ class _DropdownRoute<T> extends PopupRoute<_DropdownRouteResult<T>> {
Duration
get
transitionDuration
=>
_kDropdownMenuDuration
;
@override
bool
get
barrierDismiss
a
ble
=>
true
;
bool
get
barrierDismiss
i
ble
=>
true
;
@override
Color
get
barrierColor
=>
null
;
...
...
packages/flutter/lib/src/material/popup_menu.dart
View file @
97816e15
...
...
@@ -396,7 +396,7 @@ class _PopupMenuRoute<T> extends PopupRoute<T> {
Duration
get
transitionDuration
=>
_kMenuDuration
;
@override
bool
get
barrierDismiss
a
ble
=>
true
;
bool
get
barrierDismiss
i
ble
=>
true
;
@override
Color
get
barrierColor
=>
null
;
...
...
packages/flutter/lib/src/material/snack_bar.dart
View file @
97816e15
...
...
@@ -231,8 +231,8 @@ class SnackBar extends StatelessWidget {
},
child:
new
Semantics
(
container:
true
,
child:
new
Dismiss
a
ble
(
key:
const
Key
(
'dismiss
a
ble'
),
child:
new
Dismiss
i
ble
(
key:
const
Key
(
'dismiss
i
ble'
),
direction:
DismissDirection
.
down
,
resizeDuration:
null
,
onDismissed:
(
DismissDirection
direction
)
{
...
...
packages/flutter/lib/src/widgets/dismiss
a
ble.dart
→
packages/flutter/lib/src/widgets/dismiss
i
ble.dart
View file @
97816e15
...
...
@@ -17,32 +17,32 @@ const double _kMinFlingVelocityDelta = 400.0;
const
double
_kFlingVelocityScale
=
1.0
/
300.0
;
const
double
_kDismissThreshold
=
0.4
;
/// Signature used by [Dismiss
a
ble] to indicate that it has been dismissed in
/// Signature used by [Dismiss
i
ble] to indicate that it has been dismissed in
/// the given `direction`.
///
/// Used by [Dismiss
a
ble.onDismissed].
/// Used by [Dismiss
i
ble.onDismissed].
typedef
void
DismissDirectionCallback
(
DismissDirection
direction
);
/// The direction in which a [Dismiss
a
ble] can be dismissed.
/// The direction in which a [Dismiss
i
ble] can be dismissed.
enum
DismissDirection
{
/// The [Dismiss
a
ble] can be dismissed by dragging either up or down.
/// The [Dismiss
i
ble] can be dismissed by dragging either up or down.
vertical
,
/// The [Dismiss
a
ble] can be dismissed by dragging either left or right.
/// The [Dismiss
i
ble] can be dismissed by dragging either left or right.
horizontal
,
/// The [Dismiss
a
ble] can be dismissed by dragging in the reverse of the
/// The [Dismiss
i
ble] can be dismissed by dragging in the reverse of the
/// reading direction (e.g., from right to left in left-to-right languages).
endToStart
,
/// The [Dismiss
a
ble] can be dismissed by dragging in the reading direction
/// The [Dismiss
i
ble] can be dismissed by dragging in the reading direction
/// (e.g., from left to right in left-to-right languages).
startToEnd
,
/// The [Dismiss
a
ble] can be dismissed by dragging up only.
/// The [Dismiss
i
ble] can be dismissed by dragging up only.
up
,
/// The [Dismiss
a
ble] can be dismissed by dragging down only.
/// The [Dismiss
i
ble] can be dismissed by dragging down only.
down
}
...
...
@@ -50,28 +50,28 @@ enum DismissDirection {
///
/// Dragging or flinging this widget in the [DismissDirection] causes the child
/// to slide out of view. Following the slide animation, if [resizeDuration] is
/// non-null, the Dismiss
a
ble widget animates its height (or width, whichever is
/// non-null, the Dismiss
i
ble widget animates its height (or width, whichever is
/// perpendicular to the dismiss direction) to zero over the [resizeDuration].
///
/// Backgrounds can be used to implement the "leave-behind" idiom. If a background
/// is specified it is stacked behind the Dismiss
a
ble's child and is exposed when
/// is specified it is stacked behind the Dismiss
i
ble's child and is exposed when
/// the child moves.
///
/// The widget calls the [onDimissed] callback either after its size has
/// collapsed to zero (if [resizeDuration] is non-null) or immediately after
/// the slide animation (if [resizeDuration] is null). If the Dismiss
a
ble is a
/// the slide animation (if [resizeDuration] is null). If the Dismiss
i
ble is a
/// list item, it must have a key that distinguishes it from the other items and
/// its [onDismissed] callback must remove the item from the list.
class
Dismiss
a
ble
extends
StatefulWidget
{
class
Dismiss
i
ble
extends
StatefulWidget
{
/// Creates a widget that can be dismissed.
///
/// The [key] argument must not be null because [Dismiss
a
ble]s are commonly
/// The [key] argument must not be null because [Dismiss
i
ble]s are commonly
/// used in lists and removed from the list when dismissed. Without keys, the
/// default behavior is to sync widgets based on their index in the list,
/// which means the item after the dismissed item would be synced with the
/// state of the dismissed item. Using keys causes the widgets to sync
/// according to their keys and avoids this pitfall.
Dismiss
a
ble
({
Dismiss
i
ble
({
@required
Key
key
,
@required
this
.
child
,
this
.
background
,
...
...
@@ -123,11 +123,11 @@ class Dismissable extends StatefulWidget {
final
Map
<
DismissDirection
,
double
>
dismissThresholds
;
@override
_Dismiss
ableState
createState
()
=>
new
_Dismissa
bleState
();
_Dismiss
ibleState
createState
()
=>
new
_Dismissi
bleState
();
}
class
_Dismiss
a
bleClipper
extends
CustomClipper
<
Rect
>
{
_Dismiss
a
bleClipper
({
class
_Dismiss
i
bleClipper
extends
CustomClipper
<
Rect
>
{
_Dismiss
i
bleClipper
({
this
.
axis
,
this
.
moveAnimation
})
:
super
(
reclip:
moveAnimation
)
{
...
...
@@ -160,13 +160,13 @@ class _DismissableClipper extends CustomClipper<Rect> {
Rect
getApproximateClipRect
(
Size
size
)
=>
getClip
(
size
);
@override
bool
shouldReclip
(
_Dismiss
a
bleClipper
oldClipper
)
{
bool
shouldReclip
(
_Dismiss
i
bleClipper
oldClipper
)
{
return
oldClipper
.
axis
!=
axis
||
oldClipper
.
moveAnimation
.
value
!=
moveAnimation
.
value
;
}
}
class
_Dismiss
ableState
extends
State
<
Dismissa
ble
>
with
TickerProviderStateMixin
{
class
_Dismiss
ibleState
extends
State
<
Dismissi
ble
>
with
TickerProviderStateMixin
{
@override
void
initState
()
{
super
.
initState
();
...
...
@@ -377,8 +377,8 @@ class _DismissableState extends State<Dismissable> with TickerProviderStateMixin
if
(
_resizeAnimation
.
status
!=
AnimationStatus
.
forward
)
{
assert
(
_resizeAnimation
.
status
==
AnimationStatus
.
completed
);
throw
new
FlutterError
(
'A dismissed Dismiss
a
ble widget is still part of the tree.
\n
'
+
'Make sure to implement the onDismissed handler and to immediately remove the Dismiss
a
ble
\n
'
+
'A dismissed Dismiss
i
ble widget is still part of the tree.
\n
'
+
'Make sure to implement the onDismissed handler and to immediately remove the Dismiss
i
ble
\n
'
+
'widget from the application once that handler has fired.'
);
}
...
...
@@ -407,7 +407,7 @@ class _DismissableState extends State<Dismissable> with TickerProviderStateMixin
if
(!
_moveAnimation
.
isDismissed
)
{
children
.
add
(
new
Positioned
.
fill
(
child:
new
ClipRect
(
clipper:
new
_Dismiss
a
bleClipper
(
clipper:
new
_Dismiss
i
bleClipper
(
axis:
_directionIsXAxis
?
Axis
.
horizontal
:
Axis
.
vertical
,
moveAnimation:
_moveAnimation
,
),
...
...
packages/flutter/lib/src/widgets/modal_barrier.dart
View file @
97816e15
...
...
@@ -15,14 +15,14 @@ class ModalBarrier extends StatelessWidget {
ModalBarrier
({
Key
key
,
this
.
color
,
this
.
dismiss
a
ble
:
true
this
.
dismiss
i
ble
:
true
})
:
super
(
key:
key
);
/// If non-null, fill the barrier with this color.
final
Color
color
;
/// Whether touching the barrier will pop the current route off the [Navigator].
final
bool
dismiss
a
ble
;
final
bool
dismiss
i
ble
;
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -30,7 +30,7 @@ class ModalBarrier extends StatelessWidget {
container:
true
,
child:
new
GestureDetector
(
onTapDown:
(
TapDownDetails
details
)
{
if
(
dismiss
a
ble
)
if
(
dismiss
i
ble
)
Navigator
.
pop
(
context
);
},
behavior:
HitTestBehavior
.
opaque
,
...
...
@@ -53,20 +53,20 @@ class AnimatedModalBarrier extends AnimatedWidget {
AnimatedModalBarrier
({
Key
key
,
Animation
<
Color
>
color
,
this
.
dismiss
a
ble
:
true
this
.
dismiss
i
ble
:
true
})
:
super
(
key:
key
,
listenable:
color
);
/// If non-null, fill the barrier with this color.
Animation
<
Color
>
get
color
=>
listenable
;
/// Whether touching the barrier will pop the current route off the [Navigator].
final
bool
dismiss
a
ble
;
final
bool
dismiss
i
ble
;
@override
Widget
build
(
BuildContext
context
)
{
return
new
ModalBarrier
(
color:
color
?.
value
,
dismiss
able:
dismissa
ble
dismiss
ible:
dismissi
ble
);
}
}
packages/flutter/lib/src/widgets/pages.dart
View file @
97816e15
...
...
@@ -19,7 +19,7 @@ abstract class PageRoute<T> extends ModalRoute<T> {
bool
get
opaque
=>
true
;
@override
bool
get
barrierDismiss
a
ble
=>
false
;
bool
get
barrierDismiss
i
ble
=>
false
;
@override
bool
canTransitionTo
(
TransitionRoute
<
dynamic
>
nextRoute
)
=>
nextRoute
is
PageRoute
<
dynamic
>;
...
...
@@ -64,7 +64,7 @@ Widget _defaultTransitionsBuilder(BuildContext context, Animation<double> animat
class
PageRouteBuilder
<
T
>
extends
PageRoute
<
T
>
{
/// Creates a route that deletates to builder callbacks.
///
/// The [pageBuilder], [transitionsBuilder], [opaque], [barrierDismiss
a
ble],
/// The [pageBuilder], [transitionsBuilder], [opaque], [barrierDismiss
i
ble],
/// and [maintainState] arguments must not be null.
PageRouteBuilder
({
RouteSettings
settings:
const
RouteSettings
(),
...
...
@@ -72,14 +72,14 @@ class PageRouteBuilder<T> extends PageRoute<T> {
this
.
transitionsBuilder
:
_defaultTransitionsBuilder
,
this
.
transitionDuration
:
const
Duration
(
milliseconds:
300
),
this
.
opaque
:
true
,
this
.
barrierDismiss
a
ble
:
false
,
this
.
barrierDismiss
i
ble
:
false
,
this
.
barrierColor
:
null
,
this
.
maintainState
:
true
,
})
:
super
(
settings:
settings
)
{
assert
(
pageBuilder
!=
null
);
assert
(
transitionsBuilder
!=
null
);
assert
(
opaque
!=
null
);
assert
(
barrierDismiss
a
ble
!=
null
);
assert
(
barrierDismiss
i
ble
!=
null
);
assert
(
maintainState
!=
null
);
}
...
...
@@ -100,7 +100,7 @@ class PageRouteBuilder<T> extends PageRoute<T> {
final
bool
opaque
;
@override
final
bool
barrierDismiss
a
ble
;
final
bool
barrierDismiss
i
ble
;
@override
final
Color
barrierColor
;
...
...
packages/flutter/lib/src/widgets/routes.dart
View file @
97816e15
...
...
@@ -613,7 +613,7 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
// The API for subclasses to override - used by this class
/// Whether you can dismiss this route by tapping the modal barrier.
bool
get
barrierDismiss
a
ble
;
bool
get
barrierDismiss
i
ble
;
/// The color to use for the modal barrier. If this is null, the barrier will
/// be transparent.
...
...
@@ -816,10 +816,10 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
));
barrier
=
new
AnimatedModalBarrier
(
color:
color
,
dismiss
able:
barrierDismissa
ble
dismiss
ible:
barrierDismissi
ble
);
}
else
{
barrier
=
new
ModalBarrier
(
dismiss
able:
barrierDismissa
ble
);
barrier
=
new
ModalBarrier
(
dismiss
ible:
barrierDismissi
ble
);
}
assert
(
animation
.
status
!=
AnimationStatus
.
dismissed
);
return
new
IgnorePointer
(
...
...
packages/flutter/lib/widgets.dart
View file @
97816e15
...
...
@@ -18,7 +18,7 @@ export 'src/widgets/basic.dart';
export
'src/widgets/binding.dart'
;
export
'src/widgets/container.dart'
;
export
'src/widgets/debug.dart'
;
export
'src/widgets/dismiss
a
ble.dart'
;
export
'src/widgets/dismiss
i
ble.dart'
;
export
'src/widgets/drag_target.dart'
;
export
'src/widgets/editable_text.dart'
;
export
'src/widgets/focus.dart'
;
...
...
packages/flutter/test/material/dialog_test.dart
View file @
97816e15
...
...
@@ -138,7 +138,7 @@ void main() {
expect
(
await
result
,
equals
(
42
));
});
testWidgets
(
'Barrier dismiss
a
ble'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Barrier dismiss
i
ble'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
new
MaterialApp
(
home:
new
Material
(
...
...
@@ -175,7 +175,7 @@ void main() {
showDialog
<
Null
>(
context:
context
,
barrierDismiss
a
ble:
false
,
barrierDismiss
i
ble:
false
,
child:
new
Container
(
width:
100.0
,
height:
100.0
,
...
...
packages/flutter/test/widgets/dismiss
a
ble_test.dart
→
packages/flutter/test/widgets/dismiss
i
ble_test.dart
View file @
97816e15
...
...
@@ -16,8 +16,8 @@ Widget background;
Widget
buildTest
(
{
double
startToEndThreshold
})
{
return
new
StatefulBuilder
(
builder:
(
BuildContext
context
,
StateSetter
setState
)
{
Widget
buildDismiss
a
bleItem
(
int
item
)
{
return
new
Dismiss
a
ble
(
Widget
buildDismiss
i
bleItem
(
int
item
)
{
return
new
Dismiss
i
ble
(
key:
new
ValueKey
<
int
>(
item
),
direction:
dismissDirection
,
onDismissed:
(
DismissDirection
direction
)
{
...
...
@@ -49,7 +49,7 @@ Widget buildTest({ double startToEndThreshold }) {
itemExtent:
itemExtent
,
children:
<
int
>[
0
,
1
,
2
,
3
,
4
]
.
where
((
int
i
)
=>
!
dismissedItems
.
contains
(
i
))
.
map
(
buildDismiss
a
bleItem
).
toList
(),
.
map
(
buildDismiss
i
bleItem
).
toList
(),
),
);
},
...
...
@@ -66,7 +66,7 @@ Future<Null> dismissElement(WidgetTester tester, Finder finder, { DismissDirecti
switch
(
gestureDirection
)
{
case
DismissDirection
.
endToStart
:
// getTopRight() returns a point that's just beyond itemWidget's right
// edge and outside the Dismiss
a
ble event listener's bounds.
// edge and outside the Dismiss
i
ble event listener's bounds.
downLocation
=
tester
.
getTopRight
(
finder
)
+
const
Offset
(-
0.1
,
0.0
);
upLocation
=
tester
.
getTopLeft
(
finder
);
break
;
...
...
@@ -77,7 +77,7 @@ Future<Null> dismissElement(WidgetTester tester, Finder finder, { DismissDirecti
break
;
case
DismissDirection
.
up
:
// getBottomLeft() returns a point that's just below itemWidget's bottom
// edge and outside the Dismiss
a
ble event listener's bounds.
// edge and outside the Dismiss
i
ble event listener's bounds.
downLocation
=
tester
.
getBottomLeft
(
finder
)
+
const
Offset
(
0.0
,
-
0.1
);
upLocation
=
tester
.
getTopLeft
(
finder
);
break
;
...
...
@@ -111,14 +111,14 @@ Future<Null> dismissItem(WidgetTester tester, int item, { DismissDirection gestu
await
tester
.
pump
();
// rebuild after the callback removes the entry
}
class
Test1215Dismiss
a
bleWidget
extends
StatelessWidget
{
Test1215Dismiss
a
bleWidget
(
this
.
text
);
class
Test1215Dismiss
i
bleWidget
extends
StatelessWidget
{
Test1215Dismiss
i
bleWidget
(
this
.
text
);
final
String
text
;
@override
Widget
build
(
BuildContext
context
)
{
return
new
Dismiss
a
ble
(
return
new
Dismiss
i
ble
(
key:
new
ObjectKey
(
text
),
child:
new
AspectRatio
(
aspectRatio:
1.0
,
...
...
@@ -236,7 +236,7 @@ void main() {
expect
(
dismissedItems
,
equals
(<
int
>[
0
]));
});
testWidgets
(
'drag-left has no effect on dismiss
a
ble with a high dismiss threshold'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'drag-left has no effect on dismiss
i
ble with a high dismiss threshold'
,
(
WidgetTester
tester
)
async
{
scrollDirection
=
Axis
.
vertical
;
dismissDirection
=
DismissDirection
.
horizontal
;
...
...
@@ -282,7 +282,7 @@ void main() {
// now-obsolete URL https://github.com/flutter/engine/issues/1215 (the URL
// died in the migration to the new repo). Don't copy this test; it doesn't
// actually remove the dismissed widget, which is a violation of the
// Dismiss
a
ble contract. This is not an example of good practice.
// Dismiss
i
ble contract. This is not an example of good practice.
testWidgets
(
'dismissing bottom then top (smoketest)'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
new
Center
(
child:
new
Container
(
...
...
@@ -290,8 +290,8 @@ void main() {
height:
1000.0
,
child:
new
Column
(
children:
<
Widget
>[
new
Test1215Dismiss
a
bleWidget
(
'1'
),
new
Test1215Dismiss
a
bleWidget
(
'2'
),
new
Test1215Dismiss
i
bleWidget
(
'1'
),
new
Test1215Dismiss
i
bleWidget
(
'2'
),
],
),
),
...
...
@@ -310,7 +310,7 @@ void main() {
expect
(
find
.
text
(
'2'
),
findsNothing
);
});
testWidgets
(
'Dismiss
a
ble starts from the full size when collapsing'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Dismiss
i
ble starts from the full size when collapsing'
,
(
WidgetTester
tester
)
async
{
scrollDirection
=
Axis
.
vertical
;
dismissDirection
=
DismissDirection
.
horizontal
;
background
=
new
Text
(
'background'
);
...
...
packages/flutter/test/widgets/modal_barrier_test.dart
View file @
97816e15
...
...
@@ -28,7 +28,7 @@ void main() {
final
Widget
subject
=
new
Stack
(
children:
<
Widget
>[
tapTarget
,
new
ModalBarrier
(
dismiss
a
ble:
false
),
new
ModalBarrier
(
dismiss
i
ble:
false
),
]
);
...
...
@@ -42,7 +42,7 @@ void main() {
testWidgets
(
'ModalBarrier does not prevent interactions with widgets in front of it'
,
(
WidgetTester
tester
)
async
{
final
Widget
subject
=
new
Stack
(
children:
<
Widget
>[
new
ModalBarrier
(
dismiss
a
ble:
false
),
new
ModalBarrier
(
dismiss
i
ble:
false
),
tapTarget
,
]
);
...
...
@@ -99,7 +99,7 @@ class SecondWidget extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
return
new
ModalBarrier
(
key:
const
ValueKey
<
String
>(
'barrier'
),
dismiss
a
ble:
true
dismiss
i
ble:
true
);
}
}
packages/flutter_tools/test/replay/osx/simulator_application_binary/vmservice/MANIFEST.txt
View file @
97816e15
...
...
@@ -532,7 +532,7 @@
"fixedId": true,
"id": "libraries/35",
"name": "",
"uri": "package:flutter/src/widgets/dismiss
a
ble.dart"
"uri": "package:flutter/src/widgets/dismiss
i
ble.dart"
},
{
"type": "@Library",
...
...
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