chore: Switch to adaptive dialogs
This commit is contained in:
parent
499de09169
commit
0fae270165
20 changed files with 361 additions and 363 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/utils/app_route.dart';
|
||||
import 'package:fluffychat/views/chat_details.dart';
|
||||
|
|
@ -84,8 +85,11 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||
onSelected: (String choice) async {
|
||||
switch (choice) {
|
||||
case 'leave':
|
||||
var confirmed = await SimpleDialogs(context).askConfirmation();
|
||||
if (confirmed) {
|
||||
var confirmed = await showOkCancelAlertDialog(
|
||||
context: context,
|
||||
title: L10n.of(context).areYouSure,
|
||||
);
|
||||
if (confirmed == OkCancelResult.ok) {
|
||||
final success = await SimpleDialogs(context)
|
||||
.tryRequestWithLoadingDialog(widget.room.leave());
|
||||
if (success != false) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue