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

Method not found: 'ButtonTheme.bar' #47

Open
ZikBurns opened this issue Feb 11, 2021 · 7 comments
Open

Method not found: 'ButtonTheme.bar' #47

ZikBurns opened this issue Feb 11, 2021 · 7 comments

Comments

@ZikBurns
Copy link

ZikBurns commented Feb 11, 2021

When I try to run my app in chrome, I keep getting this error:

../../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/date_range_picker-1.0.6/lib/date_range_picker.dart:1152:44: Error: Method not found: 'ButtonTheme.bar'. final Widget actions = new ButtonTheme.bar(

I just updated flutter to the last version of and as posted in this post in StackOverflow, ButtonTheme.bar is deprecated. This results in not being able to run the app in web. I don't use "directly" ButtonTheme, but the package flutter_form_builder does. Someone already posted the issue in flutter_form_builder.

Maybe a solution would be to modify date_range_picker yourself to replace the ButtonTheme with ButtonBarTheme...

@alexmarkley
Copy link

This seems to be a blocker on Flutter 2.0.0 stable.

@faisalmushtaq007
Copy link

@alexmarkley I am having same issue, how do i revert back or is there some otherway. Please help. I have deadline ahead of me

@Shiba-Kar
Copy link

Any one with a fix?

@Shiba-Kar
Copy link

For temporary fix .fromButtonThemeData instead of .bar

@faisalmushtaq007
Copy link

@Shiba-Kar downgrade to previous version of flutter, using "flutter downgrade"

@justkawal
Copy link

justkawal commented Mar 4, 2021

@faisalmushtaq007
@alexmarkley

Until the owner of the package gives a permanent fix, here is a temporary fix which is much easier.

In your pubspec.yaml remove the dependency of date_range_picker and replace it with below dependency

dependency_overrides:
  date_range_picker:
    git:
      url: git://github.com/justkawal/date_range_picker.git
      ref: master

~ Best
~ justkawal
~ Long Live 🔥pen Source

@tcd93
Copy link

tcd93 commented Mar 8, 2021

This lib is too awesome compared to Flutter's own DatePicker...

I've forked & upgraded this to null safe here: https://github.com/tcd93/date_range_picker

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

6 participants