Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Ignore deprecation for styleFrom button APIs (#5945)
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenaustin committed Jun 14, 2022
1 parent 602e4ac commit 729e62c
Show file tree
Hide file tree
Showing 33 changed files with 104 additions and 4 deletions.
4 changes: 4 additions & 0 deletions packages/camera/camera/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.9.8+1

* Ignores deprecation warnings for upcoming styleFrom button API changes.

## 0.9.8

* Moves Android and iOS implementations to federated packages.
Expand Down
8 changes: 8 additions & 0 deletions packages/camera/camera/example/lib/main.dart
Expand Up @@ -371,11 +371,15 @@ class _CameraExampleHomeState extends State<CameraExampleHome>

Widget _exposureModeControlRowWidget() {
final ButtonStyle styleAuto = TextButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: controller?.value.exposureMode == ExposureMode.auto
? Colors.orange
: Colors.blue,
);
final ButtonStyle styleLocked = TextButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: controller?.value.exposureMode == ExposureMode.locked
? Colors.orange
: Colors.blue,
Expand Down Expand Up @@ -456,11 +460,15 @@ class _CameraExampleHomeState extends State<CameraExampleHome>

Widget _focusModeControlRowWidget() {
final ButtonStyle styleAuto = TextButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: controller?.value.focusMode == FocusMode.auto
? Colors.orange
: Colors.blue,
);
final ButtonStyle styleLocked = TextButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: controller?.value.focusMode == FocusMode.locked
? Colors.orange
: Colors.blue,
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/pubspec.yaml
Expand Up @@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing
Dart.
repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.9.8
version: 0.9.8+1

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down
4 changes: 4 additions & 0 deletions packages/file_selector/file_selector/CHANGELOG.md
@@ -1,3 +1,7 @@
## NEXT

* Ignores deprecation warnings for upcoming styleFrom button API changes.

## 0.8.4+3

* Improves API docs and examples.
Expand Down
Expand Up @@ -37,7 +37,10 @@ class GetDirectoryPage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to ask user to choose a directory'),
Expand Down
Expand Up @@ -12,7 +12,10 @@ class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ButtonStyle style = ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
);
return Scaffold(
Expand Down
Expand Up @@ -47,7 +47,10 @@ class OpenImagePage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to open an image file(png, jpg)'),
Expand Down
Expand Up @@ -50,7 +50,10 @@ class OpenMultipleImagesPage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to open multiple images (png, jpg)'),
Expand Down
Expand Up @@ -50,7 +50,10 @@ class OpenTextPage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to open a text file (json, txt)'),
Expand Down
Expand Up @@ -75,7 +75,10 @@ class SaveTextPage extends StatelessWidget {
const SizedBox(height: 10),
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to save a text file'),
Expand Down
4 changes: 4 additions & 0 deletions packages/file_selector/file_selector_macos/CHANGELOG.md
@@ -1,3 +1,7 @@
## NEXT

* Ignores deprecation warnings for upcoming styleFrom button API changes.

## 0.8.2+2

* Updates references to the obsolete master branch.
Expand Down
Expand Up @@ -39,7 +39,10 @@ class GetDirectoryPage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to ask user to choose a directory'),
Expand Down
Expand Up @@ -12,7 +12,10 @@ class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ButtonStyle style = ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
);
return Scaffold(
Expand Down
Expand Up @@ -46,7 +46,10 @@ class OpenImagePage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to open an image file(png, jpg)'),
Expand Down
Expand Up @@ -50,7 +50,10 @@ class OpenMultipleImagesPage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to open multiple images (png, jpg)'),
Expand Down
Expand Up @@ -43,7 +43,10 @@ class OpenTextPage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to open a text file (json, txt)'),
Expand Down
Expand Up @@ -67,7 +67,10 @@ class SaveTextPage extends StatelessWidget {
const SizedBox(height: 10),
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
onPressed: _saveFile,
Expand Down
4 changes: 4 additions & 0 deletions packages/file_selector/file_selector_windows/CHANGELOG.md
@@ -1,3 +1,7 @@
## NEXT

* Ignores deprecation warnings for upcoming styleFrom button API changes.

## 0.8.2+2

* Updates references to the obsolete master branch.
Expand Down
Expand Up @@ -39,7 +39,10 @@ class GetDirectoryPage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to ask user to choose a directory'),
Expand Down
Expand Up @@ -12,7 +12,10 @@ class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ButtonStyle style = ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
);
return Scaffold(
Expand Down
Expand Up @@ -46,7 +46,10 @@ class OpenImagePage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to open an image file(png, jpg)'),
Expand Down
Expand Up @@ -50,7 +50,10 @@ class OpenMultipleImagesPage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to open multiple images (png, jpg)'),
Expand Down
Expand Up @@ -43,7 +43,10 @@ class OpenTextPage extends StatelessWidget {
children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
child: const Text('Press to open a text file (json, txt)'),
Expand Down
Expand Up @@ -67,7 +67,10 @@ class SaveTextPage extends StatelessWidget {
const SizedBox(height: 10),
ElevatedButton(
style: ElevatedButton.styleFrom(
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.blue,
// ignore: deprecated_member_use
onPrimary: Colors.white,
),
onPressed: _saveFile,
Expand Down
4 changes: 4 additions & 0 deletions packages/in_app_purchase/in_app_purchase/CHANGELOG.md
@@ -1,3 +1,7 @@
## 3.0.6

* Ignores deprecation warnings for upcoming styleFrom button API changes.

## 3.0.5

* Updates references to the obsolete master branch.
Expand Down
Expand Up @@ -260,6 +260,8 @@ class _MyAppState extends State<_MyApp> {
: TextButton(
style: TextButton.styleFrom(
backgroundColor: Colors.green[800],
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.white,
),
onPressed: () {
Expand Down Expand Up @@ -362,6 +364,8 @@ class _MyAppState extends State<_MyApp> {
TextButton(
style: TextButton.styleFrom(
backgroundColor: Theme.of(context).primaryColor,
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.white,
),
onPressed: () => _inAppPurchase.restorePurchases(),
Expand Down
2 changes: 1 addition & 1 deletion packages/in_app_purchase/in_app_purchase/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: in_app_purchase
description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play.
repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
version: 3.0.5
version: 3.0.6

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
4 changes: 4 additions & 0 deletions packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.2.2+8

* Ignores deprecation warnings for upcoming styleFrom button API changes.

## 0.2.2+7

* Updates references to the obsolete master branch.
Expand Down
Expand Up @@ -266,6 +266,8 @@ class _MyAppState extends State<_MyApp> {
: TextButton(
style: TextButton.styleFrom(
backgroundColor: Colors.green[800],
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.white,
),
onPressed: () {
Expand Down
Expand Up @@ -2,7 +2,7 @@ name: in_app_purchase_android
description: An implementation for the Android platform of the Flutter `in_app_purchase` plugin. This uses the Android BillingClient APIs.
repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
version: 0.2.2+7
version: 0.2.2+8

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down
@@ -1,3 +1,7 @@
## 0.3.0+10

* Ignores deprecation warnings for upcoming styleFrom button API changes.

## 0.3.0+9

* Updates references to the obsolete master branch.
Expand Down
Expand Up @@ -261,6 +261,8 @@ class _MyAppState extends State<_MyApp> {
: TextButton(
style: TextButton.styleFrom(
backgroundColor: Colors.green[800],
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.white,
),
onPressed: () {
Expand Down Expand Up @@ -339,6 +341,8 @@ class _MyAppState extends State<_MyApp> {
TextButton(
style: TextButton.styleFrom(
backgroundColor: Theme.of(context).primaryColor,
// TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
// ignore: deprecated_member_use
primary: Colors.white,
),
onPressed: () => _iapStoreKitPlatform.restorePurchases(),
Expand Down
Expand Up @@ -2,7 +2,7 @@ name: in_app_purchase_storekit
description: An implementation for the iOS platform of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework.
repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase_storekit
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
version: 0.3.0+9
version: 0.3.0+10

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down

0 comments on commit 729e62c

Please sign in to comment.