Skip to content

Commit

Permalink
[flutter_adaptive_scaffold] Migrate MaterialStateProperty to WidgetSt…
Browse files Browse the repository at this point in the history
…ateProperty (#6743)

Part of flutter/flutter#148218
Part of flutter/flutter#148361

Migrates off MaterialStateProperty
  • Loading branch information
Piinks authored May 29, 2024
1 parent 31d3329 commit 8b7b00b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
5 changes: 3 additions & 2 deletions packages/flutter_adaptive_scaffold/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 0.1.11

* Updates minimum supported SDK version to Flutter 3.16/Dart 3.2.
* Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.
* Migrates deprecated MaterialState and MaterialStateProperty to WidgetState and WidgetStateProperty.

## 0.1.10+2

Expand Down
12 changes: 6 additions & 6 deletions packages/flutter_adaptive_scaffold/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -863,14 +863,14 @@ class _EmailTile extends StatelessWidget {
child: OutlinedButton(
onPressed: () {},
style: ButtonStyle(
shape: MaterialStateProperty.all(
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30.0)),
),
backgroundColor: MaterialStateProperty.all<Color>(
backgroundColor: WidgetStateProperty.all<Color>(
const Color.fromARGB(255, 245, 241, 248),
),
side: MaterialStateProperty.all(
side: WidgetStateProperty.all(
const BorderSide(
width: 0.0, color: Colors.transparent),
),
Expand All @@ -885,14 +885,14 @@ class _EmailTile extends StatelessWidget {
child: OutlinedButton(
onPressed: () {},
style: ButtonStyle(
shape: MaterialStateProperty.all(
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30.0)),
),
backgroundColor: MaterialStateProperty.all<Color>(
backgroundColor: WidgetStateProperty.all<Color>(
const Color.fromARGB(255, 245, 241, 248),
),
side: MaterialStateProperty.all(
side: WidgetStateProperty.all(
const BorderSide(
width: 0.0, color: Colors.transparent),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ class AdaptiveScaffold extends StatefulWidget {
NavigationBarTheme.of(context);
return NavigationBarTheme(
data: currentNavBarTheme.copyWith(
iconTheme: MaterialStateProperty.resolveWith(
(Set<MaterialState> states) {
iconTheme: WidgetStateProperty.resolveWith(
(Set<WidgetState> states) {
return currentNavBarTheme.iconTheme
?.resolve(states)
?.copyWith(size: iconSize) ??
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter_adaptive_scaffold/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: flutter_adaptive_scaffold
description: Widgets to easily build adaptive layouts, including navigation elements.
version: 0.1.10+2
version: 0.1.11
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+flutter_adaptive_scaffold%22
repository: https://github.com/flutter/packages/tree/main/packages/flutter_adaptive_scaffold

environment:
sdk: ^3.2.0
flutter: ">=3.16.0"
sdk: ^3.3.0
flutter: ">=3.19.0"

dependencies:
flutter:
Expand Down

0 comments on commit 8b7b00b

Please sign in to comment.