Fix StyledToast

This commit is contained in:
Christian Pauly
2020-05-13 10:45:50 +02:00
parent 12f4f6e192
commit 975fb1a45c
12 changed files with 74 additions and 79 deletions

View File

@ -1,7 +1,7 @@
import 'package:fluffychat/l10n/l10n.dart';
import 'package:flutter/material.dart';
import 'package:famedlysdk/famedlysdk.dart';
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
import 'package:bot_toast/bot_toast.dart';
class SimpleDialogs {
final BuildContext context;
@ -117,7 +117,7 @@ class SimpleDialogs {
builder: (c) => AlertDialog(
title: titleText != null ? Text(titleText) : null,
content: contentText != null ? Text(contentText) : null,
actions: <Widget>[
actions: <Widget>[
FlatButton(
child: Text(
okText ?? L10n.of(context).ok.toUpperCase(),
@ -149,10 +149,10 @@ class SimpleDialogs {
onAdditionalAuth != null) {
return await tryRequestWithErrorToast(onAdditionalAuth(exception));
} else {
showToast(exception.errorMessage);
BotToast.showText(text: exception.errorMessage);
}
} catch (exception) {
showToast(exception.toString());
BotToast.showText(text: exception.toString());
return false;
}
}