Skip to content

Commit 0e3eb91

Browse files
feat(share_plus)!: Bump win32 from 5.15.0 to 6.0.0 (#3762)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Volodymyr <v.buberenko@gmail.com>
1 parent 582b93f commit 0e3eb91

16 files changed

Lines changed: 226 additions & 230 deletions

packages/share_plus/share_plus/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ Sharing files is not supported on Linux.
2626

2727
## Requirements
2828

29-
- Flutter >=3.22.0
30-
- Dart >=3.4.0 <4.0.0
31-
- iOS >=12.0
32-
- macOS >=10.14
29+
- Flutter >=3.41.0
30+
- Dart >=3.11.0 <4.0.0
31+
- iOS >=13.0
32+
- macOS >=10.15
3333
- Java 17
3434
- Kotlin 2.2.0
3535
- Android Gradle Plugin >=8.12.1

packages/share_plus/share_plus/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,5 @@
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
23-
<key>MinimumOSVersion</key>
24-
<string>13.0</string>
2523
</dict>
2624
</plist>
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
import UIKit
21
import Flutter
2+
import UIKit
33

44
@main
5-
@objc class AppDelegate: FlutterAppDelegate {
5+
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
66
override func application(
77
_ application: UIApplication,
88
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
99
) -> Bool {
10-
GeneratedPluginRegistrant.register(with: self)
1110
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
1211
}
12+
13+
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
14+
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
15+
}
1316
}

packages/share_plus/share_plus/example/ios/Runner/Info.plist

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,29 @@
2626
<string>$(FLUTTER_BUILD_NUMBER)</string>
2727
<key>LSRequiresIPhoneOS</key>
2828
<true/>
29+
<key>NSPhotoLibraryUsageDescription</key>
30+
<string>Load photos for sharing functionality</string>
31+
<key>UIApplicationSceneManifest</key>
32+
<dict>
33+
<key>UIApplicationSupportsMultipleScenes</key>
34+
<false/>
35+
<key>UISceneConfigurations</key>
36+
<dict>
37+
<key>UIWindowSceneSessionRoleApplication</key>
38+
<array>
39+
<dict>
40+
<key>UISceneClassName</key>
41+
<string>UIWindowScene</string>
42+
<key>UISceneConfigurationName</key>
43+
<string>flutter</string>
44+
<key>UISceneDelegateClassName</key>
45+
<string>FlutterSceneDelegate</string>
46+
<key>UISceneStoryboardFile</key>
47+
<string>Main</string>
48+
</dict>
49+
</array>
50+
</dict>
51+
</dict>
2952
<key>UIApplicationSupportsIndirectInputEvents</key>
3053
<true/>
3154
<key>UILaunchStoryboardName</key>
@@ -45,8 +68,6 @@
4568
<string>UIInterfaceOrientationLandscapeLeft</string>
4669
<string>UIInterfaceOrientationLandscapeRight</string>
4770
</array>
48-
<key>NSPhotoLibraryUsageDescription</key>
49-
<string>Load photos for sharing functionality</string>
5071
<key>UIViewControllerBasedStatusBarAppearance</key>
5172
<false/>
5273
</dict>

