getwidget
getwidget copied to clipboard
gf_progress_bar linearGradient
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- 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<AssistedDetailModel>(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 ?
https://github.com/ionicfirebaseapp/getwidget/blob/9fcb362f37fa539d62643975af58f9fe876b4841/lib/components/progress_bar/gf_progress_bar.dart#L34
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))))