Skip to content

Commit 551c77f

Browse files
Merge branch 'v6.2.0-beta.3'
2 parents 0aaf7a0 + 02ad560 commit 551c77f

File tree

341 files changed

+34483
-6137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

341 files changed

+34483
-6137
lines changed

.github/copilot-instructions.md

Lines changed: 187 additions & 0 deletions
Large diffs are not rendered by default.

dev_packages/flutter_inappwebview_internal_annotations/lib/flutter_inappwebview_internal_annotations.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ export 'src/exchangeable_object_method.dart';
77
export 'src/exchangeable_enum.dart';
88
export 'src/exchangeable_enum_custom_value.dart';
99
export 'src/supported_platforms.dart';
10-
export 'src/enum_supported_platforms.dart';
10+
export 'src/enum_supported_platforms.dart';
11+
export 'src/constants.dart';
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const kPlatformNameAndroid = "Android WebView";
2+
const kPlatformNameIOS = "iOS WKWebView";
3+
const kPlatformNameMacOS = "macOS WKWebView";
4+
const kPlatformNameWindows = "Windows WebView2";
5+
const kPlatformNameLinux = "Linux WebKitGTK";
6+
const kPlatformNameWeb = "Web \\<iframe\\>";
7+
const kPlatformNameValues = [
8+
kPlatformNameAndroid,
9+
kPlatformNameIOS,
10+
kPlatformNameMacOS,
11+
kPlatformNameWindows,
12+
kPlatformNameLinux,
13+
kPlatformNameWeb,
14+
];
15+
16+
const kTargetPlatformNameAndroid = "android";
17+
const kTargetPlatformNameIOS = "iOS";
18+
const kTargetPlatformNameMacOS = "macOS";
19+
const kTargetPlatformNameWindows = "windows";
20+
const kTargetPlatformNameLinux = "linux";
21+
const kTargetPlatformNameWeb = "web";
22+
const kTargetPlatformNameValues = [
23+
kTargetPlatformNameAndroid,
24+
kTargetPlatformNameIOS,
25+
kTargetPlatformNameMacOS,
26+
kTargetPlatformNameWindows,
27+
kTargetPlatformNameLinux,
28+
kTargetPlatformNameWeb,
29+
];
Lines changed: 77 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,145 @@
1+
import 'constants.dart';
12
import 'supported_platforms.dart';
23

34
abstract class EnumPlatform implements Platform {
45
final String? available;
56
final String? apiName;
67
final String? apiUrl;
78
final String? note;
9+
final String name;
10+
final String targetPlatformName;
811
final dynamic value;
912

10-
const EnumPlatform(
11-
{this.available, this.apiName, this.apiUrl, this.note, this.value});
12-
13-
final name = "";
14-
final targetPlatformName = "";
13+
const EnumPlatform({
14+
this.available,
15+
this.apiName,
16+
this.apiUrl,
17+
this.note,
18+
this.name = '',
19+
this.targetPlatformName = '',
20+
this.value,
21+
});
1522
}
1623

1724
class EnumAndroidPlatform implements EnumPlatform, AndroidPlatform {
1825
final String? available;
1926
final String? apiName;
2027
final String? apiUrl;
2128
final String? note;
29+
final String name;
30+
final String targetPlatformName;
2231
final dynamic value;
2332

24-
const EnumAndroidPlatform(
25-
{this.available, this.apiName, this.apiUrl, this.note, this.value});
26-
27-
final name = "Android native WebView";
28-
final targetPlatformName = "android";
33+
const EnumAndroidPlatform({
34+
this.available,
35+
this.apiName,
36+
this.apiUrl,
37+
this.note,
38+
this.name = kPlatformNameAndroid,
39+
this.targetPlatformName = kTargetPlatformNameAndroid,
40+
this.value,
41+
});
2942
}
3043

3144
class EnumIOSPlatform implements EnumPlatform, IOSPlatform {
3245
final String? available;
3346
final String? apiName;
3447
final String? apiUrl;
3548
final String? note;
49+
final String name;
50+
final String targetPlatformName;
3651
final dynamic value;
3752

38-
const EnumIOSPlatform(
39-
{this.available, this.apiName, this.apiUrl, this.note, this.value});
40-
41-
final name = "iOS";
42-
final targetPlatformName = "iOS";
53+
const EnumIOSPlatform({
54+
this.available,
55+
this.apiName,
56+
this.apiUrl,
57+
this.note,
58+
this.name = kPlatformNameIOS,
59+
this.targetPlatformName = kTargetPlatformNameIOS,
60+
this.value,
61+
});
4362
}
4463

4564
class EnumMacOSPlatform implements EnumPlatform, MacOSPlatform {
4665
final String? available;
4766
final String? apiName;
4867
final String? apiUrl;
4968
final String? note;
69+
final String name;
70+
final String targetPlatformName;
5071
final dynamic value;
5172

52-
const EnumMacOSPlatform(
53-
{this.available, this.apiName, this.apiUrl, this.note, this.value});
54-
55-
final name = "MacOS";
56-
final targetPlatformName = "macOS";
73+
const EnumMacOSPlatform({
74+
this.available,
75+
this.apiName,
76+
this.apiUrl,
77+
this.note,
78+
this.name = kPlatformNameMacOS,
79+
this.targetPlatformName = kTargetPlatformNameMacOS,
80+
this.value,
81+
});
5782
}
5883

5984
class EnumWindowsPlatform implements EnumPlatform, WindowsPlatform {
6085
final String? available;
6186
final String? apiName;
6287
final String? apiUrl;
6388
final String? note;
89+
final String name;
90+
final String targetPlatformName;
6491
final dynamic value;
6592

66-
const EnumWindowsPlatform(
67-
{this.available, this.apiName, this.apiUrl, this.note, this.value});
68-
69-
final name = "Windows";
70-
final targetPlatformName = "windows";
93+
const EnumWindowsPlatform({
94+
this.available,
95+
this.apiName,
96+
this.apiUrl,
97+
this.note,
98+
this.name = kPlatformNameWindows,
99+
this.targetPlatformName = kTargetPlatformNameWindows,
100+
this.value,
101+
});
71102
}
72103

73104
class EnumLinuxPlatform implements EnumPlatform, LinuxPlatform {
74105
final String? available;
75106
final String? apiName;
76107
final String? apiUrl;
77108
final String? note;
109+
final String name;
110+
final String targetPlatformName;
78111
final dynamic value;
79112

80-
const EnumLinuxPlatform(
81-
{this.available, this.apiName, this.apiUrl, this.note, this.value});
82-
83-
final name = "Linux";
84-
final targetPlatformName = "linux";
113+
const EnumLinuxPlatform({
114+
this.available,
115+
this.apiName,
116+
this.apiUrl,
117+
this.note,
118+
this.name = kPlatformNameLinux,
119+
this.targetPlatformName = kTargetPlatformNameLinux,
120+
this.value,
121+
});
85122
}
86123

87124
class EnumWebPlatform implements EnumPlatform, WebPlatform {
88125
final String? available;
89126
final String? apiName;
90127
final String? apiUrl;
91128
final String? note;
129+
final String name;
130+
final String targetPlatformName;
92131
final dynamic value;
93132
final bool requiresSameOrigin;
94133

95134
const EnumWebPlatform(
96135
{this.available,
97-
this.apiName,
98-
this.apiUrl,
99-
this.note,
100-
this.value,
101-
this.requiresSameOrigin = true});
102-
103-
final name = "Web";
104-
final targetPlatformName = "web";
136+
this.apiName,
137+
this.apiUrl,
138+
this.note,
139+
this.value,
140+
this.name = kPlatformNameWeb,
141+
this.targetPlatformName = kTargetPlatformNameWeb,
142+
this.requiresSameOrigin = true});
105143
}
106144

107145
class EnumSupportedPlatforms {
@@ -112,4 +150,4 @@ class EnumSupportedPlatforms {
112150
required this.platforms,
113151
this.defaultValue,
114152
});
115-
}
153+
}

0 commit comments

Comments
 (0)