Skip to content

Commit d693d24

Browse files
committedAug 19, 2024
Revert "initial windows implementation pichillilorenzo#460"
This reverts commit 981c035.
1 parent 0b7e24a commit d693d24

35 files changed

+399
-392
lines changed
 

‎flutter_inappwebview/lib/src/cookie_manager.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ class CookieManager {
4545
return _instance!;
4646
} else {
4747
return CookieManager.fromPlatformCreationParams(
48-
PlatformCookieManagerCreationParams(
49-
webViewEnvironment: webViewEnvironment.platform));
48+
PlatformCookieManagerCreationParams(webViewEnvironment: webViewEnvironment.platform)
49+
);
5050
}
5151
}
5252

‎flutter_inappwebview/lib/src/in_app_browser/in_app_browser.dart

+15-15
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
1818
/// Constructs a [InAppBrowser].
1919
///
2020
/// {@macro flutter_inappwebview_platform_interface.PlatformInAppBrowser}
21-
InAppBrowser({
22-
ContextMenu? contextMenu,
23-
PullToRefreshController? pullToRefreshController,
24-
FindInteractionController? findInteractionController,
25-
UnmodifiableListView<UserScript>? initialUserScripts,
26-
int? windowId,
27-
WebViewEnvironment? webViewEnvironment,
28-
}) : this.fromPlatformCreationParams(
21+
InAppBrowser(
22+
{ContextMenu? contextMenu,
23+
PullToRefreshController? pullToRefreshController,
24+
FindInteractionController? findInteractionController,
25+
UnmodifiableListView<UserScript>? initialUserScripts,
26+
int? windowId,
27+
WebViewEnvironment? webViewEnvironment,
28+
})
29+
: this.fromPlatformCreationParams(
2930
PlatformInAppBrowserCreationParams(
30-
contextMenu: contextMenu,
31-
pullToRefreshController: pullToRefreshController?.platform,
32-
findInteractionController: findInteractionController?.platform,
33-
initialUserScripts: initialUserScripts,
34-
windowId: windowId,
35-
webViewEnvironment: webViewEnvironment?.platform,
36-
),
31+
contextMenu: contextMenu,
32+
pullToRefreshController: pullToRefreshController?.platform,
33+
findInteractionController: findInteractionController?.platform,
34+
initialUserScripts: initialUserScripts,
35+
windowId: windowId,
36+
webViewEnvironment: webViewEnvironment?.platform,),
3737
);
3838

3939
/// Constructs a [InAppBrowser] from creation params for a specific

‎flutter_inappwebview/lib/src/in_app_webview/in_app_webview_controller.dart

