remove shit toast

hmxc
小赖 4 years ago
parent f395b2d9f1
commit 111f0cdf27

@ -58,9 +58,7 @@ class _SplashPageState extends State<SplashPage> {
@override
void initState() {
super.initState();
Future.delayed(Duration(milliseconds: 300), () {
if (mounted) PowerLogger.init(context, debug: DeveloperUtil.dev);
});
PowerLogger.start(context, debug: DeveloperUtil.dev);
_initOp().then((value) => Get.offAll(TabNavigator()));
}

@ -4,8 +4,4 @@ export 'package:akuCommunity/extensions/num_ext.dart';
export 'package:akuCommunity/extensions/widget_list_ext.dart';
export 'package:velocity_x/velocity_x.dart';
export 'package:akuCommunity/const/resource.dart';
// class Screenutil {
// static double length(double lengthNum) => ScreenUtil().setWidth(lengthNum);
// static double size(double sizeNum) => ScreenUtil().setSp(sizeNum);
// }

@ -1,18 +0,0 @@
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class Toast {
static globalToast(String text) {
return BotToast.showText(
text: text,
duration: Duration(milliseconds: 2000),
borderRadius: BorderRadius.circular(3.w),
backgroundColor: Color(0xff000000).withOpacity(0.85),
textStyle: TextStyle(fontSize: ScreenUtil().setSp(34)),
);
}
}

@ -1,4 +1,5 @@
// Flutter imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -12,7 +13,6 @@ import 'package:akuCommunity/pages/confirm_order_page/confirm_order_page.dart';
import 'package:akuCommunity/provider/cart.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/utils/toast.dart';
import 'cached_image_wrapper.dart';
class GoodsSpecsSheet extends StatefulWidget {
@ -284,7 +284,7 @@ class _GoodsSpecsSheetState extends State<GoodsSpecsSheet> {
Get.back();
switch (type) {
case '加入购物车':
Toast.globalToast('已添加入购物车');
BotToast.showText(text: '已添加入购物车');
model.save(widget.itemid, widget.itemtitle, count, widget.itemprice,
widget.itempic);
break;
@ -301,7 +301,7 @@ class _GoodsSpecsSheetState extends State<GoodsSpecsSheet> {
).to;
break;
case '请选择规格':
Toast.globalToast('已添加入购物车');
BotToast.showText(text: '已添加入购物车');
break;
default:
}

Loading…
Cancel
Save