Skip to content

Commit

Permalink
Minor updates to address deprecation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
larryaasen committed Sep 4, 2024
1 parent fa02d08 commit 4603c94
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
flutter-version: ['3.16.0', '3.19.4']
flutter-version: ['3.16.0', '3.19.4', '3.24.1']

steps:
- uses: actions/checkout@v3
Expand All @@ -33,7 +33,7 @@ jobs:

- name: Analyze
run: flutter analyze

- name: Run unit and widget tests
run: flutter test --coverage --coverage-path=lcov.info

Expand Down
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Next
## 10.4.0

- [413] Fixed Haitian Creole messages to use correct grammar. (thanks to @wjeanvilma)
- [415] Added Kurdish Sorani ('ku') language translation. (thanks to @drpshtiwan)
- Minor updates to address deprecation warnings.

## 10.3.0

Expand Down Expand Up @@ -662,12 +663,12 @@ the US. The country code can be overriden with the optional `countryCode` parame

## 0.10.4

* Updated dependency xml to ">=3.5.0 <5.0.0" to improve score on pub.dev in the
* Updated dependency xml to ">=3.5.0 <5.0.0" to improve score on pub.dev in the
Maintenance issues and suggestions section.

## 0.10.3

* Updated depenency flutter_device_locale to 0.4.0, and xml to 3.5.0, to improve score on pub.dev in the
* Updated depenency flutter_device_locale to 0.4.0, and xml to 3.5.0, to improve score on pub.dev in the
Maintenance issues and suggestions section.

## 0.10.2
Expand All @@ -683,7 +684,7 @@ Maintenance issues and suggestions section.

* Added options to hide ignore and later buttons. (Thanks to Karthik Ponnam)
* Added option to close alert dialog on tap outside of alert dialog. (Thanks to Karthik Ponnam)
*
*

## 0.9.0

Expand Down Expand Up @@ -743,7 +744,7 @@ defaults to debug logging on, and added command line app to evaluate the iTunes
* added many customizations to the widget including callbacks for onIgnore, onLater, and onUpdate
* updated the README screenshot
* updated tests, improved README
* broke out widget into new file
* broke out widget into new file

## 0.1.0

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main_alert_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MyUpgradeAlertState extends UpgradeAlertState {
textButtonTheme: const TextButtonThemeData(
style: ButtonStyle(
// Change the color of the text buttons.
foregroundColor: MaterialStatePropertyAll(Colors.orange),
foregroundColor: WidgetStatePropertyAll(Colors.orange),
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main_card_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MyApp extends StatelessWidget {
textButtonTheme: const TextButtonThemeData(
style: ButtonStyle(
// Change the color of the text buttons.
foregroundColor: MaterialStatePropertyAll(Colors.orange),
foregroundColor: WidgetStatePropertyAll(Colors.orange),
),
),
);
Expand Down
10 changes: 3 additions & 7 deletions lib/src/alert_style_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class AlertStyleWidget extends StatelessWidget {
///
/// Typically this is a list of [TextButton] widgets.
///
/// These widgets will be wrapped in a [ButtonBar], which introduces 8 pixels
/// These widgets will be wrapped in a [OverflowBar], which introduces 8 pixels
/// of padding on each side.
///
/// If the [title] is not null but the [content] _is_ null, then an extra 20
/// pixels of padding is added above the [ButtonBar] to separate the [title]
/// pixels of padding is added above the [OverflowBar] to separate the [title]
/// from the [actions].
final List<Widget> actions;

Expand Down Expand Up @@ -73,11 +73,7 @@ class AlertStyleWidget extends StatelessWidget {
),
));

children.add(
ButtonBar(
children: actions,
),
);
children.add(OverflowBar(children: actions));

Widget dialogChild = IntrinsicWidth(
child: Column(
Expand Down
5 changes: 3 additions & 2 deletions lib/src/upgrade_alert.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@ class UpgradeAlertState extends State<UpgradeAlert> {
displayed = true;
final appMessages = widget.upgrader.determineMessages(context);

Future.delayed(const Duration(milliseconds: 0), () {
Future.delayed(Duration.zero, () {
showTheDialog(
key: widget.dialogKey ?? const Key('upgrader_alert_dialog'),
// ignore: use_build_context_synchronously
context: context,
title: appMessages.message(UpgraderMessage.title),
message: widget.upgrader.body(appMessages),
Expand Down Expand Up @@ -236,7 +237,7 @@ class UpgradeAlertState extends State<UpgradeAlert> {
builder: (BuildContext context) {
return PopScope(
canPop: onCanPop(),
onPopInvoked: (didPop) {
onPopInvokedWithResult: (didPop, result) {
if (widget.upgrader.state.debugLogging) {
print('upgrader: showTheDialog onPopInvoked: $didPop');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/upgrader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typedef WillDisplayUpgradeCallback = void Function({
/// Creates a shared instance of [Upgrader].
Upgrader _sharedInstance = Upgrader();

/// An upgrade controllerthat maintains a [state] that is used to
/// An upgrade controller that maintains a [state] that is used to
/// trigger an alert or other UI to evaluate upgrading criteria.
///
/// See also:
Expand Down

0 comments on commit 4603c94

Please sign in to comment.