ionicfirebaseapp / getwidget

Most popular and easy to use open source UI library with 1000+ Widgets to build flutter app.

Home Page:https://www.getwidget.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gf_progress_bar linearGradient

ToZhanChi opened this issue · comments

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

url: https://github.com/ionicfirebaseapp/getwidget/blob/master/lib/components/progress_bar/gf_progress_bar.dart

if (linearGradient != null) {
throw ArgumentError(' linearGradient cannot be given');
}

Hi @zhanchi88 , can you explain about the issue ?

linearGradient can not work

GFProgressBar(
lineHeight: 18,
linearGradient: LinearGradient(
colors: [const Color(0xffF3201E), Color(0xfff4320f)]),
backgroundColor: const Color(0xfff6f6f6),
percentage: 0.8,
animation: true,
child: Center(
child: Text(
"80%",
style: TextStyle(color: Colors.grey, fontSize: 13))))

======== Exception caught by widgets library =======================================================
The following ArgumentError was thrown building Consumer(dirty, dependencies: [_LocalizationsScope-[GlobalKey#47197], _InheritedTheme, _InheritedProviderScope<AssistedDetailModel?>]):
Invalid argument(s): linearGradient cannot be given

嗨@zhanchi88,你能解释一下这个问题吗?

linearGradient can not work

GFProgressBar( lineHeight: 18, linearGradient: LinearGradient( colors: [const Color(0xffF3201E), Color(0xfff4320f)]), backgroundColor: const Color(0xfff6f6f6), percentage: 0.8, animation: true, child: Center( child: Text( "80%", style: TextStyle(color: Colors.grey, fontSize: 13))))

======== Exception caught by widgets library ======================================================= The following ArgumentError was thrown building Consumer(dirty, dependencies: [_LocalizationsScope-[GlobalKey#47197], _InheritedTheme, _InheritedProviderScope<AssistedDetailModel?>]): Invalid argument(s): linearGradient cannot be given

Hi @zhanchi88 , can you explain about the issue ?

if (linearGradient != null) {

Hi @ToZhanChi sorry we could not reply you,
I have checked your code with flutter version 3.0.1 and getwidget version 3.0.1 , this is working fine.
GFProgressBar(
lineHeight: 18,
linearGradient: LinearGradient(
colors: [const Color(0xffF3201E), Color(0xfff4320f)]),
backgroundColor: const Color(0xfff6f6f6),
percentage: 0.8,
animation: true,
child: Center(
child: Text(
"80%",
style: TextStyle(color: Colors.grey, fontSize: 13))))

image