Skip to content
Snippets Groups Projects
Commit e967a4d6 authored by igorwork's avatar igorwork Committed by Markin Igor
Browse files

Implement patched flutter_browser

parent e834e0d1
No related branches found
No related tags found
1 merge request!1Mobile app initial implementation.
flutter_web_browser @ 15808a8d
Subproject commit 15808a8d9e1861db31087e28f320d17d88e452f2
PODS: PODS:
- Flutter (1.0.0) - Flutter (1.0.0)
- webview_flutter (0.0.1): - flutter_web_browser (0.11.0):
- Flutter - Flutter
DEPENDENCIES: DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios`) - Flutter (from `.symlinks/flutter/ios`)
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`) - flutter_web_browser (from `.symlinks/plugins/flutter_web_browser/ios`)
EXTERNAL SOURCES: EXTERNAL SOURCES:
Flutter: Flutter:
:path: ".symlinks/flutter/ios" :path: ".symlinks/flutter/ios"
webview_flutter: flutter_web_browser:
:path: ".symlinks/plugins/webview_flutter/ios" :path: ".symlinks/plugins/flutter_web_browser/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
webview_flutter: 1aa7604e6cdb451a9b7ed2c37d5454c0b440246b flutter_web_browser: bdea232160dec44dec86540bee05168cc844ef7c
PODFILE CHECKSUM: 7fb83752f59ead6285236625b82473f90b1cb932 PODFILE CHECKSUM: 7fb83752f59ead6285236625b82473f90b1cb932
......
...@@ -28,6 +28,19 @@ ...@@ -28,6 +28,19 @@
<string>YES</string> <string>YES</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>
<string>Main</string> <string>Main</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleIdentifier</key>
<string></string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>app://com.vereign.mobile_app</string>
</array>
</dict>
</array>
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'web_view_container.dart'; import 'package:flutter_web_browser/flutter_web_browser.dart';
class Home extends StatelessWidget { class Home extends StatelessWidget {
final _links = ['https://app.vereign.com', 'https://integration.vereign.com', 'https://rosengeorgiev.dev.vereign.com', 'https://igormarkin.dev.vereign.com', 'https://gospodinbodurov.dev.vereign.com']; final _links = ['https://app.vereign.com', 'https://integration.vereign.com', 'https://rosengeorgiev.dev.vereign.com', 'https://igormarkin.dev.vereign.com', 'https://gospodinbodurov.dev.vereign.com'];
@override @override
...@@ -23,8 +24,7 @@ class Home extends StatelessWidget { ...@@ -23,8 +24,7 @@ class Home extends StatelessWidget {
onPressed: () => _handleURLButtonPress(context, url), onPressed: () => _handleURLButtonPress(context, url),
)); ));
} }
void _handleURLButtonPress(BuildContext context, String url) { void _handleURLButtonPress(BuildContext context, String url) async {
Navigator.push(context, FlutterWebBrowser.openWebPage(url: url, androidToolbarColor: Colors.deepPurple);
MaterialPageRoute(builder: (context) => WebViewContainer(url)));
} }
} }
\ No newline at end of file
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
class WebViewContainer extends StatefulWidget {
final url;
WebViewContainer(this.url);
@override
createState() => _WebViewContainerState(this.url);
}
class _WebViewContainerState extends State<WebViewContainer> {
var _url;
final _key = UniqueKey();
_WebViewContainerState(this._url);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(this._url)),
body: Column(
children: [
Expanded(
child: WebView(
key: _key,
javascriptMode: JavascriptMode.unrestricted,
initialUrl: _url))
],
));
}
}
\ No newline at end of file
...@@ -46,6 +46,13 @@ packages: ...@@ -46,6 +46,13 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_web_browser:
dependency: "direct main"
description:
path: "deps/flutter_web_browser"
relative: true
source: path
version: "0.11.0"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
...@@ -142,13 +149,6 @@ packages: ...@@ -142,13 +149,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.8" version: "2.0.8"
webview_flutter:
dependency: "direct main"
description:
name: webview_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.10"
sdks: sdks:
dart: ">=2.2.2 <3.0.0" dart: ">=2.2.2 <3.0.0"
flutter: ">=1.5.0 <2.0.0" flutter: ">=0.1.4 <2.0.0"
...@@ -22,7 +22,9 @@ dependencies: ...@@ -22,7 +22,9 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2 cupertino_icons: ^0.1.2
webview_flutter: ^0.3.10 flutter_web_browser:
# Use
path: ./deps/flutter_web_browser
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment