change: Switch to ScaffoldMessenger

This commit is contained in:
Christian Pauly 2021-04-03 13:09:20 +02:00
commit af2176b1c5
16 changed files with 73 additions and 84 deletions

View file

@ -25,7 +25,7 @@ import 'dart:ui';
import 'package:adaptive_page_layout/adaptive_page_layout.dart';
import 'package:famedlysdk/famedlysdk.dart';
import 'package:fcm_shared_isolate/fcm_shared_isolate.dart';
import 'package:flushbar/flushbar_helper.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
@ -255,10 +255,10 @@ class BackgroundPush {
}
if (await store.getItemBool(SettingKeys.showNoGoogle, true)) {
await loadLocale();
await FlushbarHelper.createError(
message: l10n.noGoogleServicesWarning,
duration: Duration(seconds: 15),
).show(context);
AdaptivePageLayout.of(context).showSnackBar(SnackBar(
content: Text(
l10n.noGoogleServicesWarning,
)));
if (null == await store.getItem(SettingKeys.showNoGoogle)) {
await store.setItemBool(SettingKeys.showNoGoogle, false);
}

View file

@ -1,4 +1,4 @@
import 'package:flushbar/flushbar_helper.dart';
import 'package:adaptive_page_layout/adaptive_page_layout.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@ -13,9 +13,8 @@ abstract class FluffyShare {
await Clipboard.setData(
ClipboardData(text: text),
);
await FlushbarHelper.createSuccess(
message: L10n.of(context).copiedToClipboard)
.show(context);
AdaptivePageLayout.of(context).showSnackBar(
SnackBar(content: Text(L10n.of(context).copiedToClipboard)));
return;
}
}