Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jonatas
2020-09-19 13:33:18 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
819157001b4118f49996a25f01c961200489e162
81915700
1 parent
5e23f58c
format code with dartfmt
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
107 deletions
packages/get_navigation/lib/src/bottomsheet/bottomsheet.dart
packages/get_rx/lib/src/rx_core/rx_interface.dart
packages/get_test/lib/get_test.dart
packages/get_navigation/lib/src/bottomsheet/bottomsheet.dart
View file @
8191570
...
...
@@ -80,7 +80,6 @@ class GetModalBottomSheetRoute<T> extends PopupRoute<T> {
elevation:
elevation
??
sheetTheme
?.
modalElevation
??
sheetTheme
?.
elevation
,
shape:
shape
,
clipBehavior:
clipBehavior
,
isScrollControlled:
isScrollControlled
,
enableDrag:
enableDrag
,
...
...
@@ -145,45 +144,47 @@ class _GetModalBottomSheetState<T> extends State<_GetModalBottomSheet<T>> {
final
animationValue
=
mediaQuery
.
accessibleNavigation
?
1.0
:
widget
.
route
.
animation
.
value
;
return
Semantics
(
return
Semantics
(
scopesRoute:
true
,
namesRoute:
true
,
label:
routeLabel
,
explicitChildNodes:
true
,
child:
ClipRect
(
child:
CustomSingleChildLayout
(
delegate:
_GetModalBottomSheetLayout
(
animationValue
,
widget
.
isScrollControlled
),
child:
widget
.
isPersistent
==
false
?
BottomSheet
(
animationController:
widget
.
route
.
_animationController
,
onClosing:
()
{
if
(
widget
.
route
.
isCurrent
)
{
Navigator
.
pop
(
context
);
}
},
builder:
widget
.
route
.
builder
,
backgroundColor:
widget
.
backgroundColor
,
elevation:
widget
.
elevation
,
shape:
widget
.
shape
,
clipBehavior:
widget
.
clipBehavior
,
enableDrag:
widget
.
enableDrag
,
)
:
Scaffold
(
bottomSheet:
BottomSheet
(
animationController:
widget
.
route
.
_animationController
,
onClosing:
()
{
// if (widget.route.isCurrent) {
// Navigator.pop(context);
// }
},
builder:
widget
.
route
.
builder
,
backgroundColor:
widget
.
backgroundColor
,
elevation:
widget
.
elevation
,
shape:
widget
.
shape
,
clipBehavior:
widget
.
clipBehavior
,
enableDrag:
widget
.
enableDrag
,
),
)
),
delegate:
_GetModalBottomSheetLayout
(
animationValue
,
widget
.
isScrollControlled
),
child:
widget
.
isPersistent
==
false
?
BottomSheet
(
animationController:
widget
.
route
.
_animationController
,
onClosing:
()
{
if
(
widget
.
route
.
isCurrent
)
{
Navigator
.
pop
(
context
);
}
},
builder:
widget
.
route
.
builder
,
backgroundColor:
widget
.
backgroundColor
,
elevation:
widget
.
elevation
,
shape:
widget
.
shape
,
clipBehavior:
widget
.
clipBehavior
,
enableDrag:
widget
.
enableDrag
,
)
:
Scaffold
(
bottomSheet:
BottomSheet
(
animationController:
widget
.
route
.
_animationController
,
onClosing:
()
{
// if (widget.route.isCurrent) {
// Navigator.pop(context);
// }
},
builder:
widget
.
route
.
builder
,
backgroundColor:
widget
.
backgroundColor
,
elevation:
widget
.
elevation
,
shape:
widget
.
shape
,
clipBehavior:
widget
.
clipBehavior
,
enableDrag:
widget
.
enableDrag
,
),
)),
),
);
},
...
...
@@ -255,38 +256,40 @@ class _GetPerModalBottomSheetState<T>
explicitChildNodes:
true
,
child:
ClipRect
(
child:
CustomSingleChildLayout
(
delegate:
_GetModalBottomSheetLayout
(
animationValue
,
widget
.
isScrollControlled
),
child:
widget
.
isPersistent
==
false
?
BottomSheet
(
animationController:
widget
.
route
.
_animationController
,
onClosing:
()
{
if
(
widget
.
route
.
isCurrent
)
{
Navigator
.
pop
(
context
);
}
},
builder:
widget
.
route
.
builder
,
backgroundColor:
widget
.
backgroundColor
,
elevation:
widget
.
elevation
,
shape:
widget
.
shape
,
clipBehavior:
widget
.
clipBehavior
,
enableDrag:
widget
.
enableDrag
,
)
:
Scaffold
(
bottomSheet:
BottomSheet
(
animationController:
widget
.
route
.
_animationController
,
onClosing:
()
{
// if (widget.route.isCurrent) {
// Navigator.pop(context);
// }
},
builder:
widget
.
route
.
builder
,
backgroundColor:
widget
.
backgroundColor
,
elevation:
widget
.
elevation
,
shape:
widget
.
shape
,
clipBehavior:
widget
.
clipBehavior
,
enableDrag:
widget
.
enableDrag
,
),
)
),
delegate:
_GetModalBottomSheetLayout
(
animationValue
,
widget
.
isScrollControlled
),
child:
widget
.
isPersistent
==
false
?
BottomSheet
(
animationController:
widget
.
route
.
_animationController
,
onClosing:
()
{
if
(
widget
.
route
.
isCurrent
)
{
Navigator
.
pop
(
context
);
}
},
builder:
widget
.
route
.
builder
,
backgroundColor:
widget
.
backgroundColor
,
elevation:
widget
.
elevation
,
shape:
widget
.
shape
,
clipBehavior:
widget
.
clipBehavior
,
enableDrag:
widget
.
enableDrag
,
)
:
Scaffold
(
bottomSheet:
BottomSheet
(
animationController:
widget
.
route
.
_animationController
,
onClosing:
()
{
// if (widget.route.isCurrent) {
// Navigator.pop(context);
// }
},
builder:
widget
.
route
.
builder
,
backgroundColor:
widget
.
backgroundColor
,
elevation:
widget
.
elevation
,
shape:
widget
.
shape
,
clipBehavior:
widget
.
clipBehavior
,
enableDrag:
widget
.
enableDrag
,
),
)),
),
);
},
...
...
packages/get_rx/lib/src/rx_core/rx_interface.dart
View file @
8191570
...
...
@@ -26,4 +26,3 @@ abstract class RxInterface<T> {
/// Calls [callback] with current value, when the value changes.
StreamSubscription
<
T
>
listen
(
ValueCallback
<
T
>
callback
);
}
...
...
packages/get_test/lib/get_test.dart
View file @
8191570
...
...
@@ -26,13 +26,13 @@ class _Wrapper extends StatelessWidget {
}
void
testController
<
T
>(
String
description
,
void
Function
(
T
)
callback
,
{
@required
T
controller
,
void
Function
(
T
)
onInit
,
void
Function
(
T
)
onReady
,
void
Function
(
T
)
onClose
,
})
{
String
description
,
void
Function
(
T
)
callback
,
{
@required
T
controller
,
void
Function
(
T
)
onInit
,
void
Function
(
T
)
onReady
,
void
Function
(
T
)
onClose
,
})
{
test
(
description
,
()
{
onInit
(
controller
);
SchedulerBinding
.
instance
.
addPostFrameCallback
((
f
)
{
...
...
@@ -44,26 +44,26 @@ void testController<T>(
}
Future
<
T
>
testGetX
<
T
extends
DisposableInterface
>(
String
description
,
{
@required
GetX
<
T
>
widget
,
@required
void
Function
(
T
controller
)
test
,
})
async
{
String
description
,
{
@required
GetX
<
T
>
widget
,
@required
void
Function
(
T
controller
)
test
,
})
async
{
T
controller
;
testWidgets
(
description
,
(
tester
)
async
{
provideMockedNetworkImages
(()
async
{
await
tester
.
pumpWidget
(
GetMaterialApp
(
home:
widget
));
final
controller
=
Get
.
find
<
T
>();
test
(
controller
);
await
tester
.
pumpWidget
(
GetMaterialApp
(
home:
widget
));
final
controller
=
Get
.
find
<
T
>();
test
(
controller
);
});
});
return
controller
;
}
Future
<
T
>
testGetBuilder
<
T
extends
GetxController
>(
String
description
,
{
@required
GetBuilder
<
T
>
widget
,
@required
void
Function
(
T
controller
)
test
,
})
async
{
String
description
,
{
@required
GetBuilder
<
T
>
widget
,
@required
void
Function
(
T
controller
)
test
,
})
async
{
T
controller
;
testWidgets
(
description
,
(
tester
)
async
{
provideMockedNetworkImages
(()
async
{
...
...
@@ -76,11 +76,11 @@ Future<T> testGetBuilder<T extends GetxController>(
}
Future
<
T
>
testObx
<
T
extends
GetxController
>(
String
description
,
{
@required
T
controller
,
@required
Obx
Function
(
T
controller
)
widget
,
@required
void
Function
(
T
controller
)
test
,
})
async
{
String
description
,
{
@required
T
controller
,
@required
Obx
Function
(
T
controller
)
widget
,
@required
void
Function
(
T
controller
)
test
,
})
async
{
testWidgets
(
description
,
(
tester
)
async
{
provideMockedNetworkImages
(()
async
{
await
tester
.
pumpWidget
(
GetMaterialApp
(
home:
widget
(
controller
)));
...
...
@@ -91,18 +91,18 @@ Future<T> testObx<T extends GetxController>(
}
void
getTest
(
String
description
,
{
@required
WidgetTesterCallback
widgetTest
,
Widget
wrapper
,
List
<
GetPage
>
getPages
,
String
initialRoute
=
'/'
,
bool
skip
=
false
,
Timeout
timeout
,
Duration
initialTimeout
,
bool
semanticsEnabled
=
true
,
TestVariant
<
Object
>
variant
=
const
DefaultTestVariant
(),
dynamic
tags
,
})
{
String
description
,
{
@required
WidgetTesterCallback
widgetTest
,
Widget
wrapper
,
List
<
GetPage
>
getPages
,
String
initialRoute
=
'/'
,
bool
skip
=
false
,
Timeout
timeout
,
Duration
initialTimeout
,
bool
semanticsEnabled
=
true
,
TestVariant
<
Object
>
variant
=
const
DefaultTestVariant
(),
dynamic
tags
,
})
{
assert
(
variant
!=
null
);
assert
(
variant
.
values
.
isNotEmpty
);
...
...
@@ -118,11 +118,11 @@ void getTest(
testWidgets
(
description
,
(
tester
)
async
{
provideMockedNetworkImages
(()
async
{
await
tester
.
pumpWidget
(
wrapper
);
widgetTest
(
tester
);
});
(
tester
)
async
{
provideMockedNetworkImages
(()
async
{
await
tester
.
pumpWidget
(
wrapper
);
widgetTest
(
tester
);
});
},
skip:
skip
,
timeout:
timeout
,
...
...
Please
register
or
login
to post a comment