Skip to content

Commit

Permalink
deps: Upgrade packages to latest, namely package_info_plus, share_plus
Browse files Browse the repository at this point in the history
This is the result of `tools/upgrade pod-major`, and some small
adjustments for a breaking API change in share_plus.

Changelogs:
  https://pub.dev/packages/package_info_plus/changelog
  https://pub.dev/packages/share_plus/changelog

Tested on my iPhone and on the office Android device. In particular,
I checked that sharing message content via the message action sheet
still worked, and I checked that the "About Zulip" page still shows
the "App version" field correctly.
  • Loading branch information
chrisbobbe authored and gnprice committed Apr 24, 2024
1 parent 92f5dd5 commit 0b3e4cf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/widgets/action_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class ShareButton extends MessageActionSheetMenuItemButton {
// https://pub.dev/packages/share_plus#ipad
// Perhaps a wart in the API; discussion:
// https://github.com/zulip/zulip-flutter/pull/12#discussion_r1130146231
final result = await Share.shareWithResult(rawContent);
final result = await Share.share(rawContent);

switch (result.status) {
// The plugin isn't very helpful: "The status can not be determined".
Expand Down
16 changes: 8 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -752,18 +752,18 @@ packages:
dependency: "direct main"
description:
name: package_info_plus
sha256: cb44f49b6e690fa766f023d5b22cac6b9affe741dd792b6ac7ad4fabe0d7b097
sha256: b93d8b4d624b4ea19b0a5a208b2d6eff06004bc3ce74c06040b120eeadd00ce0
url: "https://pub.dev"
source: hosted
version: "6.0.0"
version: "8.0.0"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
sha256: f49918f3433a3146047372f9d4f1f847511f2acd5cd030e1f44fe5a50036b70e
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.0"
path:
dependency: "direct main"
description:
Expand Down Expand Up @@ -904,18 +904,18 @@ packages:
dependency: "direct main"
description:
name: share_plus
sha256: fb5319f3aab4c5dda5ebb92dca978179ba21f8c783ee4380910ef4c1c6824f51
sha256: ef3489a969683c4f3d0239010cc8b7a2a46543a8d139e111c06c558875083544
url: "https://pub.dev"
source: hosted
version: "8.0.3"
version: "9.0.0"
share_plus_platform_interface:
dependency: "direct main"
description:
name: share_plus_platform_interface
sha256: "251eb156a8b5fa9ce033747d73535bf53911071f8d3b6f4f0b578505ce0d4496"
sha256: "0f9e4418835d1b2c3ae78fdb918251959106cefdbc4dd43526e182f80e82f6d4"
url: "https://pub.dev"
source: hosted
version: "3.4.0"
version: "4.0.0"
shelf:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ dependencies:
image_picker: ^1.0.0
intl: ^0.19.0
json_annotation: ^4.8.1
package_info_plus: ^6.0.0
package_info_plus: ^8.0.0
path: ^1.8.3
path_provider: ^2.0.13
share_plus: ^8.0.2
share_plus_platform_interface: ^3.3.1
share_plus: ^9.0.0
share_plus_platform_interface: ^4.0.0
sqlite3: ^2.4.0
sqlite3_flutter_libs: ^0.5.13
url_launcher: ^6.1.11
Expand Down
2 changes: 1 addition & 1 deletion test/test_share_plus.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MockSharePlus {

Future<Object?> handleMethodCall(MethodCall methodCall) async {
switch (methodCall.method) {
case 'shareWithResult':
case 'share':
// The method channel doesn't preserve Map<String, dynamic> as
// `arguments`'s type; logging runtimeType gives _Map<Object?, Object?>.
final arguments = methodCall.arguments as Map;
Expand Down

0 comments on commit 0b3e4cf

Please sign in to comment.