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

Commit 0ea8ef8

Browse files
[share] Bump version for NNBD stable (#3600)
1 parent 61a736f commit 0ea8ef8

File tree

6 files changed

+21
-28
lines changed

6 files changed

+21
-28
lines changed

packages/share/CHANGELOG.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
## 2.0.0-nullsafety.3
2-
3-
* Update README with the new documentation urls.
4-
5-
## 2.0.0-nullsafety.2
1+
## 2.0.0
62

3+
* Migrate to null safety.
74
* Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets.
8-
9-
## 2.0.0-nullsafety.1
10-
115
* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))
12-
13-
## 2.0.0-nullsafety
14-
15-
* Migrate to null safety.
6+
* Update README with the new documentation urls.
167

178
## 0.6.5+5
189

packages/share/example/lib/image_previews.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ class ImagePreviews extends StatelessWidget {
99
final List<String> imagePaths;
1010

1111
/// Callback when an image should be removed
12-
final Function(int) onDelete;
12+
final Function(int)? onDelete;
1313

1414
/// Creates a widget for preview of images. [imagePaths] can not be empty
1515
/// and all contained paths need to be non empty.
16-
const ImagePreviews(this.imagePaths, {Key key, this.onDelete})
16+
const ImagePreviews(this.imagePaths, {Key? key, this.onDelete})
1717
: super(key: key);
1818

1919
@override
@@ -26,7 +26,7 @@ class ImagePreviews extends StatelessWidget {
2626
for (int i = 0; i < imagePaths.length; i++) {
2727
imageWidgets.add(_ImagePreview(
2828
imagePaths[i],
29-
onDelete: onDelete != null ? () => onDelete(i) : null,
29+
onDelete: onDelete != null ? () => onDelete!(i) : null,
3030
));
3131
}
3232

@@ -39,9 +39,9 @@ class ImagePreviews extends StatelessWidget {
3939

4040
class _ImagePreview extends StatelessWidget {
4141
final String imagePath;
42-
final VoidCallback onDelete;
42+
final VoidCallback? onDelete;
4343

44-
const _ImagePreview(this.imagePath, {Key key, this.onDelete})
44+
const _ImagePreview(this.imagePath, {Key? key, this.onDelete})
4545
: super(key: key);
4646

4747
@override

packages/share/example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class DemoAppState extends State<DemoApp> {
116116
// RenderObject in its descendent tree when it's not
117117
// a RenderObjectWidget. The ElevatedButton's RenderObject
118118
// has its position and size after it's built.
119-
final RenderBox box = context.findRenderObject();
119+
final RenderBox box = context.findRenderObject() as RenderBox;
120120

121121
if (imagePaths.isNotEmpty) {
122122
await Share.shareFiles(imagePaths,

packages/share/example/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ dependencies:
1111
# The example app is bundled with the plugin so we use a path dependency on
1212
# the parent directory to use the current plugin's version.
1313
path: ../
14-
image_picker: ^0.6.7+4
14+
image_picker: ^0.7.0
1515

1616
dev_dependencies:
1717
flutter_driver:
1818
sdk: flutter
1919
integration_test:
2020
path: ../../integration_test
21-
pedantic: ^1.8.0
21+
pedantic: ^1.10.0
2222

2323
flutter:
2424
uses-material-design: true
2525

2626
environment:
27-
sdk: ">=2.0.0-dev.28.0 <3.0.0"
27+
sdk: ">=2.12.0-259.9.beta <3.0.0"
2828
flutter: ">=1.9.1+hotfix.2"

packages/share/example/test_driver/test/integration_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// @dart = 2.9
6+
57
import 'dart:async';
68
import 'dart:convert';
79
import 'dart:io';

packages/share/pubspec.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: share
22
description: Flutter plugin for sharing content via the platform share UI, using
33
the ACTION_SEND intent on Android and UIActivityViewController on iOS.
44
homepage: https://github.com/flutter/plugins/tree/master/packages/share
5-
version: 2.0.0-nullsafety.3
5+
version: 2.0.0
66

77
flutter:
88
plugin:
@@ -14,20 +14,20 @@ flutter:
1414
pluginClass: FLTSharePlugin
1515

1616
dependencies:
17-
meta: ^1.3.0-nullsafety.6
18-
mime: ^1.0.0-nullsafety.0
17+
meta: ^1.3.0
18+
mime: ^1.0.0
1919
flutter:
2020
sdk: flutter
2121

2222
dev_dependencies:
23-
test: ^1.16.0-nullsafety.13
24-
mockito: ^4.1.3
23+
test: ^1.16.3
24+
mockito: ^5.0.0-nullsafety.7
2525
flutter_test:
2626
sdk: flutter
2727
integration_test:
2828
path: ../integration_test
29-
pedantic: ^1.10.0-nullsafety.3
29+
pedantic: ^1.10.0
3030

3131
environment:
3232
flutter: ">=1.12.13+hotfix.5"
33-
sdk: ">=2.12.0-0 <3.0.0"
33+
sdk: ">=2.12.0-259.9.beta <3.0.0"

0 commit comments

Comments
 (0)