Fix StyledToast
This commit is contained in:
parent
9569992ec2
commit
9f4660bd9f
12 changed files with 74 additions and 79 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue