Skip to content

Commit 8b7b00b

Browse files
authored
[flutter_adaptive_scaffold] Migrate MaterialStateProperty to WidgetStateProperty (#6743)
Part of flutter/flutter#148218 Part of flutter/flutter#148361 Migrates off MaterialStateProperty
1 parent 31d3329 commit 8b7b00b

4 files changed

Lines changed: 14 additions & 13 deletions

File tree

packages/flutter_adaptive_scaffold/CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
## NEXT
1+
## 0.1.11
22

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

56
## 0.1.10+2
67

packages/flutter_adaptive_scaffold/example/lib/main.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -863,14 +863,14 @@ class _EmailTile extends StatelessWidget {
863863
child: OutlinedButton(
864864
onPressed: () {},
865865
style: ButtonStyle(
866-
shape: MaterialStateProperty.all(
866+
shape: WidgetStateProperty.all(
867867
RoundedRectangleBorder(
868868
borderRadius: BorderRadius.circular(30.0)),
869869
),
870-
backgroundColor: MaterialStateProperty.all<Color>(
870+
backgroundColor: WidgetStateProperty.all<Color>(
871871
const Color.fromARGB(255, 245, 241, 248),
872872
),
873-
side: MaterialStateProperty.all(
873+
side: WidgetStateProperty.all(
874874
const BorderSide(
875875
width: 0.0, color: Colors.transparent),
876876
),
@@ -885,14 +885,14 @@ class _EmailTile extends StatelessWidget {
885885
child: OutlinedButton(
886886
onPressed: () {},
887887
style: ButtonStyle(
888-
shape: MaterialStateProperty.all(
888+
shape: WidgetStateProperty.all(
889889
RoundedRectangleBorder(
890890
borderRadius: BorderRadius.circular(30.0)),
891891
),
892-
backgroundColor: MaterialStateProperty.all<Color>(
892+
backgroundColor: WidgetStateProperty.all<Color>(
893893
const Color.fromARGB(255, 245, 241, 248),
894894
),
895-
side: MaterialStateProperty.all(
895+
side: WidgetStateProperty.all(
896896
const BorderSide(
897897
width: 0.0, color: Colors.transparent),
898898
),

packages/flutter_adaptive_scaffold/lib/src/adaptive_scaffold.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ class AdaptiveScaffold extends StatefulWidget {
338338
NavigationBarTheme.of(context);
339339
return NavigationBarTheme(
340340
data: currentNavBarTheme.copyWith(
341-
iconTheme: MaterialStateProperty.resolveWith(
342-
(Set<MaterialState> states) {
341+
iconTheme: WidgetStateProperty.resolveWith(
342+
(Set<WidgetState> states) {
343343
return currentNavBarTheme.iconTheme
344344
?.resolve(states)
345345
?.copyWith(size: iconSize) ??

packages/flutter_adaptive_scaffold/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: flutter_adaptive_scaffold
22
description: Widgets to easily build adaptive layouts, including navigation elements.
3-
version: 0.1.10+2
3+
version: 0.1.11
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+flutter_adaptive_scaffold%22
55
repository: https://github.com/flutter/packages/tree/main/packages/flutter_adaptive_scaffold
66

77
environment:
8-
sdk: ^3.2.0
9-
flutter: ">=3.16.0"
8+
sdk: ^3.3.0
9+
flutter: ">=3.19.0"
1010

1111
dependencies:
1212
flutter:

0 commit comments

Comments
 (0)