Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter-scheme
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-plugin
flutter-scheme
Commits
1019befc
Commit
1019befc
authored
Jun 09, 2021
by
汪林玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复intent.getData()为空
parent
deffc52e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
171 additions
and
17 deletions
+171
-17
android/src/main/java/com/app/scheme/FlutterSchemePlugin.java
...oid/src/main/java/com/app/scheme/FlutterSchemePlugin.java
+21
-14
example/pubspec.lock
example/pubspec.lock
+1
-1
ios/appscheme.podspec
ios/appscheme.podspec
+1
-1
pubspec.lock
pubspec.lock
+147
-0
pubspec.yaml
pubspec.yaml
+1
-1
No files found.
android/src/main/java/com/app/scheme/FlutterSchemePlugin.java
View file @
1019befc
...
@@ -104,21 +104,28 @@ public class FlutterSchemePlugin implements FlutterPlugin, MethodChannel.MethodC
...
@@ -104,21 +104,28 @@ public class FlutterSchemePlugin implements FlutterPlugin, MethodChannel.MethodC
String
action
=
intent
.
getAction
();
String
action
=
intent
.
getAction
();
if
(
Intent
.
ACTION_VIEW
.
equals
(
action
))
{
if
(
Intent
.
ACTION_VIEW
.
equals
(
action
))
{
Uri
schemeUri
=
intent
.
getData
();
Uri
schemeUri
=
intent
.
getData
();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
if
(
schemeUri
==
null
){
dataMap
.
put
(
"scheme"
,
schemeUri
.
getScheme
());
return
;
dataMap
.
put
(
"host"
,
schemeUri
.
getHost
());
dataMap
.
put
(
"port"
,
schemeUri
.
getPort
());
dataMap
.
put
(
"path"
,
schemeUri
.
getPath
());
dataMap
.
put
(
"query"
,
schemeUri
.
getQuery
());
dataMap
.
put
(
"source"
,
"android"
);
dataMap
.
put
(
"dataString"
,
intent
.
getDataString
());
if
(
initialIntent
){
initialScheme
=
dataMap
;
initialIntent
=
false
;
}
}
latestScheme
=
dataMap
;
try
{
if
(
eventSink
!=
null
){
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
eventSink
.
success
(
dataMap
);
dataMap
.
put
(
"scheme"
,
schemeUri
.
getScheme
());
dataMap
.
put
(
"host"
,
schemeUri
.
getHost
());
dataMap
.
put
(
"port"
,
schemeUri
.
getPort
());
dataMap
.
put
(
"path"
,
schemeUri
.
getPath
());
dataMap
.
put
(
"query"
,
schemeUri
.
getQuery
());
dataMap
.
put
(
"source"
,
"android"
);
dataMap
.
put
(
"dataString"
,
intent
.
getDataString
());
if
(
initialIntent
){
initialScheme
=
dataMap
;
initialIntent
=
false
;
}
latestScheme
=
dataMap
;
if
(
eventSink
!=
null
){
eventSink
.
success
(
dataMap
);
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
}
}
}
}
...
...
example/pubspec.lock
View file @
1019befc
...
@@ -7,7 +7,7 @@ packages:
...
@@ -7,7 +7,7 @@ packages:
path: ".."
path: ".."
relative: true
relative: true
source: path
source: path
version: "1.0.
1
"
version: "1.0.
2
"
async:
async:
dependency: transitive
dependency: transitive
description:
description:
...
...
ios/appscheme.podspec
View file @
1019befc
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#
#
Pod
::
Spec
.
new
do
|
s
|
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
'appscheme'
s
.
name
=
'appscheme'
s
.
version
=
'
0.0.1
'
s
.
version
=
'
1.0.2
'
s
.
summary
=
'A new flutter plugin project.'
s
.
summary
=
'A new flutter plugin project.'
s
.
description
=
<<-
DESC
s
.
description
=
<<-
DESC
A new flutter plugin project.
A new flutter plugin project.
...
...
pubspec.lock
0 → 100644
View file @
1019befc
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.5.0-nullsafety.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0-nullsafety.1"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.3"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0-nullsafety.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0-nullsafety.3"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0-nullsafety.1"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10-nullsafety.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0-nullsafety.3"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0-nullsafety.1"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0-nullsafety.2"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0-nullsafety.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0-nullsafety.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.19-nullsafety.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0-nullsafety.3"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0-nullsafety.3"
sdks:
dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.20.0"
pubspec.yaml
View file @
1019befc
name
:
appscheme
name
:
appscheme
description
:
Android、iOS自定义Scheme URL方案
description
:
Android、iOS自定义Scheme URL方案
version
:
1.0.
1
version
:
1.0.
2
#author: ScottWang
#author: ScottWang
homepage
:
http://scott-cry.win/
homepage
:
http://scott-cry.win/
...
...
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