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' #28

Open
RajaParikshit opened this issue Feb 17, 2021 · 0 comments
Open

Method not found: 'ButtonTheme.bar' #28

RajaParikshit opened this issue Feb 17, 2021 · 0 comments

Comments

@RajaParikshit
Copy link

Version Info

flutter_duration_picker:
    dependency: "direct main"
    description:
      name: flutter_duration_picker
      url: "https://pub.dartlang.org"
    source: hosted
    version: "1.0.4"

My flutter Version :

Flutter 1.27.0-2.0.pre.98 • channel master • https://github.com/flutter/flutter.git
Framework • revision 696e4f70d1 (3 days ago) • 2021-02-13 18:31:02 -0500
Engine • revision 1d537824d6
Tools • Dart 2.13.0 (build 2.13.0-30.0.dev)

Error Stacktrace :

../../../../../../../../../.pub-cache/hosted/pub.dartlang.org/flutter_duration_picker-1.0.4/lib/flutter_duration_picker.dart:506:44: Error: Method not found: 'ButtonTheme.bar'.
    final Widget actions = new ButtonTheme.bar(
                                           ^^^

As per SO post : https://stackoverflow.com/questions/66027441/error-method-not-found-buttontheme-bar

ButtonTheme.bar is Deprecated. We need to use ButtonBarTheme instead which offers more flexibility to configure ButtonBar widgets. This feature was deprecated after v1.9.1.

So need to change

final Widget actions = new ButtonTheme.bar(

to

final Widget actions = new ButtonBarTheme(

on line 506 of flutter_duration_picker.dart

I am happy to submit PR for the same.

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

1 participant