Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Flutter Inappwebview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
Flutter Inappwebview
Commits
5366078e
Commit
5366078e
authored
Oct 13, 2018
by
pichillilorenzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated example/lib/main.dart
parent
88d88bd1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
60 deletions
+47
-60
.idea/workspace.xml
.idea/workspace.xml
+35
-48
example/lib/main.dart
example/lib/main.dart
+12
-12
No files found.
.idea/workspace.xml
View file @
5366078e
...
@@ -15,20 +15,7 @@
...
@@ -15,20 +15,7 @@
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"9b41f7a2-a71e-4923-91fb-249d7815b3e7"
name=
"Default"
comment=
""
>
<list
default=
"true"
id=
"9b41f7a2-a71e-4923-91fb-249d7815b3e7"
name=
"Default"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/CHANGELOG.md"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/CHANGELOG.md"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/README.md"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/README.md"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserOptions.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserOptions.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserWebViewClient.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppBrowserWebViewClient.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/WebViewActivity.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/WebViewActivity.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/example/lib/main.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/lib/main.dart"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/example/lib/main.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/example/lib/main.dart"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/ios/Classes/InAppBrowserOptions.swift"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/ios/Classes/InAppBrowserOptions.swift"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/ios/Classes/InAppBrowserWebViewController.swift"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/ios/Classes/InAppBrowserWebViewController.swift"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/ios/Classes/MyURLProtocol.swift"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/ios/Classes/NSURLProtocol+WKWebVIew.h"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/ios/Classes/NSURLProtocol+WKWebVIew.m"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/ios/Classes/SwiftFlutterPlugin.swift"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/lib/flutter_inappbrowser.dart"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/lib/flutter_inappbrowser.dart"
afterDir=
"false"
/>
</list>
</list>
<ignored
path=
"$PROJECT_DIR$/.dart_tool/"
/>
<ignored
path=
"$PROJECT_DIR$/.dart_tool/"
/>
<ignored
path=
"$PROJECT_DIR$/.idea/"
/>
<ignored
path=
"$PROJECT_DIR$/.idea/"
/>
...
@@ -66,11 +53,11 @@
...
@@ -66,11 +53,11 @@
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"README.md"
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
leaf-file-name=
"README.md"
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/README.md"
>
<entry
file=
"file://$PROJECT_DIR$/README.md"
>
<provider
selected=
"true"
editor-type-id=
"split-provider[text-editor;MarkdownPreviewEditor]"
>
<provider
selected=
"true"
editor-type-id=
"split-provider[text-editor;MarkdownPreviewEditor]"
>
<state
split_layout=
"SPLIT"
>
<state
split_layout=
"SPLIT"
>
<first_editor
relative-caret-position=
"
280
"
>
<first_editor
relative-caret-position=
"
471
"
>
<caret
line=
"592"
lean-forward=
"true"
selection-start-line=
"592"
selection-end-line=
"592"
/>
<caret
line=
"592"
lean-forward=
"true"
selection-start-line=
"592"
selection-end-line=
"592"
/>
</first_editor>
</first_editor>
<second_editor>
<second_editor>
...
@@ -80,11 +67,11 @@
...
@@ -80,11 +67,11 @@
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"main.dart"
pinned=
"false"
current-in-tab=
"
fals
e"
>
<file
leaf-file-name=
"main.dart"
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/main.dart"
>
<entry
file=
"file://$PROJECT_DIR$/example/lib/main.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-1
0"
>
<state
relative-caret-position=
"
18
0"
>
<caret
line=
"
99"
lean-forward=
"true"
selection-start-line=
"99"
selection-end-line=
"99
"
/>
<caret
line=
"
13"
column=
"34"
lean-forward=
"true"
selection-start-line=
"13"
selection-start-column=
"34"
selection-end-line=
"13"
selection-end-column=
"34
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
...
@@ -93,8 +80,8 @@
...
@@ -93,8 +80,8 @@
<entry
file=
"file://$PROJECT_DIR$/CHANGELOG.md"
>
<entry
file=
"file://$PROJECT_DIR$/CHANGELOG.md"
>
<provider
selected=
"true"
editor-type-id=
"split-provider[text-editor;MarkdownPreviewEditor]"
>
<provider
selected=
"true"
editor-type-id=
"split-provider[text-editor;MarkdownPreviewEditor]"
>
<state
split_layout=
"SPLIT"
>
<state
split_layout=
"SPLIT"
>
<first_editor
relative-caret-position=
"
3
0"
>
<first_editor
relative-caret-position=
"
6
0"
>
<caret
line=
"
2"
column=
"3"
selection-start-line=
"2"
selection-start-column=
"3"
selection-end-line=
"2"
selection-end-column=
"3
"
/>
<caret
line=
"
4"
column=
"2"
selection-start-line=
"4"
selection-start-column=
"2"
selection-end-line=
"4"
selection-end-column=
"98
"
/>
</first_editor>
</first_editor>
<second_editor>
<second_editor>
<markdownNavigatorState
/>
<markdownNavigatorState
/>
...
@@ -181,10 +168,10 @@
...
@@ -181,10 +168,10 @@
<option
value=
"$PROJECT_DIR$/example/ios/Podfile"
/>
<option
value=
"$PROJECT_DIR$/example/ios/Podfile"
/>
<option
value=
"$PROJECT_DIR$/android/build.gradle"
/>
<option
value=
"$PROJECT_DIR$/android/build.gradle"
/>
<option
value=
"$PROJECT_DIR$/pubspec.yaml"
/>
<option
value=
"$PROJECT_DIR$/pubspec.yaml"
/>
<option
value=
"$PROJECT_DIR$/example/lib/main.dart"
/>
<option
value=
"$PROJECT_DIR$/CHANGELOG.md"
/>
<option
value=
"$PROJECT_DIR$/CHANGELOG.md"
/>
<option
value=
"$PROJECT_DIR$/lib/flutter_inappbrowser.dart"
/>
<option
value=
"$PROJECT_DIR$/lib/flutter_inappbrowser.dart"
/>
<option
value=
"$PROJECT_DIR$/README.md"
/>
<option
value=
"$PROJECT_DIR$/README.md"
/>
<option
value=
"$PROJECT_DIR$/example/lib/main.dart"
/>
</list>
</list>
</option>
</option>
</component>
</component>
...
@@ -406,9 +393,9 @@
...
@@ -406,9 +393,9 @@
<window_info
anchor=
"right"
id=
"Capture Analysis"
order=
"3"
/>
<window_info
anchor=
"right"
id=
"Capture Analysis"
order=
"3"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"8"
sideWeight=
"0.5035553"
side_tool=
"true"
weight=
"0.25689086"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"8"
sideWeight=
"0.5035553"
side_tool=
"true"
weight=
"0.25689086"
/>
<window_info
anchor=
"bottom"
id=
"Dart Analysis"
order=
"14"
weight=
"0.32855567"
/>
<window_info
anchor=
"bottom"
id=
"Dart Analysis"
order=
"14"
weight=
"0.32855567"
/>
<window_info
a
ctive=
"true"
anchor=
"bottom"
id=
"Run"
order=
"2"
sideWeight=
"0.49644473"
visible=
"true
"
weight=
"0.20384204"
/>
<window_info
a
nchor=
"bottom"
id=
"Run"
order=
"2"
sideWeight=
"0.49644473
"
weight=
"0.20384204"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"9"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"9"
/>
<window_info
a
nchor=
"bottom"
id=
"Terminal"
order=
"10"
sideWeight=
"0.49644473"
weight=
"0.2568908
6"
/>
<window_info
a
ctive=
"true"
anchor=
"bottom"
id=
"Terminal"
order=
"10"
sideWeight=
"0.49644473"
visible=
"true"
weight=
"0.256136
6"
/>
<window_info
anchor=
"right"
id=
"Flutter Outline"
order=
"3"
weight=
"0.32922077"
/>
<window_info
anchor=
"right"
id=
"Flutter Outline"
order=
"3"
weight=
"0.32922077"
/>
<window_info
anchor=
"bottom"
id=
"Logcat"
order=
"11"
/>
<window_info
anchor=
"bottom"
id=
"Logcat"
order=
"11"
/>
<window_info
id=
"Captures"
order=
"2"
weight=
"0.32936507"
/>
<window_info
id=
"Captures"
order=
"2"
weight=
"0.32936507"
/>
...
@@ -701,30 +688,6 @@
...
@@ -701,30 +688,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/main.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-10"
>
<caret
line=
"99"
lean-forward=
"true"
selection-start-line=
"99"
selection-end-line=
"99"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/CHANGELOG.md"
>
<provider
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"30"
>
<caret
line=
"2"
column=
"69"
lean-forward=
"true"
selection-start-line=
"2"
selection-start-column=
"2"
selection-end-line=
"2"
selection-end-column=
"73"
/>
</state>
</provider>
<provider
selected=
"true"
editor-type-id=
"split-provider[text-editor;MarkdownPreviewEditor]"
>
<state
split_layout=
"SPLIT"
>
<first_editor
relative-caret-position=
"30"
>
<caret
line=
"2"
column=
"3"
selection-start-line=
"2"
selection-start-column=
"3"
selection-end-line=
"2"
selection-end-column=
"3"
/>
</first_editor>
<second_editor>
<markdownNavigatorState
/>
</second_editor>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/android/build.gradle"
>
<entry
file=
"file://$PROJECT_DIR$/android/build.gradle"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"462"
>
<state
relative-caret-position=
"462"
>
...
@@ -750,7 +713,7 @@
...
@@ -750,7 +713,7 @@
</provider>
</provider>
<provider
selected=
"true"
editor-type-id=
"split-provider[text-editor;MarkdownPreviewEditor]"
>
<provider
selected=
"true"
editor-type-id=
"split-provider[text-editor;MarkdownPreviewEditor]"
>
<state
split_layout=
"SPLIT"
>
<state
split_layout=
"SPLIT"
>
<first_editor
relative-caret-position=
"
280
"
>
<first_editor
relative-caret-position=
"
471
"
>
<caret
line=
"592"
lean-forward=
"true"
selection-start-line=
"592"
selection-end-line=
"592"
/>
<caret
line=
"592"
lean-forward=
"true"
selection-start-line=
"592"
selection-end-line=
"592"
/>
</first_editor>
</first_editor>
<second_editor>
<second_editor>
...
@@ -759,6 +722,30 @@
...
@@ -759,6 +722,30 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/CHANGELOG.md"
>
<provider
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"30"
>
<caret
line=
"2"
column=
"69"
lean-forward=
"true"
selection-start-line=
"2"
selection-start-column=
"2"
selection-end-line=
"2"
selection-end-column=
"73"
/>
</state>
</provider>
<provider
selected=
"true"
editor-type-id=
"split-provider[text-editor;MarkdownPreviewEditor]"
>
<state
split_layout=
"SPLIT"
>
<first_editor
relative-caret-position=
"60"
>
<caret
line=
"4"
column=
"2"
selection-start-line=
"4"
selection-start-column=
"2"
selection-end-line=
"4"
selection-end-column=
"98"
/>
</first_editor>
<second_editor>
<markdownNavigatorState
/>
</second_editor>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/example/lib/main.dart"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"180"
>
<caret
line=
"13"
column=
"34"
lean-forward=
"true"
selection-start-line=
"13"
selection-start-column=
"34"
selection-end-line=
"13"
selection-end-column=
"34"
/>
</state>
</provider>
</entry>
</component>
</component>
<component
name=
"masterDetails"
>
<component
name=
"masterDetails"
>
<states>
<states>
...
...
example/lib/main.dart
View file @
5366078e
...
@@ -13,9 +13,9 @@ class MyInAppBrowser extends InAppBrowser {
...
@@ -13,9 +13,9 @@ class MyInAppBrowser extends InAppBrowser {
Future
onLoadStop
(
String
url
)
async
{
Future
onLoadStop
(
String
url
)
async
{
print
(
"
\n\n
Stopped
$url
\n\n
"
);
print
(
"
\n\n
Stopped
$url
\n\n
"
);
await
this
.
injectScriptCode
(
"window.flutter_inappbrowser.callHandler('handlerTest', 1, 5,'string', {'key': 5}, [4,6,8]);"
);
//
await this.injectScriptCode("window.flutter_inappbrowser.callHandler('handlerTest', 1, 5,'string', {'key': 5}, [4,6,8]);");
await
this
.
injectScriptCode
(
"window.flutter_inappbrowser.callHandler('handlerTest2', false, null, undefined);"
);
//
await this.injectScriptCode("window.flutter_inappbrowser.callHandler('handlerTest2', false, null, undefined);");
await
this
.
injectScriptCode
(
"setTimeout(function(){window.flutter_inappbrowser.callHandler('handlerTest', 'anotherString');}, 1000);"
);
//
await this.injectScriptCode("setTimeout(function(){window.flutter_inappbrowser.callHandler('handlerTest', 'anotherString');}, 1000);");
//
//
// await this.injectScriptCode("console.log({'testObject': 5});");
// await this.injectScriptCode("console.log({'testObject': 5});");
// await this.injectScriptCode("console.warn('testWarn',null);");
// await this.injectScriptCode("console.warn('testWarn',null);");
...
@@ -131,15 +131,15 @@ class _MyAppState extends State<MyApp> {
...
@@ -131,15 +131,15 @@ class _MyAppState extends State<MyApp> {
@override
@override
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
int
indexTest
=
inAppBrowserFallback
.
addJavaScriptHandler
(
"handlerTest"
,
(
arguments
)
async
{
//
int indexTest = inAppBrowserFallback.addJavaScriptHandler("handlerTest", (arguments) async {
print
(
"handlerTest arguments"
);
//
print("handlerTest arguments");
print
(
arguments
);
//
print(arguments);
});
//
});
int
indexTest2
=
inAppBrowserFallback
.
addJavaScriptHandler
(
"test2"
,
(
arguments
)
async
{
//
int indexTest2 = inAppBrowserFallback.addJavaScriptHandler("test2", (arguments) async {
print
(
"handlerTest2 arguments"
);
//
print("handlerTest2 arguments");
print
(
arguments
);
//
print(arguments);
inAppBrowserFallback
.
removeJavaScriptHandler
(
"test"
,
indexTest
);
//
inAppBrowserFallback.removeJavaScriptHandler("test", indexTest);
});
//
});
}
}
@override
@override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment