remove shit toast

hmxc
小赖 4 years ago
parent f395b2d9f1
commit 111f0cdf27

@ -58,9 +58,7 @@ class _SplashPageState extends State<SplashPage> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
Future.delayed(Duration(milliseconds: 300), () { PowerLogger.start(context, debug: DeveloperUtil.dev);
if (mounted) PowerLogger.init(context, debug: DeveloperUtil.dev);
});
_initOp().then((value) => Get.offAll(TabNavigator())); _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:akuCommunity/extensions/widget_list_ext.dart';
export 'package:velocity_x/velocity_x.dart'; export 'package:velocity_x/velocity_x.dart';
export 'package:akuCommunity/const/resource.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: // Flutter imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.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/provider/cart.dart';
import 'package:akuCommunity/routers/page_routers.dart'; import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/utils/toast.dart';
import 'cached_image_wrapper.dart'; import 'cached_image_wrapper.dart';
class GoodsSpecsSheet extends StatefulWidget { class GoodsSpecsSheet extends StatefulWidget {
@ -284,7 +284,7 @@ class _GoodsSpecsSheetState extends State<GoodsSpecsSheet> {
Get.back(); Get.back();
switch (type) { switch (type) {
case '加入购物车': case '加入购物车':
Toast.globalToast('已添加入购物车'); BotToast.showText(text: '已添加入购物车');
model.save(widget.itemid, widget.itemtitle, count, widget.itemprice, model.save(widget.itemid, widget.itemtitle, count, widget.itemprice,
widget.itempic); widget.itempic);
break; break;
@ -301,7 +301,7 @@ class _GoodsSpecsSheetState extends State<GoodsSpecsSheet> {
).to; ).to;
break; break;
case '请选择规格': case '请选择规格':
Toast.globalToast('已添加入购物车'); BotToast.showText(text: '已添加入购物车');
break; break;
default: default:
} }

Loading…
Cancel
Save