How can i remove the background color. I would like the background to be transparent
EasyLoading.instance ..displayDuration = const Duration(milliseconds: 2000) ..loadingStyle = EasyLoadingStyle.custom ..indicatorSize = 60 ..textColor = Colors.black ..radius = 20 ..backgroundColor = Colors.transparent ..maskColor = Colors.white ..indicatorColor = Colors.black ..userInteractions = false ..dismissOnTap = false ..indicatorType = EasyLoadingIndicatorType.cubeGrid;
The above is not working for me
Thanks for taking the time to open an issue. I will have a look and answer as soon as possible.
Please add ..boxShadow = <BoxShadow>[] to your code.
Final code:
EasyLoading.instance ..displayDuration = const Duration(milliseconds: 2000) ..loadingStyle = EasyLoadingStyle.custom ..indicatorSize = 60 ..textColor = Colors.black ..radius = 20 ..backgroundColor = Colors.transparent ..maskColor = Colors.white ..indicatorColor = Colors.black54 ..userInteractions = false ..dismissOnTap = false ..boxShadow = <BoxShadow>[] ..indicatorType = EasyLoadingIndicatorType.cubeGrid;
@BBarisKilic Thank you very much! I just have same question now. Add a BoxShadow perfect working !
Didn't work for me. I'm trying to use custom widget for loading but it is still showing black background wrapping my widget.
Please attach your code snippet at here
My code:
/// EasyLoading styling
EasyLoading.instance
..displayDuration = const Duration(milliseconds: 2500)
..radius = 10
..textStyle = const TextStyle(
color: AppTheme.whiteColor,
fontSize: 18,
letterSpacing: 0.5,
fontWeight: FontWeight.w400,
)
..maskColor = Colors.transparent
..backgroundColor = Colors.transparent
..maskType = EasyLoadingMaskType.custom
..indicatorWidget = Image.asset(kGifLoading, height: 80, width: 80)
..boxShadow = [];
What I'm getting in ui:
What I need? I need to remove that black background around my blue image
You forgot to add ..loadingStyle = EasyLoadingStyle.custom line. Your code must be start with as below
EasyLoading.instance
..displayDuration = const Duration(milliseconds: 2500)
..loadingStyle = EasyLoadingStyle.custom // Add this line in your code
..radius = 10
***** your rest of code *****
Let me know if you still face any issue !
Yeah, it worked also had to add
..textColor = Colors.white
..indicatorColor = Colors.transparent
because they can't be null when loadingStyle is custom
是的,它有效还必须添加
..textColor = Colors.white ..indicatorColor = Colors.transparent因为当loadingStyle是自定义的时候它们不能为空
👍🏻 Thanks for the solution, attached the code so more people can see it
EasyLoading.instance
..displayDuration = const Duration(milliseconds: 2500)
..loadingStyle = EasyLoadingStyle.custom
..radius = 10.0
..textColor = Colors.white
..indicatorColor = Colors.transparent
..maskColor = Colors.transparent
..backgroundColor = Colors.transparent
..boxShadow = []
..userInteractions = true
..dismissOnTap = false;