fix:登录和toast
This commit is contained in:
+13
-2
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
|
||||
import '../theme/yanting_tokens.dart';
|
||||
@@ -176,6 +177,16 @@ class ErrorState extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
void showAppToast(BuildContext context, String message) {
|
||||
ShadToaster.of(context).show(ShadToast(title: Text(message)));
|
||||
Future<bool?> showAppToast(BuildContext context, String message) {
|
||||
// ShadToaster.of(context).show(ShadToast(title: Text(message)));
|
||||
|
||||
return Fluttertoast.showToast(
|
||||
msg: message,
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
timeInSecForIosWeb: 1,
|
||||
backgroundColor: const Color(0xCC111111),
|
||||
textColor: Colors.white,
|
||||
fontSize: 16,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user