fluttercommunity / fluttercommunity/flutter_uploader
Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'
- Dominant language
- Dart
- Stars
- 218
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
pub.dev/dropdown_button2-1.9.4/lib/dropdown_button2.dart:1667:51: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
This appears to be due to changes in the Flutter SDK where `subtitle1` has been renamed or deprecated.
**To Reproduce**
Steps to reproduce the behavior:
1. Use Flutter version 3.0.0 (or the latest version as of this writing).
2. Add `dropdown_button2: ^1.9.4` to `pubspec.yaml`.
3. Run the project.
4. See the error in the console output.
**Expected Behavior**
The package should use the updated `TextTheme` properties compatible with the latest Flutter SDK. Specifically, the `subtitle1` should be replaced with `titleMedium` or another appropriate property.
**Proposed Solution**
Update the code in `dropdown_button2.dart` as follows:
```dart
// Original code
style: Theme.of(context).textTheme.subtitle1,
// Updated code
style: Theme.of(context).textTheme.titleMedium,
Could you please update the package to be compatible with the latest Flutter SDK? This would greatly help the community and avoid similar issues in the future.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.