Skip to content

Commit 43ec3ef

Browse files
Chris YangEgor
authored andcommitted
Fix deprecation warning in ci failure (flutter#3174)
1 parent 6183e30 commit 43ec3ef

6 files changed

Lines changed: 19 additions & 2 deletions

File tree

packages/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.8+10
2+
3+
* Suppress the `deprecated_member_use` warning in the example app for `ScaffoldMessenger.showSnackBar`.
4+
15
## 0.5.8+9
26

37
* Update android compileSdkVersion to 29.

packages/camera/example/lib/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
272272
String timestamp() => DateTime.now().millisecondsSinceEpoch.toString();
273273

274274
void showInSnackBar(String message) {
275+
// ignore: deprecated_member_use
275276
_scaffoldKey.currentState.showSnackBar(SnackBar(content: Text(message)));
276277
}
277278

packages/camera/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera
22
description: A Flutter plugin for getting information about and controlling the
33
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
44
and streaming image buffers to dart.
5-
version: 0.5.8+9
5+
version: 0.5.8+10
66

77
homepage: https://github.com/flutter/plugins/tree/master/packages/camera
88

packages/webview_flutter/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.4
2+
3+
* Suppress the `deprecated_member_use` warning in the example app for `ScaffoldMessenger.showSnackBar`.
4+
15
## 1.0.3
26

37
* Update android compileSdkVersion to 29.

packages/webview_flutter/example/lib/main.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class _WebViewExampleState extends State<WebViewExample> {
9292
return JavascriptChannel(
9393
name: 'Toaster',
9494
onMessageReceived: (JavascriptMessage message) {
95+
// ignore: deprecated_member_use
9596
Scaffold.of(context).showSnackBar(
9697
SnackBar(content: Text(message.message)),
9798
);
@@ -107,6 +108,7 @@ class _WebViewExampleState extends State<WebViewExample> {
107108
return FloatingActionButton(
108109
onPressed: () async {
109110
final String url = await controller.data.currentUrl();
111+
// ignore: deprecated_member_use
110112
Scaffold.of(context).showSnackBar(
111113
SnackBar(content: Text('Favorited $url')),
112114
);
@@ -215,6 +217,7 @@ class SampleMenu extends StatelessWidget {
215217
WebViewController controller, BuildContext context) async {
216218
final String cookies =
217219
await controller.evaluateJavascript('document.cookie');
220+
// ignore: deprecated_member_use
218221
Scaffold.of(context).showSnackBar(SnackBar(
219222
content: Column(
220223
mainAxisAlignment: MainAxisAlignment.end,
@@ -230,6 +233,7 @@ class SampleMenu extends StatelessWidget {
230233
void _onAddToCache(WebViewController controller, BuildContext context) async {
231234
await controller.evaluateJavascript(
232235
'caches.open("test_caches_entry"); localStorage["test_localStorage"] = "dummy_entry";');
236+
// ignore: deprecated_member_use
233237
Scaffold.of(context).showSnackBar(const SnackBar(
234238
content: Text('Added a test entry to cache.'),
235239
));
@@ -243,6 +247,7 @@ class SampleMenu extends StatelessWidget {
243247

244248
void _onClearCache(WebViewController controller, BuildContext context) async {
245249
await controller.clearCache();
250+
// ignore: deprecated_member_use
246251
Scaffold.of(context).showSnackBar(const SnackBar(
247252
content: Text("Cache cleared."),
248253
));
@@ -254,6 +259,7 @@ class SampleMenu extends StatelessWidget {
254259
if (!hadCookies) {
255260
message = 'There are no cookies.';
256261
}
262+
// ignore: deprecated_member_use
257263
Scaffold.of(context).showSnackBar(SnackBar(
258264
content: Text(message),
259265
));
@@ -306,6 +312,7 @@ class NavigationControls extends StatelessWidget {
306312
if (await controller.canGoBack()) {
307313
await controller.goBack();
308314
} else {
315+
// ignore: deprecated_member_use
309316
Scaffold.of(context).showSnackBar(
310317
const SnackBar(content: Text("No back history item")),
311318
);
@@ -321,6 +328,7 @@ class NavigationControls extends StatelessWidget {
321328
if (await controller.canGoForward()) {
322329
await controller.goForward();
323330
} else {
331+
// ignore: deprecated_member_use
324332
Scaffold.of(context).showSnackBar(
325333
const SnackBar(
326334
content: Text("No forward history item")),

packages/webview_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: webview_flutter
22
description: A Flutter plugin that provides a WebView widget on Android and iOS.
3-
version: 1.0.3
3+
version: 1.0.4
44
homepage: https://github.com/flutter/plugins/tree/master/packages/webview_flutter
55

66
environment:

0 commit comments

Comments
 (0)