Skip to content

Commit

Permalink
[share] Bump version for NNBD stable (flutter#3600)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmorgan authored Feb 22, 2021
1 parent 61a736f commit 0ea8ef8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 28 deletions.
15 changes: 3 additions & 12 deletions packages/share/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
## 2.0.0-nullsafety.3

* Update README with the new documentation urls.

## 2.0.0-nullsafety.2
## 2.0.0

* Migrate to null safety.
* 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

* Migrate to null safety.
* Update README with the new documentation urls.

## 0.6.5+5

Expand Down
10 changes: 5 additions & 5 deletions packages/share/example/lib/image_previews.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class ImagePreviews extends StatelessWidget {
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
Expand All @@ -26,7 +26,7 @@ class ImagePreviews extends StatelessWidget {
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,
));
}

Expand All @@ -39,9 +39,9 @@ class ImagePreviews extends StatelessWidget {

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
Expand Down
2 changes: 1 addition & 1 deletion packages/share/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class DemoAppState extends State<DemoApp> {
// 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,
Expand Down
6 changes: 3 additions & 3 deletions packages/share/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ dependencies:
# 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"
2 changes: 2 additions & 0 deletions packages/share/example/test_driver/test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
14 changes: 7 additions & 7 deletions packages/share/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: share
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:
Expand All @@ -14,20 +14,20 @@ flutter:
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"

0 comments on commit 0ea8ef8

Please sign in to comment.