nslogx / flutter_easyloading

✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
https://pub.dev/packages/flutter_easyloading
MIT License
1.24k stars 219 forks source link

app背景无法透明 #124

Open xtuck opened 3 years ago

xtuck commented 3 years ago

return MaterialApp( onGenerateRoute: (_) => MCRoute.route(observers: [BotToastNavigatorObserver()]), onUnknownRoute: MCRoute.queryRoute(emptyRoute), builder: EasyLoading.init(builder: _fontFixedBuilder(BotToastInit())), title: AppInfo.appName, debugShowCheckedModeBanner: false, theme: ThemeData(platform: TargetPlatform.iOS, primarySwatch: Colors.blue, brightness: Brightness.light),

创建FlutterviewController,想实现一个半透明背景的弹框,但是EasyLoading.init(),会导致我的app始终有白色背景,但是不使用EasyLoading.init(),则可以实现透明背景

github-actions[bot] commented 3 years ago

Thanks for taking the time to open an issue. I will have a look and answer as soon as possible.

liconglei commented 2 years ago

我也是这个问题,没明白为什么放在这里初始化,当时无脑的选择这个库!!!

xtuck commented 2 years ago

我也是这个问题,没明白为什么放在这里初始化,当时无脑的选择这个库!!!

放在这里,就可以全局弹toast或者loading了,不需要传context,除了背景不透明这么一个问题外,其他方面来说,还是很好用的

javaqiang commented 2 years ago

遇到相同问题了,把背景搞成白色了,这决定了用不用这个库。

rslz commented 1 year ago

flutter_easyloading: ^3.0.5 还是有这个问题

superleezen commented 1 year ago

修改源码,FlutterEasyLoading中Material添加type: MaterialType.transparency

zhoudajun-ola commented 6 months ago

项目主题中设置:canvasColor: Colors.transparent 即可

sophistWY commented 3 months ago

项目主题中设置:canvasColor: Colors.transparent 即可

正解~~