Closed RajaParikshit closed 2 years ago
Looks like maintainer @cdharris is not responding, so I have prepared a workaround.
If you just want working version for flutter beta/dev channel then add this to your pubspec.yaml
flutter_duration_picker:
git:
url: https://github.com/RajaParikshit/flutter_duration_picker
ref: issue_#28_button_theme_bar
If someone (like me) used version from another PR #26 (which added decoration) and want both PR - use repo forked by me.
flutter_duration_picker:
git: https://github.com/bartektartanus/flutter_duration_picker
thanks @bartektartanus
I also forked this repo and fixed this issue. Beside that i added null-safety support. You can find it at https://github.com/juliansteenbakker/duration_picker and https://pub.dev/packages/duration_picker.
Solution for issue #28
Error Stacktrace :
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( data: ButtonBarTheme.of(context),
on line 579 of flutter_duration_picker.dart