+5-11
Original file line numberDiff line numberDiff line change
@@ -488,21 +488,15 @@ class InAppWebViewController {
488488
Future<void> openDevTools() => platform.openDevTools();
489489

490490
///{@macro flutter_inappwebview_platform_interface.PlatformInAppWebViewController.callDevToolsProtocolMethod}
491-
Future<dynamic> callDevToolsProtocolMethod(
492-
{required String methodName, Map<String, dynamic>? parameters}) =>
493-
platform.callDevToolsProtocolMethod(
494-
methodName: methodName, parameters: parameters);
491+
Future<dynamic> callDevToolsProtocolMethod({required String methodName, Map<String, dynamic>? parameters}) =>
492+
platform.callDevToolsProtocolMethod(methodName: methodName, parameters: parameters);
495493

496494
///{@macro flutter_inappwebview_platform_interface.PlatformInAppWebViewController.addDevToolsProtocolEventListener}
497-
Future<void> addDevToolsProtocolEventListener(
498-
{required String eventName,
499-
required Function(dynamic data) callback}) =>
500-
platform.addDevToolsProtocolEventListener(
501-
eventName: eventName, callback: callback);
495+
Future<void> addDevToolsProtocolEventListener({required String eventName, required Function(dynamic data) callback}) =>
496+
platform.addDevToolsProtocolEventListener(eventName: eventName, callback: callback);
502497

503498
///{@macro flutter_inappwebview_platform_interface.PlatformInAppWebViewController.removeDevToolsProtocolEventListener}
504-
Future<void> removeDevToolsProtocolEventListener(
505-
{required String eventName}) =>
499+
Future<void> removeDevToolsProtocolEventListener({required String eventName}) =>
506500
platform.removeDevToolsProtocolEventListener(eventName: eventName);
507501

508502
///{@macro flutter_inappwebview_platform_interface.PlatformInAppWebViewController.getIFrameId}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export 'webview_environment.dart';
1+
export 'webview_environment.dart';

‎flutter_inappwebview/lib/src/webview_environment/webview_environment.dart

+4-10
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,17 @@ class WebViewEnvironment {
2727
///{@macro flutter_inappwebview_platform_interface.PlatformWebViewEnvironment.create}
2828
static Future<WebViewEnvironment> create(
2929
{WebViewEnvironmentSettings? settings}) async {
30-
return WebViewEnvironment.fromPlatform(
31-
platform: await PlatformWebViewEnvironment.static()
32-
.create(settings: settings));
30+
return WebViewEnvironment.fromPlatform(platform: await PlatformWebViewEnvironment.static().create(settings: settings));
3331
}
3432

3533
///{@macro flutter_inappwebview_platform_interface.PlatformWebViewEnvironment.getAvailableVersion}
3634
static Future<String?> getAvailableVersion(
37-
{String? browserExecutableFolder}) =>
38-
PlatformWebViewEnvironment.static().getAvailableVersion(
39-
browserExecutableFolder: browserExecutableFolder);
35+
{String? browserExecutableFolder}) => PlatformWebViewEnvironment.static().getAvailableVersion(browserExecutableFolder: browserExecutableFolder);
4036

4137
///{@macro flutter_inappwebview_platform_interface.PlatformWebViewEnvironment.getAvailableVersion}
4238
static Future<int?> compareBrowserVersions(
43-
{required String version1, required String version2}) =>
44-
PlatformWebViewEnvironment.static()
45-
.compareBrowserVersions(version1: version1, version2: version2);
39+
{required String version1, required String version2}) => PlatformWebViewEnvironment.static().compareBrowserVersions(version1: version1, version2: version2);
4640

4741
///{@macro flutter_inappwebview_platform_interface.PlatformWebViewEnvironment.dispose}
4842
Future<void> dispose() => platform.dispose();
49-
}
43+
}

‎flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.dart

+99-34
Original file line numberDiff line numberDiff line change
@@ -107,124 +107,189 @@ class InAppBrowserSettings_
107107
bool? hidden;
108108

