Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sharetrace_flutter_plugin
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
sharetrace_flutter_plugin
Commits
2d382993
Commit
2d382993
authored
Oct 20, 2021
by
汪林玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dart >=2.12.0 <3.0.0
parent
af0efb47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
83 deletions
+35
-83
lib/sharetrace_flutter_plugin.dart
lib/sharetrace_flutter_plugin.dart
+12
-21
pubspec.lock
pubspec.lock
+20
-20
pubspec.yaml
pubspec.yaml
+3
-42
No files found.
lib/sharetrace_flutter_plugin.dart
View file @
2d382993
...
...
@@ -7,42 +7,33 @@ typedef Future<dynamic> ResponseHandler(Map<String, String> data);
class
SharetraceFlutterPlugin
{
static
const
MethodChannel
_channel
=
const
MethodChannel
(
'sharetrace_flutter_plugin'
);
static
final
SharetraceFlutterPlugin
_instance
=
SharetraceFlutterPlugin
.
_internal
();
static
SharetraceFlutterPlugin
_instance
;
SharetraceFlutterPlugin
.
_internal
()
{
_channel
.
setMethodCallHandler
(
_onMethodHandle
);
}
factory
SharetraceFlutterPlugin
.
getInstance
()
=>
_getInstance
();
static
_getInstance
()
{
if
(
_instance
==
null
)
{
_instance
=
SharetraceFlutterPlugin
.
_internal
();
}
return
_instance
;
}
factory
SharetraceFlutterPlugin
.
getInstance
()
=>
_getInstance
();
void
init
(){
_channel
.
invokeMethod
(
"init"
);
}
Future
defaultHandler
()
async
{}
ResponseHandler
_installRespHandler
;
ResponseHandler
_wakeupRespHandler
;
late
ResponseHandler
_installRespHandler
;
late
ResponseHandler
_wakeupRespHandler
;
Future
<
Null
>
_onMethodHandle
(
MethodCall
call
)
async
{
Future
_onMethodHandle
(
MethodCall
call
)
async
{
if
(
call
.
method
==
"onInstallResponse"
)
{
if
(
_installRespHandler
!=
null
)
{
return
_installRespHandler
(
call
.
arguments
.
cast
<
String
,
String
>());
}
return
defaultHandler
();
return
_installRespHandler
(
call
.
arguments
.
cast
<
String
,
String
>());
}
else
if
(
call
.
method
==
"onWakeupResponse"
)
{
if
(
_wakeupRespHandler
!=
null
)
{
return
_wakeupRespHandler
(
call
.
arguments
.
cast
<
String
,
String
>());
}
return
defaultHandler
();
return
_wakeupRespHandler
(
call
.
arguments
.
cast
<
String
,
String
>());
}
}
void
init
(){
_channel
.
invokeMethod
(
"init"
);
}
void
registerWakeupHandler
(
ResponseHandler
responseHandler
)
{
_wakeupRespHandler
=
responseHandler
;
...
...
pubspec.lock
View file @
2d382993
...
...
@@ -7,49 +7,49 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.
5.0-nullsafety
.1"
version: "2.
8
.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0
-nullsafety.1
"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0
-nullsafety.3
"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.
2.0-nullsafety
.1"
version: "1.
3
.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0
-nullsafety.1
"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0
-nullsafety.3
"
version: "1.15.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0
-nullsafety.1
"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
...
...
@@ -66,21 +66,21 @@ packages:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10
-nullsafety.1
"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.
3.0-nullsafety.3
"
version: "1.
7.0
"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0
-nullsafety.1
"
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
...
...
@@ -92,56 +92,56 @@ packages:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.
0-nullsafety.2
"
version: "1.8.
1
"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.0
-nullsafety.1
"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0
-nullsafety.1
"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0
-nullsafety.1
"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0
-nullsafety.1
"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.
2.19-nullsafety
.2"
version: "0.
4
.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0
-nullsafety.3
"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0
-nullsafety.3
"
version: "2.1.0"
sdks:
dart: ">=2.1
0.0-110 <2.11
.0"
flutter: ">=
1.1
0.0"
dart: ">=2.1
2.0 <3.0
.0"
flutter: ">=
2.
0.0"
pubspec.yaml
View file @
2d382993
...
...
@@ -4,8 +4,8 @@ version: 1.5.5
homepage
:
https://www.sharetrace.com/
environment
:
sdk
:
"
>=2.
7
.0
<3.0.0"
flutter
:
"
>=
1.1
0.0"
sdk
:
"
>=2.
12
.0
<3.0.0"
flutter
:
"
>=
2.
0.0"
dependencies
:
flutter
:
...
...
@@ -15,50 +15,11 @@ dev_dependencies:
flutter_test
:
sdk
:
flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter
:
# This section identifies this Flutter project as a plugin project.
# The 'pluginClass' and Android 'package' identifiers should not ordinarily
# be modified. They are used by the tooling to maintain consistency when
# adding or updating assets for this project.
plugin
:
platforms
:
android
:
package
:
com.sharetrace.sharetrace_flutter_plugin
pluginClass
:
SharetraceFlutterPlugin
ios
:
pluginClass
:
SharetraceFlutterPlugin
# To add assets to your plugin package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.dev/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# To add custom fonts to your plugin package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.dev/custom-fonts/#from-packages
pluginClass
:
SharetraceFlutterPlugin
\ No newline at end of file
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