Hadrien Lejard 8 years ago
parent
commit
f56fd7ff22
2 changed files with 6 additions and 12 deletions
  1. 0 2
      example/lib/main.dart
  2. 6 10
      lib/flutter_webview_plugin.dart

+ 0 - 2
example/lib/main.dart

@@ -7,7 +7,6 @@ void main() {
 }
 
 class MyApp extends StatelessWidget {
-
   // This widget is the root of your application.
   @override
   Widget build(BuildContext context) {
@@ -49,7 +48,6 @@ class MyHomePage extends StatefulWidget {
 }
 
 class _MyHomePageState extends State<MyHomePage> {
-
   final FlutterWebviewPlugin flutterWebviewPlugin = new FlutterWebviewPlugin();
 
   TextEditingController _ctrl =

+ 6 - 10
lib/flutter_webview_plugin.dart

@@ -4,28 +4,24 @@ import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
 
 class FlutterWebviewPlugin {
-
   static FlutterWebviewPlugin _instance;
   FlutterWebviewPlugin._() {
     _init();
   }
   factory FlutterWebviewPlugin() => _instance ??= new FlutterWebviewPlugin._();
 
-
   StreamController<Null> _onDestroy = new StreamController.broadcast();
   Stream<Null> get onDestroy => _onDestroy.stream;
 
-  StreamController<Null> _onBackPressed =
-  new StreamController.broadcast();
-
-  Stream<Null> get onBackPressed => _onDestroy.stream;
+  StreamController<Null> _onBackPressed = new StreamController.broadcast();
+  Stream<Null> get onBackPressed => _onBackPressed.stream;
 
   final MethodChannel _channel = const MethodChannel('flutter_webview_plugin');
 
   Future<Null> launch(String url,
-      {bool withJavascript: true,
-        bool clearCache: false,
-        bool clearCookies: false}) =>
+          {bool withJavascript: true,
+          bool clearCache: false,
+          bool clearCookies: false}) =>
       _channel.invokeMethod('launch', {
         "url": url,
         "withJavascript": withJavascript,
@@ -49,4 +45,4 @@ class FlutterWebviewPlugin {
         break;
     }
   }
-}
+}