109109
///Set to `true` to hide the toolbar at the top of the WebView. The default value is `false`.
110-
@SupportedPlatforms(
111-
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
110+
@SupportedPlatforms(platforms: [
111+
AndroidPlatform(),
112+
IOSPlatform(),
113+
MacOSPlatform()
114+
])
112115
bool? hideToolbarTop;
113116

114117
///Set the custom background color of the toolbar at the top.
115-
@SupportedPlatforms(
116-
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
118+
@SupportedPlatforms(platforms: [
119+
AndroidPlatform(),
120+
IOSPlatform(),
121+
MacOSPlatform()
122+
])
117123
Color_? toolbarTopBackgroundColor;
118124

119125
///Set to `true` to hide the url bar on the toolbar at the top. The default value is `false`.
120-
@SupportedPlatforms(
121-
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
126+
@SupportedPlatforms(platforms: [
127+
AndroidPlatform(),
128+
IOSPlatform(),
129+
MacOSPlatform()
130+
])
122131
bool? hideUrlBar;
123132

124133
///Set to `true` to hide the progress bar when the WebView is loading a page. The default value is `false`.
125-
@SupportedPlatforms(
126-
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
134+
@SupportedPlatforms(platforms: [
135+
AndroidPlatform(),
136+
IOSPlatform(),
137+
MacOSPlatform()
138+
])
127139
bool? hideProgressBar;
128140

129141
///Set to `true` to hide the default menu items. The default value is `false`.
130-
@SupportedPlatforms(
131-
platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform()])
142+
@SupportedPlatforms(platforms: [
143+
AndroidPlatform(),
144+
IOSPlatform(),
145+
MacOSPlatform()
146+
])
132147
bool? hideDefaultMenuItems;
133148

134149
///Set to `true` if you want the title should be displayed. The default value is `false`.
135-
@SupportedPlatforms(platforms: [AndroidPlatform()])
150+
@SupportedPlatforms(platforms: [
151+
AndroidPlatform()
152+
])
136153
bool? hideTitleBar;
137154

138155
///Set the action bar's title.
139-
@SupportedPlatforms(
140-
platforms: [AndroidPlatform(), MacOSPlatform(), WindowsPlatform()])
156+
@SupportedPlatforms(platforms: [
157+
AndroidPlatform(),
158+
MacOSPlatform(),
159+
WindowsPlatform()
160+
])
141161
String? toolbarTopFixedTitle;
142162

143163
///Set to `false` to not close the InAppBrowser when the user click on the Android back button and the WebView cannot go back to the history. The default value is `true`.
144-
@SupportedPlatforms(platforms: [AndroidPlatform()])
164+
@SupportedPlatforms(platforms: [
165+
AndroidPlatform()
166+
])
145167
bool? closeOnCannotGoBack;
146168

147169
///Set to `false` to block the InAppBrowser WebView going back when the user click on the Android back button. The default value is `true`.
148-
@SupportedPlatforms(platforms: [AndroidPlatform()])
170+
@SupportedPlatforms(platforms: [
171+
AndroidPlatform()
172+
])
149173
bool? allowGoBackWithBackButton;
150174

151175
///Set to `true` to close the InAppBrowser when the user click on the Android back button. The default value is `false`.
152-
@SupportedPlatforms(platforms: [AndroidPlatform()])
176+
@SupportedPlatforms(platforms: [
177+
AndroidPlatform()
178+
])
153179
bool? shouldCloseOnBackButtonPressed;
154180

155181
///Set to `true` to set the toolbar at the top translucent. The default value is `true`.
156-
@SupportedPlatforms(platforms: [IOSPlatform()])
182+
@SupportedPlatforms(platforms: [
183+
IOSPlatform()
184+
])
157185
bool? toolbarTopTranslucent;
158186

159187
///Set the tint color to apply to the navigation bar background.
160-
@SupportedPlatforms(platforms: [IOSPlatform()])
188+
@SupportedPlatforms(platforms: [
189+
IOSPlatform()
190+
])
161191
Color_? toolbarTopBarTintColor;
162192

163193
///Set the tint color to apply to the navigation items and bar button items.
164-
@SupportedPlatforms(platforms: [IOSPlatform()])
194+
@SupportedPlatforms(platforms: [
195+
IOSPlatform()
196+
])
165197
Color_? toolbarTopTintColor;
166198

167199
///Set to `true` to hide the toolbar at the bottom of the WebView. The default value is `false`.
168-
@SupportedPlatforms(platforms: [IOSPlatform()])
200+
@SupportedPlatforms(platforms: [
201+
IOSPlatform()
202+
])
169203
bool? hideToolbarBottom;
170204

171205
///Set the custom background color of the toolbar at the bottom.
172-
@SupportedPlatforms(platforms: [IOSPlatform()])
206+
@SupportedPlatforms(platforms: [
207+
IOSPlatform()
208+
])
173209
Color_? toolbarBottomBackgroundColor;
174210

175211
///Set the tint color to apply to the bar button items.
176-
@SupportedPlatforms(platforms: [IOSPlatform()])
212+
@SupportedPlatforms(platforms: [
213+
IOSPlatform()
214+
])
177215
Color_? toolbarBottomTintColor;
178216

179217
///Set to `true` to set the toolbar at the bottom translucent. The default value is `true`.
180-
@SupportedPlatforms(platforms: [IOSPlatform()])
218+
@SupportedPlatforms(platforms: [
219+
IOSPlatform()
220+
])
181221
bool? toolbarBottomTranslucent;
182222

183223
///Set the custom text for the close button.
184-
@SupportedPlatforms(platforms: [IOSPlatform()])
224+
@SupportedPlatforms(platforms: [
225+
IOSPlatform()
226+
])
185227
String? closeButtonCaption;
186228

187229
///Set the custom color for the close button.
188-
@SupportedPlatforms(platforms: [IOSPlatform()])
230+
@SupportedPlatforms(platforms: [
231+
IOSPlatform()
232+
])
189233
Color_? closeButtonColor;
190234

191235
///Set to `true` to hide the close button. The default value is `false`.
192-
@SupportedPlatforms(platforms: [IOSPlatform()])
236+
@SupportedPlatforms(platforms: [
237+
IOSPlatform()
238+
])
193239
bool? hideCloseButton;
194240

195241
///Set the custom color for the menu button.
196-
@SupportedPlatforms(platforms: [IOSPlatform()])
242+
@SupportedPlatforms(platforms: [
243+
IOSPlatform()
244+
])
197245
Color_? menuButtonColor;
198246

199247
///Set the custom modal presentation style when presenting the WebView. The default value is [ModalPresentationStyle.FULL_SCREEN].
200-
@SupportedPlatforms(platforms: [IOSPlatform()])
248+
@SupportedPlatforms(platforms: [
249+
IOSPlatform()
250+
])
201251
ModalPresentationStyle_? presentationStyle;
202252

203253
///Set to the custom transition style when presenting the WebView. The default value is [ModalTransitionStyle.COVER_VERTICAL].
204-
@SupportedPlatforms(platforms: [IOSPlatform()])
254+
@SupportedPlatforms(platforms: [
255+
IOSPlatform()
256+
])
205257
ModalTransitionStyle_? transitionStyle;
206258

207259
///How the browser window should be added to the main window.
208260
///The default value is [WindowType.WINDOW].
209-
@SupportedPlatforms(platforms: [MacOSPlatform(), WindowsPlatform()])
261+
@SupportedPlatforms(platforms: [
262+
MacOSPlatform(),
263+
WindowsPlatform()
264+
])
210265
WindowType_? windowType;
211266

212267
///The window’s alpha value.
213268
///The default value is `1.0`.
214-
@SupportedPlatforms(platforms: [MacOSPlatform(), WindowsPlatform()])
269+
@SupportedPlatforms(platforms: [
270+
MacOSPlatform(),
271+
WindowsPlatform()
272+
])
215273
double? windowAlphaValue;
216274

217275
///Flags that describe the window’s current style, such as if it’s resizable or in full-screen mode.
218-
@SupportedPlatforms(platforms: [MacOSPlatform()])
276+
@SupportedPlatforms(platforms: [
277+
MacOSPlatform()
278+
])
219279
WindowStyleMask_? windowStyleMask;
220280

221281
///The type of separator that the app displays between the title bar and content of a window.
222-
@SupportedPlatforms(platforms: [MacOSPlatform(available: '11.0')])
282+
@SupportedPlatforms(platforms: [
283+
MacOSPlatform(available: '11.0')
284+
])
223285
WindowTitlebarSeparatorStyle_? windowTitlebarSeparatorStyle;
224286

225287
///Sets the origin and size of the window’s frame rectangle according to a given frame rectangle,
226288
///thereby setting its position and size onscreen.
227-
@SupportedPlatforms(platforms: [MacOSPlatform(), WindowsPlatform()])
289+
@SupportedPlatforms(platforms: [
290+
MacOSPlatform(),
291+
WindowsPlatform()
292+
])
228293
InAppWebViewRect_? windowFrame;
229294

230295
InAppBrowserSettings_(

‎flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.g.dart

+3-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.