Jonatas

format code with dartfmt

... ... @@ -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,
),
)),
),
);
},
... ...
... ... @@ -26,4 +26,3 @@ abstract class RxInterface<T> {
/// Calls [callback] with current value, when the value changes.
StreamSubscription<T> listen(ValueCallback<T> callback);
}
... ...
... ... @@ -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,
... ...