chore: Switch from bottoast to flushbar
This commit is contained in:
parent
4cc4800035
commit
e621a83406
15 changed files with 79 additions and 44 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flushbar/flushbar_helper.dart';
|
||||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:fluffychat/components/matrix.dart';
|
||||
|
|
@ -46,10 +46,10 @@ abstract class FirebaseController {
|
|||
final storeItem = await matrix.store.getItem(SettingKeys.showNoGoogle);
|
||||
final configOptionMissing = storeItem == null || storeItem.isEmpty;
|
||||
if (configOptionMissing || (!configOptionMissing && storeItem == '1')) {
|
||||
BotToast.showText(
|
||||
text: L10n.of(context).noGoogleServicesWarning,
|
||||
await FlushbarHelper.createError(
|
||||
message: L10n.of(context).noGoogleServicesWarning,
|
||||
duration: Duration(seconds: 15),
|
||||
);
|
||||
).show(context);
|
||||
if (configOptionMissing) {
|
||||
await matrix.store.setItem(SettingKeys.showNoGoogle, '0');
|
||||
}
|
||||
|
|
@ -120,7 +120,8 @@ abstract class FirebaseController {
|
|||
),
|
||||
(r) => r.isFirst);
|
||||
} catch (_) {
|
||||
BotToast.showText(text: 'Failed to open chat...');
|
||||
await FlushbarHelper.createError(message: 'Failed to open chat...')
|
||||
.show(context);
|
||||
debugPrint(_);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flushbar/flushbar_helper.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
|
@ -13,7 +13,9 @@ abstract class FluffyShare {
|
|||
await Clipboard.setData(
|
||||
ClipboardData(text: text),
|
||||
);
|
||||
BotToast.showText(text: L10n.of(context).copiedToClipboard);
|
||||
await FlushbarHelper.createSuccess(
|
||||
message: L10n.of(context).copiedToClipboard)
|
||||
.show(context);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flushbar/flushbar_helper.dart';
|
||||
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -19,7 +19,9 @@ abstract class SentryController {
|
|||
);
|
||||
final storage = Store();
|
||||
await storage.setItem(SettingKeys.sentry, enableSentry.toString());
|
||||
BotToast.showText(text: L10n.of(context).changesHaveBeenSaved);
|
||||
await FlushbarHelper.createSuccess(
|
||||
message: L10n.of(context).changesHaveBeenSaved)
|
||||
.show(context);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue