openCloseRoomDialog function
Future<bool>
openCloseRoomDialog({ - required dynamic context,
- required String roomId,
- dynamic cancelBtnKey,
- dynamic confirmBtnKey,
})
Implementation
Future<bool> openCloseRoomDialog({
required BuildContext context,
required final String roomId,
final Key? cancelBtnKey,
final Key? confirmBtnKey,
}) async {
final removedRoom = await showAdaptiveDialog(
context: context,
useRootNavigator: false,
builder: (context) => _CloseRoomConfirmation(
roomId: roomId,
cancelBtnKey: cancelBtnKey,
confirmBtnKey: confirmBtnKey,
),
);
if (removedRoom && context.mounted) {
// redirect the user after the process is done
context.goNamed(Routes.main.name);
}
return removedRoom;
}