mirror of
https://github.com/flutter/packages.git
synced 2025-06-28 22:02:38 +08:00
Migrating styleFrom API to new version. (#4540)
Updates the styleFrom API to use `backgroundColor` and `foregroundColor` instead of deprecated methods (`primary`, `onPrimary`). Fixes [#105724](https://github.com/flutter/flutter/issues/105724)
This commit is contained in:

committed by
GitHub

parent
ac4137624a
commit
34683acc39
@ -1,3 +1,7 @@
|
||||
## 0.10.5+3
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
|
||||
## 0.10.5+2
|
||||
|
||||
* Fixes unawaited_futures violations.
|
||||
|
@ -365,16 +365,12 @@ 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
|
||||
foregroundColor: 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
|
||||
foregroundColor: controller?.value.exposureMode == ExposureMode.locked
|
||||
? Colors.orange
|
||||
: Colors.blue,
|
||||
);
|
||||
@ -452,16 +448,12 @@ 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
|
||||
foregroundColor: 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
|
||||
foregroundColor: controller?.value.focusMode == FocusMode.locked
|
||||
? Colors.orange
|
||||
: Colors.blue,
|
||||
);
|
||||
|
@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing
|
||||
Dart.
|
||||
repository: https://github.com/flutter/packages/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.10.5+2
|
||||
version: 0.10.5+3
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.0 <4.0.0"
|
||||
|
@ -1,3 +1,7 @@
|
||||
## 0.10.8+6
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
|
||||
## 0.10.8+5
|
||||
|
||||
* Provides a default exposure point if null.
|
||||
|
@ -368,16 +368,12 @@ 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
|
||||
foregroundColor: 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
|
||||
foregroundColor: controller?.value.exposureMode == ExposureMode.locked
|
||||
? Colors.orange
|
||||
: Colors.blue,
|
||||
);
|
||||
@ -456,16 +452,12 @@ 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
|
||||
foregroundColor: 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
|
||||
foregroundColor: controller?.value.focusMode == FocusMode.locked
|
||||
? Colors.orange
|
||||
: Colors.blue,
|
||||
);
|
||||
|
@ -3,7 +3,7 @@ description: Android implementation of the camera plugin.
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
|
||||
|
||||
version: 0.10.8+5
|
||||
version: 0.10.8+6
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.0 <4.0.0"
|
||||
|
@ -1,3 +1,7 @@
|
||||
## 0.5.0+13
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
|
||||
## 0.5.0+12
|
||||
|
||||
* Wraps classes needed to implement resolution configuration for image capture, image analysis, and preview.
|
||||
|
@ -357,16 +357,12 @@ 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
|
||||
foregroundColor: 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
|
||||
foregroundColor: controller?.value.exposureMode == ExposureMode.locked
|
||||
? Colors.orange
|
||||
: Colors.blue,
|
||||
);
|
||||
@ -439,16 +435,12 @@ 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
|
||||
foregroundColor: 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
|
||||
foregroundColor: controller?.value.focusMode == FocusMode.locked
|
||||
? Colors.orange
|
||||
: Colors.blue,
|
||||
);
|
||||
|
@ -2,7 +2,7 @@ name: camera_android_camerax
|
||||
description: Android implementation of the camera plugin using the CameraX library.
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
|
||||
version: 0.5.0+12
|
||||
version: 0.5.0+13
|
||||
|
||||
environment:
|
||||
sdk: ">=2.19.0 <4.0.0"
|
||||
|
@ -1,5 +1,6 @@
|
||||
## NEXT
|
||||
## 0.9.13+3
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
* Fixes unawaited_futures violations.
|
||||
|
||||
## 0.9.13+2
|
||||
|
@ -368,16 +368,12 @@ 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
|
||||
foregroundColor: 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
|
||||
foregroundColor: controller?.value.exposureMode == ExposureMode.locked
|
||||
? Colors.orange
|
||||
: Colors.blue,
|
||||
);
|
||||
@ -456,16 +452,12 @@ 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
|
||||
foregroundColor: 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
|
||||
foregroundColor: controller?.value.focusMode == FocusMode.locked
|
||||
? Colors.orange
|
||||
: Colors.blue,
|
||||
);
|
||||
|
@ -2,7 +2,7 @@ name: camera_avfoundation
|
||||
description: iOS implementation of the camera plugin.
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_avfoundation
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
|
||||
version: 0.9.13+2
|
||||
version: 0.9.13+3
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.0 <4.0.0"
|
||||
|
@ -1,3 +1,7 @@
|
||||
## NEXT
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
|
||||
## 1.0.0
|
||||
|
||||
* Removes the deprecated `getSavePath` in favor of `getSaveLocation`.
|
||||
|
@ -42,11 +42,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: _isIOS ? null : () => _getDirectoryPath(context),
|
||||
child: const Text(
|
||||
|
@ -44,11 +44,8 @@ class GetMultipleDirectoriesPage 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text(
|
||||
'Press to ask user to choose multiple directories'),
|
||||
|
@ -15,11 +15,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
@ -49,11 +49,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open an image file(png, jpg)'),
|
||||
onPressed: () => _openImageFile(context),
|
||||
|
@ -52,11 +52,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open multiple images (png, jpg)'),
|
||||
onPressed: () => _openImageFile(context),
|
||||
|
@ -53,11 +53,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open a text file (json, txt)'),
|
||||
onPressed: () => _openTextFile(context),
|
||||
|
@ -79,11 +79,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: _isIOS ? null : () => _saveFile(),
|
||||
child: const Text(
|
||||
|
@ -1,3 +1,7 @@
|
||||
## NEXT
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
|
||||
## 0.5.1+4
|
||||
|
||||
* Updates references to the deprecated `macUTIs`.
|
||||
|
@ -12,11 +12,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
@ -49,11 +49,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open an image file(png, jpg)'),
|
||||
onPressed: () => _openImageFile(context),
|
||||
|
@ -54,11 +54,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open multiple images (png, jpg)'),
|
||||
onPressed: () => _openImageFile(context),
|
||||
|
@ -46,11 +46,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open a text file (json, txt)'),
|
||||
onPressed: () => _openTextFile(context),
|
||||
|
@ -1,3 +1,7 @@
|
||||
## NEXT
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
|
||||
## 0.9.2
|
||||
|
||||
* Adds `getSaveLocation` and deprecates `getSavePath`.
|
||||
|
@ -41,11 +41,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to ask user to choose a directory'),
|
||||
onPressed: () => _getDirectoryPath(context),
|
||||
|
@ -42,11 +42,8 @@ class GetMultipleDirectoriesPage 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text(
|
||||
'Press to ask user to choose multiple directories'),
|
||||
|
@ -12,11 +12,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
@ -48,11 +48,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open an image file(png, jpg)'),
|
||||
onPressed: () => _openImageFile(context),
|
||||
|
@ -52,11 +52,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open multiple images (png, jpg)'),
|
||||
onPressed: () => _openImageFile(context),
|
||||
|
@ -45,11 +45,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open a text file (json, txt)'),
|
||||
onPressed: () => _openTextFile(context),
|
||||
|
@ -68,11 +68,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: _saveFile,
|
||||
child: const Text('Press to save a text file'),
|
||||
|
@ -1,3 +1,7 @@
|
||||
## NEXT
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
|
||||
## 0.9.3+1
|
||||
|
||||
* Updates to the latest version of `pigeon`.
|
||||
|
@ -41,11 +41,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to ask user to choose a directory'),
|
||||
onPressed: () => _getDirectoryPath(context),
|
||||
|
@ -12,11 +12,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
@ -48,11 +48,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open an image file(png, jpg)'),
|
||||
onPressed: () => _openImageFile(context),
|
||||
|
@ -52,11 +52,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open multiple images (png, jpg)'),
|
||||
onPressed: () => _openImageFile(context),
|
||||
|
@ -45,11 +45,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open a text file (json, txt)'),
|
||||
onPressed: () => _openTextFile(context),
|
||||
|
@ -68,11 +68,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: _saveFile,
|
||||
child: const Text('Press to save a text file'),
|
||||
|
@ -1,3 +1,7 @@
|
||||
## NEXT
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
|
||||
## 0.9.3
|
||||
|
||||
* Adds `getSaveLocation` and deprecates `getSavePath`.
|
||||
|
@ -41,11 +41,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to ask user to choose a directory'),
|
||||
onPressed: () => _getDirectoryPath(context),
|
||||
|
@ -12,11 +12,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
@ -48,11 +48,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open an image file(png, jpg)'),
|
||||
onPressed: () => _openImageFile(context),
|
||||
|
@ -52,11 +52,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open multiple images (png, jpg)'),
|
||||
onPressed: () => _openImageFile(context),
|
||||
|
@ -45,11 +45,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Press to open a text file (json, txt)'),
|
||||
onPressed: () => _openTextFile(context),
|
||||
|
@ -88,11 +88,8 @@ 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,
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: _saveFile,
|
||||
child: const Text('Press to save a text file'),
|
||||
|
@ -1,3 +1,7 @@
|
||||
## 0.3.0+11
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
|
||||
## 0.3.0+10
|
||||
|
||||
* Bumps com.android.billingclient:billing from 6.0.0 to 6.0.1.
|
||||
|
@ -258,9 +258,7 @@ 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,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: () {
|
||||
// NOTE: If you are making a subscription purchase/upgrade/downgrade, we recommend you to
|
||||
|
@ -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/packages/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.3.0+10
|
||||
version: 0.3.0+11
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.0 <4.0.0"
|
||||
|
@ -1,3 +1,7 @@
|
||||
## 0.3.6+5
|
||||
|
||||
* Migrates `styleFrom` usage in examples off of deprecated `primary` and `onPrimary` parameters.
|
||||
|
||||
## 0.3.6+4
|
||||
|
||||
* Removes obsolete null checks on non-nullable values.
|
||||
|
@ -262,9 +262,7 @@ 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,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: () {
|
||||
final PurchaseParam purchaseParam = PurchaseParam(
|
||||
@ -339,9 +337,7 @@ class _MyAppState extends State<_MyApp> {
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
// 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,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: () => _iapStoreKitPlatform.restorePurchases(),
|
||||
child: const Text('Restore purchases'),
|
||||
|
@ -2,7 +2,7 @@ name: in_app_purchase_storekit
|
||||
description: An implementation for the iOS and macOS platforms of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework.
|
||||
repository: https://github.com/flutter/packages/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.6+4
|
||||
version: 0.3.6+5
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.0 <4.0.0"
|
||||
|
Reference in New Issue
Block a user