Fix StyledToast
This commit is contained in:
parent
9569992ec2
commit
9f4660bd9f
12 changed files with 74 additions and 79 deletions
|
|
@ -15,7 +15,7 @@ import 'package:fluffychat/l10n/l10n.dart';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:pedantic/pedantic.dart';
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ class _ChatState extends State<_Chat> {
|
|||
|
||||
void sendFileAction(BuildContext context) async {
|
||||
if (kIsWeb) {
|
||||
showToast(L10n.of(context).notSupportedInWeb);
|
||||
BotToast.showText(text: L10n.of(context).notSupportedInWeb);
|
||||
return;
|
||||
}
|
||||
File file = await FilePicker.getFile();
|
||||
|
|
@ -191,7 +191,7 @@ class _ChatState extends State<_Chat> {
|
|||
|
||||
void sendImageAction(BuildContext context) async {
|
||||
if (kIsWeb) {
|
||||
showToast(L10n.of(context).notSupportedInWeb);
|
||||
BotToast.showText(text: L10n.of(context).notSupportedInWeb);
|
||||
return;
|
||||
}
|
||||
File file = await ImagePicker.pickImage(
|
||||
|
|
@ -209,7 +209,7 @@ class _ChatState extends State<_Chat> {
|
|||
|
||||
void openCameraAction(BuildContext context) async {
|
||||
if (kIsWeb) {
|
||||
showToast(L10n.of(context).notSupportedInWeb);
|
||||
BotToast.showText(text: L10n.of(context).notSupportedInWeb);
|
||||
return;
|
||||
}
|
||||
File file = await ImagePicker.pickImage(
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import 'package:fluffychat/views/invitation_selection.dart';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:link_text/link_text.dart';
|
||||
import './settings_emotes.dart';
|
||||
|
|
@ -40,7 +40,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|||
widget.room.setName(displayname),
|
||||
);
|
||||
if (success != false) {
|
||||
showToast(L10n.of(context).displaynameHasBeenChanged);
|
||||
BotToast.showText(text: L10n.of(context).displaynameHasBeenChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|||
widget.room.setDescription(displayname),
|
||||
);
|
||||
if (success != false) {
|
||||
showToast(L10n.of(context).groupDescriptionHasBeenChanged);
|
||||
BotToast.showText(text: L10n.of(context).groupDescriptionHasBeenChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|||
),
|
||||
);
|
||||
if (success != false) {
|
||||
showToast(L10n.of(context).avatarHasBeenChanged);
|
||||
BotToast.showText(text: L10n.of(context).avatarHasBeenChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -172,7 +172,8 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|||
Clipboard.setData(
|
||||
ClipboardData(text: widget.room.canonicalAlias),
|
||||
);
|
||||
showToast(L10n.of(context).copiedToClipboard);
|
||||
BotToast.showText(
|
||||
text: L10n.of(context).copiedToClipboard);
|
||||
},
|
||||
),
|
||||
ChatSettingsPopupMenu(widget.room, false)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
|
|||
import 'package:fluffychat/components/matrix.dart';
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
|
||||
import 'chat_list.dart';
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ class _InvitationSelectionState extends State<InvitationSelection> {
|
|||
widget.room.invite(id),
|
||||
);
|
||||
if (success != false) {
|
||||
showToast(L10n.of(context).contactHasBeenInvitedToTheGroup);
|
||||
BotToast.showText(text: L10n.of(context).contactHasBeenInvitedToTheGroup);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:flutter_advanced_networkimage/provider.dart';
|
||||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
|
||||
import 'chat_list.dart';
|
||||
import '../components/adaptive_page_layout.dart';
|
||||
|
|
@ -371,7 +371,7 @@ class _EmoteImagePickerState extends State<_EmoteImagePicker> {
|
|||
),
|
||||
onPressed: () async {
|
||||
if (kIsWeb) {
|
||||
showToast(L10n.of(context).notSupportedInWeb);
|
||||
BotToast.showText(text: L10n.of(context).notSupportedInWeb);
|
||||
return;
|
||||
}
|
||||
File file = await ImagePicker.pickImage(
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import 'package:fluffychat/l10n/l10n.dart';
|
|||
import 'package:fluffychat/utils/app_route.dart';
|
||||
import 'package:fluffychat/views/auth_web_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
|
||||
import 'chat_list.dart';
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
|||
try {
|
||||
await matrix.client.setDisplayname(widget.displayname);
|
||||
} catch (exception) {
|
||||
showToast(L10n.of(context).couldNotSetDisplayname);
|
||||
BotToast.showText(text: L10n.of(context).couldNotSetDisplayname);
|
||||
}
|
||||
if (widget.avatar != null) {
|
||||
try {
|
||||
|
|
@ -107,7 +107,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
|||
),
|
||||
);
|
||||
} catch (exception) {
|
||||
showToast(L10n.of(context).couldNotSetAvatar);
|
||||
BotToast.showText(text: L10n.of(context).couldNotSetAvatar);
|
||||
}
|
||||
}
|
||||
await Navigator.of(context).pushAndRemoveUntil(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue