Fix StyledToast
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user