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

Update obsolete button refs in plugin examples #3395

Merged
merged 10 commits into from
Jan 7, 2021
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
4 changes: 4 additions & 0 deletions packages/android_alarm_manager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.5+20

* Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets.

## 0.4.5+19

* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))
Expand Down
2 changes: 1 addition & 1 deletion packages/android_alarm_manager/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class _AlarmHomePageState extends State<_AlarmHomePage> {
),
],
),
RaisedButton(
ElevatedButton(
child: Text(
'Schedule OneShot Alarm',
),
Expand Down
2 changes: 1 addition & 1 deletion packages/android_alarm_manager/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Flutter plugin for accessing the Android AlarmManager service, and
# 0.4.y+z is compatible with 1.0.0, if you land a breaking change bump
# the version to 2.0.0.
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
version: 0.4.5+19
version: 0.4.5+20
homepage: https://github.com/flutter/plugins/tree/master/packages/android_alarm_manager

dependencies:
Expand Down
4 changes: 4 additions & 0 deletions packages/android_intent/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.0-nullsafety.2

* Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets.

## 2.0.0-nullsafety.1

* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))
Expand Down
20 changes: 10 additions & 10 deletions packages/android_intent/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ class MyHomePage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
RaisedButton(
ElevatedButton(
child: const Text(
'Tap here to set an alarm\non weekdays at 9:30pm.'),
onPressed: _createAlarm,
),
RaisedButton(
ElevatedButton(
child: const Text('Tap here to test explicit intents.'),
onPressed: () => _openExplicitIntentsView(context)),
],
Expand Down Expand Up @@ -166,40 +166,40 @@ class ExplicitIntentsWidget extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
RaisedButton(
ElevatedButton(
child: const Text(
'Tap here to display panorama\nimagery in Google Street View.'),
onPressed: _openGoogleMapsStreetView,
),
RaisedButton(
ElevatedButton(
child: const Text('Tap here to display\na map in Google Maps.'),
onPressed: _displayMapInGoogleMaps,
),
RaisedButton(
ElevatedButton(
child: const Text(
'Tap here to launch turn-by-turn\nnavigation in Google Maps.'),
onPressed: _launchTurnByTurnNavigationInGoogleMaps,
),
RaisedButton(
ElevatedButton(
child: const Text('Tap here to open link in Google Chrome.'),
onPressed: _openLinkInGoogleChrome,
),
RaisedButton(
ElevatedButton(
child: const Text('Tap here to start activity in new task.'),
onPressed: _startActivityInNewTask,
),
RaisedButton(
ElevatedButton(
child: const Text(
'Tap here to test explicit intent fallback to implicit.'),
onPressed: _testExplicitIntentFallback,
),
RaisedButton(
ElevatedButton(
child: const Text(
'Tap here to open Location Settings Configuration',
),
onPressed: _openLocationSettingsConfiguration,
),
RaisedButton(
ElevatedButton(
child: const Text(
'Tap here to open Application Details',
),
Expand Down
2 changes: 1 addition & 1 deletion packages/android_intent/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: android_intent
description: Flutter plugin for launching Android Intents. Not supported on iOS.
homepage: https://github.com/flutter/plugins/tree/master/packages/android_intent
version: 2.0.0-nullsafety.1
version: 2.0.0-nullsafety.2

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/battery/battery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.11

* Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets.

## 1.0.10

* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))
Expand Down
2 changes: 1 addition & 1 deletion packages/battery/battery/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class _MyHomePageState extends State<MyHomePage> {
builder: (_) => AlertDialog(
content: Text('Battery: $batteryLevel%'),
actions: <Widget>[
FlatButton(
TextButton(
child: const Text('OK'),
onPressed: () {
Navigator.pop(context);
Expand Down
2 changes: 1 addition & 1 deletion packages/battery/battery/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: battery
description: Flutter plugin for accessing information about the battery state
(full, charging, discharging) on Android and iOS.
homepage: https://github.com/flutter/plugins/tree/master/packages/battery/battery
version: 1.0.10
version: 1.0.11

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.4+5

* Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets.

## 0.6.4+4

* Set camera auto focus enabled by default.
Expand Down
24 changes: 14 additions & 10 deletions packages/camera/camera/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,16 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
}

Widget _exposureModeControlRowWidget() {
final ButtonStyle styleAuto = TextButton.styleFrom(
primary: controller?.value?.exposureMode == ExposureMode.auto
? Colors.orange
: Colors.blue,
);
final ButtonStyle styleLocked = TextButton.styleFrom(
primary: controller?.value?.exposureMode == ExposureMode.locked
? Colors.orange
: Colors.blue,
);
return SizeTransition(
sizeFactor: _exposureModeControlRowAnimation,
child: ClipRect(
Expand All @@ -327,12 +337,9 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: [
FlatButton(
TextButton(
child: Text('AUTO'),
textColor:
controller?.value?.exposureMode == ExposureMode.auto
? Colors.orange
: Colors.blue,
style: styleAuto,
onPressed: controller != null
? () =>
onSetExposureModeButtonPressed(ExposureMode.auto)
Expand All @@ -342,12 +349,9 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
showInSnackBar('Resetting exposure point');
},
),
FlatButton(
TextButton(
child: Text('LOCKED'),
textColor:
controller?.value?.exposureMode == ExposureMode.locked
? Colors.orange
: Colors.blue,
style: styleLocked,
onPressed: controller != null
? () =>
onSetExposureModeButtonPressed(ExposureMode.locked)
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera
description: A Flutter plugin for getting information about and controlling the
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
and streaming image buffers to dart.
version: 0.6.4+4
version: 0.6.4+5
homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera

dependencies:
Expand Down
4 changes: 4 additions & 0 deletions packages/file_selector/file_selector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.7.0+2

* Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets.

## 0.7.0+1

* Update Flutter SDK constraint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ class GetDirectoryPage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
color: Colors.blue,
textColor: Colors.white,
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Colors.blue,
onPrimary: Colors.white,
),
child: Text('Press to ask user to choose a directory'),
onPressed: () => _getDirectoryPath(context),
),
Expand Down Expand Up @@ -55,7 +57,7 @@ class TextDisplay extends StatelessWidget {
),
),
actions: [
FlatButton(
TextButton(
child: const Text('Close'),
onPressed: () => Navigator.pop(context),
),
Expand Down
29 changes: 14 additions & 15 deletions packages/file_selector/file_selector/example/lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import 'package:flutter/material.dart';
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ButtonStyle style = ElevatedButton.styleFrom(
primary: Colors.blue,
onPrimary: Colors.white,
);
return Scaffold(
appBar: AppBar(
title: Text('File Selector Demo Home Page'),
Expand All @@ -12,37 +16,32 @@ class HomePage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
color: Colors.blue,
textColor: Colors.white,
ElevatedButton(
style: style,
child: Text('Open a text file'),
onPressed: () => Navigator.pushNamed(context, '/open/text'),
),
SizedBox(height: 10),
RaisedButton(
color: Colors.blue,
textColor: Colors.white,
ElevatedButton(
style: style,
child: Text('Open an image'),
onPressed: () => Navigator.pushNamed(context, '/open/image'),
),
SizedBox(height: 10),
RaisedButton(
color: Colors.blue,
textColor: Colors.white,
ElevatedButton(
style: style,
child: Text('Open multiple images'),
onPressed: () => Navigator.pushNamed(context, '/open/images'),
),
SizedBox(height: 10),
RaisedButton(
color: Colors.blue,
textColor: Colors.white,
ElevatedButton(
style: style,
child: Text('Save a file'),
onPressed: () => Navigator.pushNamed(context, '/save/text'),
),
SizedBox(height: 10),
RaisedButton(
color: Colors.blue,
textColor: Colors.white,
ElevatedButton(
style: style,
child: Text('Open a get directory dialog'),
onPressed: () => Navigator.pushNamed(context, '/directory'),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ class OpenImagePage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
color: Colors.blue,
textColor: Colors.white,
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Colors.blue,
onPrimary: Colors.white,
),
child: Text('Press to open an image file(png, jpg)'),
onPressed: () => _openImageFile(context),
),
Expand Down Expand Up @@ -63,7 +65,7 @@ class ImageDisplay extends StatelessWidget {
// while on other platforms it is a system path.
content: kIsWeb ? Image.network(filePath) : Image.file(File(filePath)),
actions: [
FlatButton(
TextButton(
child: const Text('Close'),
onPressed: () {
Navigator.pop(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ class OpenMultipleImagesPage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
color: Colors.blue,
textColor: Colors.white,
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Colors.blue,
onPrimary: Colors.white,
),
child: Text('Press to open multiple images (png, jpg)'),
onPressed: () => _openImageFile(context),
),
Expand Down Expand Up @@ -74,7 +76,7 @@ class MultipleImagesDisplay extends StatelessWidget {
),
),
actions: [
FlatButton(
TextButton(
child: const Text('Close'),
onPressed: () {
Navigator.pop(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ class OpenTextPage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
color: Colors.blue,
textColor: Colors.white,
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Colors.blue,
onPrimary: Colors.white,
),
child: Text('Press to open a text file (json, txt)'),
onPressed: () => _openTextFile(context),
),
Expand Down Expand Up @@ -62,7 +64,7 @@ class TextDisplay extends StatelessWidget {
),
),
actions: [
FlatButton(
TextButton(
child: const Text('Close'),
onPressed: () => Navigator.pop(context),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ class SaveTextPage extends StatelessWidget {
),
),
SizedBox(height: 10),
RaisedButton(
color: Colors.blue,
textColor: Colors.white,
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Colors.blue,
onPrimary: Colors.white,
),
child: Text('Press to save a text file'),
onPressed: () => _saveFile(),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/file_selector/file_selector/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: file_selector
description: Flutter plugin for opening and saving files.
homepage: https://github.com/flutter/plugins/tree/master/packages/file_selector/file_selector
version: 0.7.0+1
version: 0.7.0+2

dependencies:
flutter:
Expand Down
4 changes: 4 additions & 0 deletions packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.10

* Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets.

## 1.0.9

* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))
Expand Down
Loading