iosWebViewFix/example/lib/main.dart

51 lines
1.4 KiB
Dart
Raw Normal View History

2018-11-13 11:02:20 +00:00
import 'dart:async';
2018-11-13 11:02:20 +00:00
import 'package:flutter/material.dart';
2018-11-13 11:02:20 +00:00
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
import 'package:flutter_inappbrowser_example/chrome_safari_browser_example.screen.dart';
import 'package:flutter_inappbrowser_example/in_app_webiew_example.screen.dart';
import 'package:flutter_inappbrowser_example/in_app_browser_example.screen.dart';
import 'package:flutter_downloader/flutter_downloader.dart';
import 'package:permission_handler/permission_handler.dart';
2018-11-13 11:02:20 +00:00
2019-03-12 01:14:30 +00:00
// InAppLocalhostServer localhostServer = new InAppLocalhostServer();
2018-11-13 11:02:20 +00:00
Future main() async {
2019-03-12 01:14:30 +00:00
// await localhostServer.start();
// await FlutterDownloader.initialize();
await PermissionHandler().requestPermissions([PermissionGroup.locationAlways]);
2018-11-13 11:02:20 +00:00
runApp(new MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => new _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
initialRoute: '/',
routes: {
'/': (context) => InAppWebViewExampleScreen(),
'/InAppBrowser': (context) => InAppBrowserExampleScreen(),
'/ChromeSafariBrowser': (context) => ChromeSafariBrowserExampleScreen(),
}
2018-11-13 11:02:20 +00:00
);
}
}