Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flutter_plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
flutter_plugin
Commits
900f5e18
Commit
900f5e18
authored
5 years ago
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
65d6fd04
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
4 deletions
+31
-4
workspace.xml
.idea/workspace.xml
+0
-0
GengmeiFlutterPlugin.kt
...om/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt
+6
-3
main.dart
example/lib/main.dart
+9
-1
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+16
-0
No files found.
.idea/workspace.xml
View file @
900f5e18
This diff is collapsed.
Click to expand it.
android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt
View file @
900f5e18
...
@@ -43,6 +43,7 @@ class GengmeiFlutterPlugin : MethodCallHandler {
...
@@ -43,6 +43,7 @@ class GengmeiFlutterPlugin : MethodCallHandler {
private
var
record
:
HashMap
<
String
,
ArrayList
<
HashMap
<
String
,
Any
>>>?
=
null
;
private
var
record
:
HashMap
<
String
,
ArrayList
<
HashMap
<
String
,
Any
>>>?
=
null
;
var
nativeImage
:
File
?
=
null
var
nativeImage
:
File
?
=
null
var
isTaskingExectured
:
Boolean
=
false
;
var
isTaskingExectured
:
Boolean
=
false
;
@Volatile
var
quit_page
=
false
;
var
quit_page
=
false
;
companion
object
{
companion
object
{
...
@@ -257,9 +258,11 @@ class GengmeiFlutterPlugin : MethodCallHandler {
...
@@ -257,9 +258,11 @@ class GengmeiFlutterPlugin : MethodCallHandler {
fun
savePreview
()
{
fun
savePreview
()
{
ImageRespository
.
getInstance
().
savePreviewImg
(
resign
.
context
().
applicationContext
,
object
:
ImageRespository
.
savePreviewListener
{
ImageRespository
.
getInstance
().
savePreviewImg
(
resign
.
context
().
applicationContext
,
object
:
ImageRespository
.
savePreviewListener
{
override
fun
onSuccess
(
data
:
HashMap
<
String
,
ArrayList
<
HashMap
<
String
,
Any
>>>)
{
override
fun
onSuccess
(
data
:
HashMap
<
String
,
ArrayList
<
HashMap
<
String
,
Any
>>>)
{
Handler
(
resign
.
activeContext
().
applicationContext
.
mainLooper
).
post
{
if
(!
quit_page
)
{
listener
?.
run
{
Handler
(
resign
.
activeContext
().
applicationContext
.
mainLooper
).
post
{
this
.
success
(
data
)
listener
?.
run
{
this
.
success
(
data
)
}
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
example/lib/main.dart
View file @
900f5e18
...
@@ -21,7 +21,15 @@ class _MyAppState extends State<MyApp> {
...
@@ -21,7 +21,15 @@ class _MyAppState extends State<MyApp> {
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
// GengmeiFlutterPlugin.saveInt("INT", 5);
// GengmeiFlutterPlugin.clearShare().then((value){
// print("CLEAR ---> $value");
// });
// GengmeiFlutterPlugin.saveInt("INT", 6).then((value){
// print("VALUEEE --> $value");
// });
// GengmeiFlutterPlugin.getInt("INT", 0).then((value){
// print("get VALUEEE --> $value");
// });
// GengmeiFlutterPlugin.saveString("STRINGQW", "qwe");
// GengmeiFlutterPlugin.saveString("STRINGQW", "qwe");
// GengmeiFlutterPlugin.saveDouble("DOUBLE", 2.888);
// GengmeiFlutterPlugin.saveDouble("DOUBLE", 2.888);
// GengmeiFlutterPlugin.saveBool("BOOLEAN", false);
// GengmeiFlutterPlugin.saveBool("BOOLEAN", false);
...
...
This diff is collapsed.
Click to expand it.
ios/Classes/GengmeiFlutterPlugin.m
View file @
900f5e18
...
@@ -200,12 +200,28 @@ FlutterEventSink _eventSink;
...
@@ -200,12 +200,28 @@ FlutterEventSink _eventSink;
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
temp
]
:
result
];
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
temp
]
:
result
];
});
});
});
});
}
else
if
([
@"CLEAR_SHARE"
isEqualToString
:
call
.
method
]){
long
temp
=
self
.
resultKey
;
dispatch_async
(
queue
,
^
{
[
self
clearAllUserDefaultsData
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
temp
]
:
@YES
];
});
});
}
}
else
{
else
{
result
(
FlutterMethodNotImplemented
);
result
(
FlutterMethodNotImplemented
);
}
}
}
}
-
(
void
)
clearAllUserDefaultsData
{
NSUserDefaults
*
userDefaults
=
[
NSUserDefaults
standardUserDefaults
];
NSDictionary
*
dic
=
[
userDefaults
dictionaryRepresentation
];
for
(
id
key
in
dic
)
{
[
userDefaults
removeObjectForKey
:
key
];
}
[
userDefaults
synchronize
];
}
-
(
void
)
nativeCamera
{
-
(
void
)
nativeCamera
{
...
...
This diff is collapsed.
Click to expand it.
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