[share] Bump version for NNBD stable (#3600)
diff --git a/packages/share/CHANGELOG.md b/packages/share/CHANGELOG.md
index ba44db4..20afdea 100644
--- a/packages/share/CHANGELOG.md
+++ b/packages/share/CHANGELOG.md
@@ -1,18 +1,9 @@
-## 2.0.0-nullsafety.3
-
-* Update README with the new documentation urls.
-
-## 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))
-
-## 2.0.0-nullsafety
+## 2.0.0
* Migrate to null safety.
+* Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets.
+* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))
+* Update README with the new documentation urls.
## 0.6.5+5
diff --git a/packages/share/example/lib/image_previews.dart b/packages/share/example/lib/image_previews.dart
index 61ecec4..9070749 100644
--- a/packages/share/example/lib/image_previews.dart
+++ b/packages/share/example/lib/image_previews.dart
@@ -9,11 +9,11 @@
final List<String> imagePaths;
/// Callback when an image should be removed
- final Function(int) onDelete;
+ final Function(int)? onDelete;
/// Creates a widget for preview of images. [imagePaths] can not be empty
/// and all contained paths need to be non empty.
- const ImagePreviews(this.imagePaths, {Key key, this.onDelete})
+ const ImagePreviews(this.imagePaths, {Key? key, this.onDelete})
: super(key: key);
@override
@@ -26,7 +26,7 @@
for (int i = 0; i < imagePaths.length; i++) {
imageWidgets.add(_ImagePreview(
imagePaths[i],
- onDelete: onDelete != null ? () => onDelete(i) : null,
+ onDelete: onDelete != null ? () => onDelete!(i) : null,
));
}
@@ -39,9 +39,9 @@
class _ImagePreview extends StatelessWidget {
final String imagePath;
- final VoidCallback onDelete;
+ final VoidCallback? onDelete;
- const _ImagePreview(this.imagePath, {Key key, this.onDelete})
+ const _ImagePreview(this.imagePath, {Key? key, this.onDelete})
: super(key: key);
@override
diff --git a/packages/share/example/lib/main.dart b/packages/share/example/lib/main.dart
index a9ebd6b..8d6a783 100644
--- a/packages/share/example/lib/main.dart
+++ b/packages/share/example/lib/main.dart
@@ -116,7 +116,7 @@
// RenderObject in its descendent tree when it's not
// a RenderObjectWidget. The ElevatedButton's RenderObject
// has its position and size after it's built.
- final RenderBox box = context.findRenderObject();
+ final RenderBox box = context.findRenderObject() as RenderBox;
if (imagePaths.isNotEmpty) {
await Share.shareFiles(imagePaths,
diff --git a/packages/share/example/pubspec.yaml b/packages/share/example/pubspec.yaml
index 372633e..2df76ef 100644
--- a/packages/share/example/pubspec.yaml
+++ b/packages/share/example/pubspec.yaml
@@ -11,18 +11,18 @@
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
- image_picker: ^0.6.7+4
+ image_picker: ^0.7.0
dev_dependencies:
flutter_driver:
sdk: flutter
integration_test:
path: ../../integration_test
- pedantic: ^1.8.0
+ pedantic: ^1.10.0
flutter:
uses-material-design: true
environment:
- sdk: ">=2.0.0-dev.28.0 <3.0.0"
+ sdk: ">=2.12.0-259.9.beta <3.0.0"
flutter: ">=1.9.1+hotfix.2"
diff --git a/packages/share/example/test_driver/test/integration_test.dart b/packages/share/example/test_driver/test/integration_test.dart
index 7a2c213..a8a56aa 100644
--- a/packages/share/example/test_driver/test/integration_test.dart
+++ b/packages/share/example/test_driver/test/integration_test.dart
@@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// @dart = 2.9
+
import 'dart:async';
import 'dart:convert';
import 'dart:io';
diff --git a/packages/share/pubspec.yaml b/packages/share/pubspec.yaml
index 4d2b231..e8a1167 100644
--- a/packages/share/pubspec.yaml
+++ b/packages/share/pubspec.yaml
@@ -2,7 +2,7 @@
description: Flutter plugin for sharing content via the platform share UI, using
the ACTION_SEND intent on Android and UIActivityViewController on iOS.
homepage: https://github.com/flutter/plugins/tree/master/packages/share
-version: 2.0.0-nullsafety.3
+version: 2.0.0
flutter:
plugin:
@@ -14,20 +14,20 @@
pluginClass: FLTSharePlugin
dependencies:
- meta: ^1.3.0-nullsafety.6
- mime: ^1.0.0-nullsafety.0
+ meta: ^1.3.0
+ mime: ^1.0.0
flutter:
sdk: flutter
dev_dependencies:
- test: ^1.16.0-nullsafety.13
- mockito: ^4.1.3
+ test: ^1.16.3
+ mockito: ^5.0.0-nullsafety.7
flutter_test:
sdk: flutter
integration_test:
path: ../integration_test
- pedantic: ^1.10.0-nullsafety.3
+ pedantic: ^1.10.0
environment:
flutter: ">=1.12.13+hotfix.5"
- sdk: ">=2.12.0-0 <3.0.0"
+ sdk: ">=2.12.0-259.9.beta <3.0.0"