packages/share_plus/share_plus/example/lib/main.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ class MyHomePageState extends State<MyHomePage> {
165165
},
166166
icon: const Icon(Icons.add),
167167
),
168-
if (Platform.isIOS || Platform.isMacOS) const SizedBox(height: 16),
169-
if (Platform.isIOS || Platform.isMacOS)
168+
if (!kIsWeb && (Platform.isIOS || Platform.isMacOS))
169+
const SizedBox(height: 16),
170+
if (!kIsWeb && (Platform.isIOS || Platform.isMacOS))
170171
ElevatedButton(
171172
onPressed: _onSelectExcludedActivityType,
172173
child: const Text('Add Excluded Activity Type'),

packages/share_plus/share_plus/lib/src/share_plus_linux.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ class SharePlusLinuxPlugin extends SharePlatform {
3232
final uri = Uri(
3333
scheme: 'mailto',
3434
query: queryParameters.entries
35-
.map((e) =>
36-
'${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value ?? '')}')
35+
.map(
36+
(e) =>
37+
'${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value ?? '')}',
38+
)
3739
.join('&'),
3840
);
3941

packages/share_plus/share_plus/lib/src/share_plus_web.dart

Lines changed: 15 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ class SharePlusWebPlugin extends SharePlatform {
3737
try {
3838
canShare = _navigator.canShare(data);
3939
} on NoSuchMethodError catch (e) {
40-
developer.log(
41-
'Share API is not supported in this User Agent.',
42-
error: e,
43-
);
40+
developer.log('Share API is not supported in this User Agent.', error: e);
4441

4542
return _fallback(params, 'Navigator.canShare() is unavailable');
4643
}
@@ -56,10 +53,7 @@ class SharePlusWebPlugin extends SharePlatform {
5653
return _resultDismissed;
5754
}
5855

59-
developer.log(
60-
'Failed to share uri',
61-
error: '${e.name}: ${e.message}',
62-
);
56+
developer.log('Failed to share uri', error: '${e.name}: ${e.message}');
6357

6458
return _fallback(params, 'Navigator.share() failed: ${e.message}');
6559
}
@@ -98,38 +92,19 @@ class SharePlusWebPlugin extends SharePlatform {
9892
}
9993

10094
if (uri != null) {
101-
data = ShareData(
102-
url: uri,
103-
);
95+
data = ShareData(url: uri);
10496
} else if (webFiles.isNotEmpty && text != null && title != null) {
105-
data = ShareData(
106-
text: text,
107-
title: title,
108-
files: webFiles.toJS,
109-
);
97+
data = ShareData(text: text, title: title, files: webFiles.toJS);
11098
} else if (webFiles.isNotEmpty && text != null) {
111-
data = ShareData(
112-
text: text,
113-
files: webFiles.toJS,
114-
);
99+
data = ShareData(text: text, files: webFiles.toJS);
115100
} else if (webFiles.isNotEmpty && title != null) {
116-
data = ShareData(
117-
title: title,
118-
files: webFiles.toJS,
119-
);
101+
data = ShareData(title: title, files: webFiles.toJS);
120102
} else if (webFiles.isNotEmpty) {
121-
data = ShareData(
122-
files: webFiles.toJS,
123-
);
103+
data = ShareData(files: webFiles.toJS);
124104
} else if (text != null && title != null) {
125-
data = ShareData(
126-
text: text,
127-
title: title,
128-
);
105+
data = ShareData(text: text, title: title);
129106
} else {
130-
data = ShareData(
131-
text: text!,
132-
);
107+
data = ShareData(text: text!);
133108
}
134109

135110
return data;
@@ -161,17 +136,16 @@ class SharePlusWebPlugin extends SharePlatform {
161136
throw Exception(error);
162137
}
163138

164-
final queryParameters = {
165-
if (subject != null) 'subject': subject,
166-
'body': text,
167-
};
139+
final queryParameters = {'subject': ?subject, 'body': text};
168140

169141
// see https://github.com/dart-lang/sdk/issues/43838#issuecomment-823551891
170142
final uri = Uri(
171143
scheme: 'mailto',
172144
query: queryParameters.entries
173-
.map((e) =>
174-
'${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value)}')
145+
.map(
146+
(e) =>
147+
'${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value)}',
148+
)
175149
.join('&'),
176150
);
177151

@@ -227,7 +201,4 @@ class SharePlusWebPlugin extends SharePlatform {
227201
}
228202
}
229203

230-
const _resultDismissed = ShareResult(
231-
'',
232-
ShareResultStatus.dismissed,
233-
);
204+
const _resultDismissed = ShareResult('', ShareResultStatus.dismissed);

packages/share_plus/share_plus/lib/src/share_plus_windows.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ class SharePlusWindowsPlugin extends SharePlatform {
3939
final uri = Uri(
4040
scheme: 'mailto',
4141
query: queryParameters.entries
42-
.map((e) =>
43-
'${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value ?? '')}')
42+
.map(
43+
(e) =>
44+
'${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value ?? '')}',
45+
)
4446
.join('&'),
4547
);
4648

packages/share_plus/share_plus/lib/src/windows_version_helper.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ class VersionHelper {
2929
..wServicePackMajor = 0
3030
..wServicePackMinor = 0
3131
..wSuiteMask = 0
32-
..wProductType = 0
33-
..wReserved = 0;
34-
final rtlGetVersion = DynamicLibrary.open('ntdll.dll').lookupFunction<
35-
Void Function(Pointer<OSVERSIONINFOEX>),
36-
void Function(Pointer<OSVERSIONINFOEX>)>('RtlGetVersion');
32+
..wProductType = 0;
33+
final rtlGetVersion = DynamicLibrary.open('ntdll.dll')
34+
.lookupFunction<
35+
Void Function(Pointer<OSVERSIONINFOEX>),
36+
void Function(Pointer<OSVERSIONINFOEX>)
37+
>('RtlGetVersion');
3738
rtlGetVersion(pointer);
3839
isWindows10RS5OrGreater =
3940
pointer.ref.dwBuildNumber >= kWindows10RS5BuildNumber;

packages/share_plus/share_plus/pubspec.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,29 @@ flutter:
2828
pluginClass: SharePlusWindowsPluginCApi
2929

3030
dependencies:
31-
cross_file: ^0.3.4+2
32-
meta: ^1.8.0
33-
mime: ">=1.0.4 <3.0.0"
31+
cross_file: ^0.3.5+2
32+
meta: ^1.17.0
33+
mime: ^2.0.0
3434
flutter:
3535
sdk: flutter
3636
flutter_web_plugins:
3737
sdk: flutter
3838
share_plus_platform_interface: ^6.1.0
39-
file: ">=6.1.4 <8.0.0"
40-
url_launcher_web: ^2.3.2
41-
url_launcher_windows: ^3.1.2
42-
url_launcher_linux: ^3.1.1
39+
file: ^7.0.1
40+
url_launcher_web: ^2.4.2
41+
url_launcher_windows: ^3.1.5
42+
url_launcher_linux: ^3.2.2
4343
url_launcher_platform_interface: ^2.3.2
44-
ffi: ^2.1.2
45-
web: ^1.0.0
46-
win32: ^5.5.3
44+
ffi: ^2.2.0
45+
web: ^1.1.1
46+
win32: ^6.0.0
4747

4848
dev_dependencies:
4949
flutter_test:
5050
sdk: flutter
51-
flutter_lints: ">=4.0.0 <6.0.0"
51+
flutter_lints: ^6.0.0
5252

5353
environment:
54-
sdk: ">=3.4.0 <4.0.0"
55-
flutter: ">=3.22.0"
54+
sdk: ">=3.11.0 <4.0.0"
55+
flutter: ">=3.41.0"
5656

0 commit comments

Comments
 (0)