Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i remove the background color. I would like the background to be transparent #135

Open
princestha opened this issue Oct 5, 2021 · 10 comments

Comments

@princestha
Copy link

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

@github-actions
Copy link

github-actions bot commented Oct 5, 2021

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

@BBarisKilic
Copy link

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;

@KannadukiAoi
Copy link

KannadukiAoi commented Feb 23, 2022

@BBarisKilic Thank you very much! I just have same question now. Add a BoxShadow perfect working !

@rmahmadkhan
Copy link

Didn't work for me. I'm trying to use custom widget for loading but it is still showing black background wrapping my widget.

@idamsel
Copy link

idamsel commented Oct 12, 2022

Please attach your code snippet at here

@rmahmadkhan
Copy link

rmahmadkhan commented Oct 12, 2022

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

@idamsel
Copy link

idamsel commented Oct 12, 2022

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 !

@rmahmadkhan
Copy link

Yeah, it worked also had to add

    ..textColor = Colors.white
    ..indicatorColor = Colors.transparent

because they can't be null when loadingStyle is custom

@applebest
Copy link

是的,它有效还必须添加

    ..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;

@lozyHao
Copy link

lozyHao commented Mar 31, 2024

image
1、为啥加上 loadingStyle = EasyLoadingStyle.custom之后,toast直接显示不出来
2、backgroundColor = backgroundColor,自定义背景色不起作用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants