Skip to content

Commit b56876f

Browse files
author
DependencyBot
committed
Merge branch 'main' into improvement/share_plus
# Conflicts: # packages/share_plus/share_plus/CHANGELOG.md # packages/share_plus/share_plus/pubspec.yaml
2 parents 758f52a + a0bc1a2 commit b56876f

File tree

10 files changed

+48
-30
lines changed

10 files changed

+48
-30
lines changed

.github/workflows/all_plugins.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
find . -maxdepth 12 -name "*.java" -print0 \| xargs -0 java -jar $HOME/google-java-format.jar --replace
111111
./.github/workflows/scripts/validate-formatting.sh
112112
113-
test_and_coverage:
113+
test:
114114
runs-on: ubuntu-latest
115115
timeout-minutes: 40
116116
steps:
@@ -133,12 +133,3 @@ jobs:
133133
- name: "Flutter Test - Web"
134134
run: melos run test:web --no-select
135135

136-
- name: "Collect Coverage"
137-
run: melos run coverage
138-
139-
- name: Upload Coverage
140-
uses: codecov/codecov-action@v1
141-
with:
142-
token: ${{secrets.CODECOV_TOKEN}}
143-
files: packages/*/coverage/lcov.info
144-

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
<a href="https://github.com/fluttercommunity/plus_plugins/actions?query=workflow%3Aall_plugins">
1111
<img src="https://github.com/fluttercommunity/plus_plugins/workflows/all_plugins/badge.svg" alt="all_plugins GitHub Workflow Status"/>
1212
</a>
13-
<a href="https://codecov.io/gh/flutter_community/plus_plugins/">
14-
<img src="https://codecov.io/gh/fluttercommunity/plus_plugins/graph/badge.svg" alt="all_plugins Coverage"/>
15-
</a>
1613
<a href="https://twitter.com/FlutterComm">
1714
<img src="https://img.shields.io/twitter/follow/FlutterComm.svg?colorA=1da1f2&colorB=&label=Follow%20on%20Twitter" alt="Follow on Twitter">
1815
</a>

packages/android_intent_plus/example/integration_test/android_intent_plus_test.dart

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void main() {
3939
}
4040
});
4141

42-
testWidgets('#launch throws when no Activity is found',
42+
testWidgets('Launch throws when no Activity is found',
4343
(WidgetTester tester) async {
4444
// We can't test that any of this is really working, this is mostly just
4545
// checking that the plugin API is registered. Only works on Android.
@@ -50,7 +50,21 @@ void main() {
5050
}));
5151
}, skip: !Platform.isAndroid);
5252

53-
testWidgets('#launchChooser should not throw', (WidgetTester tester) async {
53+
testWidgets('Set an alarm on weekdays at 9:30pm should not throw',
54+
(WidgetTester tester) async {
55+
const intent = AndroidIntent(
56+
action: 'android.intent.action.SET_ALARM',
57+
arguments: <String, dynamic>{
58+
'android.intent.extra.alarm.DAYS': <int>[2, 3, 4, 5, 6],
59+
'android.intent.extra.alarm.HOUR': 21,
60+
'android.intent.extra.alarm.MINUTES': 30,
61+
'android.intent.extra.alarm.SKIP_UI': true,
62+
'android.intent.extra.alarm.MESSAGE': 'Just for Integration test',
63+
});
64+
await intent.launch();
65+
}, skip: !Platform.isAndroid);
66+
67+
testWidgets('LaunchChooser should not throw', (WidgetTester tester) async {
5468
const intent = AndroidIntent(
5569
action: 'android.intent.action.SEND',
5670
type: 'plain/text',
@@ -59,14 +73,14 @@ void main() {
5973
await intent.launchChooser('title');
6074
}, skip: !Platform.isAndroid);
6175

62-
testWidgets('#sendBroadcast should not throw', (WidgetTester tester) async {
76+
testWidgets('SendBroadcast should not throw', (WidgetTester tester) async {
6377
const intent = AndroidIntent(
6478
action: 'com.example.broadcast',
6579
);
6680
await intent.sendBroadcast();
6781
}, skip: !Platform.isAndroid);
6882

69-
testWidgets('#canResolveActivity returns true when example Activity is found',
83+
testWidgets('CanResolveActivity returns true when example Activity is found',
7084
(WidgetTester tester) async {
7185
const intent = AndroidIntent(
7286
action: 'action_view',
@@ -76,7 +90,7 @@ void main() {
7690
await expectLater(await intent.canResolveActivity(), isTrue);
7791
}, skip: !Platform.isAndroid);
7892

79-
testWidgets('#canResolveActivity returns false when no Activity is found',
93+
testWidgets('CanResolveActivity returns false when no Activity is found',
8094
(WidgetTester tester) async {
8195
const intent = AndroidIntent(action: 'LAUNCH', package: 'foobar');
8296
await expectLater(await intent.canResolveActivity(), isFalse);

packages/device_info_plus/device_info_plus_windows/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.1.0
2+
3+
- Allow win32 3.x to be used.
4+
15
## 4.0.0
26

37
- platform interface to 3.0.0

packages/device_info_plus/device_info_plus_windows/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: device_info_plus_windows
22
description: Windows implementation of the device_info_plus plugin
3-
version: 4.0.0
3+
version: 4.1.0
44
homepage: https://plus.fluttercommunity.dev/
55
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
66

@@ -13,7 +13,7 @@ dependencies:
1313
ffi: ^2.0.1
1414
flutter:
1515
sdk: flutter
16-
win32: ^2.7.0
16+
win32: ">=2.7.0 <4.0.0"
1717

1818
dev_dependencies:
1919
flutter_test:

packages/package_info_plus/package_info_plus_windows/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.1.0
2+
3+
- Allow win32 3.x to be used.
4+
15
## 2.0.0
26

37
- **Breaking change**. Bump minimum dart version to 2.17.0.

packages/package_info_plus/package_info_plus_windows/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: package_info_plus_windows
22
description: Windows implementation of the package_info_plus plugin
3-
version: 2.0.0
3+
version: 2.1.0
44
homepage: https://plus.fluttercommunity.dev/
55
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
66

@@ -13,7 +13,7 @@ dependencies:
1313
ffi: ^2.0.1
1414
flutter:
1515
sdk: flutter
16-
win32: ^2.7.0
16+
win32: ">=2.7.0 <4.0.0"
1717

1818
dev_dependencies:
1919
flutter_test:

packages/share_plus/share_plus/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
## 4.2.0
22

33
- iOS: Throw PlatformException when iPad share dialog not appearing (sharePositionOrigin not in sourceView)
4+
## 4.1.0
5+
6+
- iOS: Fix text sharing.
7+
- Previously, the text was being encoded as a URL, this caused the share sheet to appear empty.
8+
- Now the shared text is not encoded as a URL anymore but rather shared as plain text.
9+
- Sharing text + subject + attachments should work on apps that support that (e.g. Mail app).
10+
- Example: Sharing Text + Image on Telegram is possible and both are shared.
11+
- Some apps still have limitations with sharing. For example, Gmail app does not support the subject field.
12+
- Related issue: #730
413

514
## 4.0.10+1
615

packages/share_plus/share_plus/example/integration_test/share_plus_test.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ void main() {
1414
testWidgets('Can launch share', (WidgetTester tester) async {
1515
expect(Share.share('message', subject: 'title'), completes);
1616
});
17+
18+
testWidgets('Can launch shareWithResult', (WidgetTester tester) async {
19+
expect(Share.shareWithResult('message', subject: 'title'), isNotNull);
20+
});
1721
}

packages/share_plus/share_plus/ios/Classes/FLTSharePlusPlugin.m

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,8 @@ + (void)shareText:(NSString *)shareText
364364
withController:(UIViewController *)controller
365365
atSource:(CGRect)origin
366366
toResult:(FlutterResult)result {
367-
NSObject *data = [[NSURL alloc] initWithString:shareText];
368-
if (data == nil) {
369-
data = [[SharePlusData alloc] initWithSubject:subject text:shareText];
370-
}
367+
NSObject *data = [[SharePlusData alloc] initWithSubject:subject
368+
text:shareText];
371369
[self share:@[ data ]
372370
withSubject:subject
373371
withController:controller
@@ -392,10 +390,7 @@ + (void)shareFiles:(NSArray *)paths
392390
subject:subject]];
393391
}
394392
if (text != nil) {
395-
NSObject *data = [[NSURL alloc] initWithString:text];
396-
if (data == nil) {
397-
data = [[SharePlusData alloc] initWithSubject:subject text:text];
398-
}
393+
NSObject *data = [[SharePlusData alloc] initWithSubject:subject text:text];
399394
[items addObject:data];
400395
}
401396

0 commit comments

Comments
 (0)