Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flutter_adaptive_scaffold] Migrate MaterialStateProperty to WidgetStateProperty #6743

Merged
merged 4 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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