Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Update obsolete button refs in plugin examples
  • Loading branch information
Hans Muller committed Jan 7, 2021
commit 3ae4233c3108c53d4cb04ee0d293a651e91e8f70
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
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/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
22 changes: 12 additions & 10 deletions packages/camera/camera/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,13 @@ 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: TextButton.styleFrom(
primary: controller?.value?.exposureMode == ExposureMode.auto
? Colors.orange
: Colors.blue,
),
onPressed: controller != null
? () =>
onSetExposureModeButtonPressed(ExposureMode.auto)
Expand All @@ -342,12 +343,13 @@ 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: TextButton.styleFrom(
primary: controller?.value?.exposureMode == ExposureMode.auto
? Colors.orange
: Colors.blue,
),
onPressed: controller != null
? () =>
onSetExposureModeButtonPressed(ExposureMode.locked)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GetDirectoryPage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
ElevatedButton(
color: Colors.blue,
textColor: Colors.white,
child: Text('Press to ask user to choose a directory'),
Expand Down Expand Up @@ -55,7 +55,7 @@ class TextDisplay extends StatelessWidget {
),
),
actions: [
FlatButton(
TextButton(
child: const Text('Close'),
onPressed: () => Navigator.pop(context),
),
Expand Down
10 changes: 5 additions & 5 deletions packages/file_selector/file_selector/example/lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,35 @@ class HomePage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
ElevatedButton(
color: Colors.blue,
textColor: Colors.white,
child: Text('Open a text file'),
onPressed: () => Navigator.pushNamed(context, '/open/text'),
),
SizedBox(height: 10),
RaisedButton(
ElevatedButton(
color: Colors.blue,
textColor: Colors.white,
child: Text('Open an image'),
onPressed: () => Navigator.pushNamed(context, '/open/image'),
),
SizedBox(height: 10),
RaisedButton(
ElevatedButton(
color: Colors.blue,
textColor: Colors.white,
child: Text('Open multiple images'),
onPressed: () => Navigator.pushNamed(context, '/open/images'),
),
SizedBox(height: 10),
RaisedButton(
ElevatedButton(
color: Colors.blue,
textColor: Colors.white,
child: Text('Save a file'),
onPressed: () => Navigator.pushNamed(context, '/save/text'),
),
SizedBox(height: 10),
RaisedButton(
ElevatedButton(
color: Colors.blue,
textColor: Colors.white,
child: Text('Open a get directory dialog'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class OpenImagePage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
ElevatedButton(
color: Colors.blue,
textColor: Colors.white,
child: Text('Press to open an image file(png, jpg)'),
Expand Down Expand Up @@ -63,7 +63,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,7 +34,7 @@ class OpenMultipleImagesPage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
ElevatedButton(
color: Colors.blue,
textColor: Colors.white,
child: Text('Press to open multiple images (png, jpg)'),
Expand Down Expand Up @@ -74,7 +74,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,7 +28,7 @@ class OpenTextPage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
ElevatedButton(
color: Colors.blue,
textColor: Colors.white,
child: Text('Press to open a text file (json, txt)'),
Expand Down Expand Up @@ -62,7 +62,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,7 +51,7 @@ class SaveTextPage extends StatelessWidget {
),
),
SizedBox(height: 10),
RaisedButton(
ElevatedButton(
color: Colors.blue,
textColor: Colors.white,
child: Text('Press to save a text file'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class AnimateCameraState extends State<AnimateCamera> {
children: <Widget>[
Column(
children: <Widget>[
FlatButton(
TextButton(
onPressed: () {
mapController.animateCamera(
CameraUpdate.newCameraPosition(
Expand All @@ -69,7 +69,7 @@ class AnimateCameraState extends State<AnimateCamera> {
},
child: const Text('newCameraPosition'),
),
FlatButton(
TextButton(
onPressed: () {
mapController.animateCamera(
CameraUpdate.newLatLng(
Expand All @@ -79,7 +79,7 @@ class AnimateCameraState extends State<AnimateCamera> {
},
child: const Text('newLatLng'),
),
FlatButton(
TextButton(
onPressed: () {
mapController.animateCamera(
CameraUpdate.newLatLngBounds(
Expand All @@ -93,7 +93,7 @@ class AnimateCameraState extends State<AnimateCamera> {
},
child: const Text('newLatLngBounds'),
),
FlatButton(
TextButton(
onPressed: () {
mapController.animateCamera(
CameraUpdate.newLatLngZoom(
Expand All @@ -104,7 +104,7 @@ class AnimateCameraState extends State<AnimateCamera> {
},
child: const Text('newLatLngZoom'),
),
FlatButton(
TextButton(
onPressed: () {
mapController.animateCamera(
CameraUpdate.scrollBy(150.0, -225.0),
Expand All @@ -116,7 +116,7 @@ class AnimateCameraState extends State<AnimateCamera> {
),
Column(
children: <Widget>[
FlatButton(
TextButton(
onPressed: () {
mapController.animateCamera(
CameraUpdate.zoomBy(
Expand All @@ -127,31 +127,31 @@ class AnimateCameraState extends State<AnimateCamera> {
},
child: const Text('zoomBy with focus'),
),
FlatButton(
TextButton(
onPressed: () {
mapController.animateCamera(
CameraUpdate.zoomBy(-0.5),
);
},
child: const Text('zoomBy'),
),
FlatButton(
TextButton(
onPressed: () {
mapController.animateCamera(
CameraUpdate.zoomIn(),
);
},
child: const Text('zoomIn'),
),
FlatButton(
TextButton(
onPressed: () {
mapController.animateCamera(
CameraUpdate.zoomOut(),
);
},
child: const Text('zoomOut'),
),
FlatButton(
TextButton(
onPressed: () {
mapController.animateCamera(
CameraUpdate.zoomTo(16.0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class _MapCoordinatesBodyState extends State<_MapCoordinatesBody> {
Widget _getVisibleRegionButton() {
return Padding(
padding: const EdgeInsets.all(8.0),
child: RaisedButton(
child: ElevatedButton(
child: const Text('Get Visible Region Bounds'),
onPressed: () async {
final LatLngBounds visibleRegion =
Expand Down
Loading