showConferenceBottomSheet function
Future<void>
showConferenceBottomSheet(
- Widget bottomSheet, {
- double? landScapeWidth,
- bool alwaysFromBottom = false,
})
Implementation
Future<void> showConferenceBottomSheet(Widget bottomSheet,
{double? landScapeWidth, bool alwaysFromBottom = false}) {
return showGeneralDialog(
context: Get.overlayContext!,
barrierDismissible: true,
barrierLabel: 'Dismiss bottom sheet',
transitionDuration: const Duration(milliseconds: 250),
pageBuilder: (BuildContext context, Animation<double> animation,
Animation<double> secondaryAnimation) {
return BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
child: OrientationBuilder(
builder: (BuildContext context, Orientation orientation) {
return SlideTransition(
position: Tween<Offset>(
begin:
(orientation == Orientation.portrait || alwaysFromBottom)
? const Offset(0, 1)
: const Offset(1, 0),
end: Offset.zero,
).animate(animation),
child: Align(
alignment:
(orientation == Orientation.portrait || alwaysFromBottom)
? Alignment.bottomCenter
: Alignment.centerRight,
child: Material(
color: Colors.transparent,
child: SizedBox(
width: (orientation == Orientation.portrait ||
alwaysFromBottom)
? Get.width
: landScapeWidth ?? 387.0.scale375(),
height: (orientation == Orientation.portrait ||
alwaysFromBottom)
? null
: Get.height,
child: bottomSheet,
),
),
),
);
},
));
},
);
}