Skip to content

Commit 348038e

Browse files
committed
Minor changes.
1 parent a8ffb95 commit 348038e

File tree

5 files changed

+15
-19
lines changed

5 files changed

+15
-19
lines changed

android/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
group 'com.yourcompany.flutter_webview_plugin'
1+
group 'com.flutter_webview_plugin'
22
version '1.0-SNAPSHOT'
33

44
buildscript {
@@ -25,7 +25,6 @@ android {
2525

2626
defaultConfig {
2727
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
28-
minSdkVersion 16
2928
}
3029
lintOptions {
3130
disable 'InvalidPackage'
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.flutter_webview_plugin">
3-
43
</manifest>

example/lib/main.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ const kAndroidUserAgent =
99

1010
String selectedUrl = 'https://flutter.io';
1111

12-
void main() {
13-
runApp(MyApp());
14-
}
12+
void main() => runApp(MyApp());
1513

1614
class MyApp extends StatelessWidget {
1715
final flutterWebViewPlugin = FlutterWebviewPlugin();

lib/src/base.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,34 +151,34 @@ class FlutterWebviewPlugin {
151151

152152
/// Close the Webview
153153
/// Will trigger the [onDestroy] event
154-
Future close() => _channel.invokeMethod('close');
154+
Future<Null> close() async => await _channel.invokeMethod('close');
155155

156156
/// Reloads the WebView.
157-
Future reload() => _channel.invokeMethod('reload');
157+
Future<Null> reload() async => await _channel.invokeMethod('reload');
158158

159159
/// Navigates back on the Webview.
160-
Future goBack() => _channel.invokeMethod('back');
160+
Future<Null> goBack() async => await _channel.invokeMethod('back');
161161

162162
/// Navigates forward on the Webview.
163-
Future goForward() => _channel.invokeMethod('forward');
163+
Future<Null> goForward() async => await _channel.invokeMethod('forward');
164164

165165
// Hides the webview
166-
Future hide() => _channel.invokeMethod('hide');
166+
Future<Null> hide() async => await _channel.invokeMethod('hide');
167167

168168
// Shows the webview
169-
Future show() => _channel.invokeMethod('show');
169+
Future<Null> show() async => await _channel.invokeMethod('show');
170170

171171
// Reload webview with a url
172-
Future reloadUrl(String url) async {
172+
Future<Null> reloadUrl(String url) async {
173173
final args = <String, String>{'url': url};
174174
await _channel.invokeMethod('reloadUrl', args);
175175
}
176176

177177
// Clean cookies on WebView
178-
Future cleanCookies() async => _channel.invokeMethod('cleanCookies');
178+
Future<Null> cleanCookies() async => await _channel.invokeMethod('cleanCookies');
179179

180180
// Stops current loading process
181-
Future stopLoading() => _channel.invokeMethod('stopLoading');
181+
Future<Null> stopLoading() async => await _channel.invokeMethod('stopLoading');
182182

183183
/// Close all Streams
184184
void dispose() {

lib/src/webview_scaffold.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ class WebviewScaffold extends StatefulWidget {
1414
@required this.url,
1515
this.headers,
1616
this.withJavascript,
17-
this.supportMultipleWindows,
18-
this.appCacheEnabled,
1917
this.clearCache,
2018
this.clearCookies,
2119
this.enableAppScheme,
@@ -27,6 +25,8 @@ class WebviewScaffold extends StatefulWidget {
2725
this.withLocalStorage,
2826
this.withLocalUrl,
2927
this.scrollBar,
28+
this.supportMultipleWindows,
29+
this.appCacheEnabled,
3030
this.hidden = false,
3131
this.initialChild,
3232
this.allowFileURLs,
@@ -36,8 +36,6 @@ class WebviewScaffold extends StatefulWidget {
3636
final String url;
3737
final Map<String, String> headers;
3838
final bool withJavascript;
39-
final bool supportMultipleWindows;
40-
final bool appCacheEnabled;
4139
final bool clearCache;
4240
final bool clearCookies;
4341
final bool enableAppScheme;
@@ -49,6 +47,8 @@ class WebviewScaffold extends StatefulWidget {
4947
final bool withLocalStorage;
5048
final bool withLocalUrl;
5149
final bool scrollBar;
50+
final bool supportMultipleWindows;
51+
final bool appCacheEnabled;
5252
final bool hidden;
5353
final Widget initialChild;
5454
final bool allowFileURLs;

0 commit comments

Comments
 (0)