Commit 0d25bc98 authored by 林生雨's avatar 林生雨

commit

parent 2c0efeea
...@@ -2,7 +2,7 @@ package io.flutter.plugins; ...@@ -2,7 +2,7 @@ package io.flutter.plugins;
import io.flutter.plugin.common.PluginRegistry; import io.flutter.plugin.common.PluginRegistry;
import com.taobao.idlefish.flutterboost.FlutterBoostPlugin; import com.taobao.idlefish.flutterboost.FlutterBoostPlugin;
import com.bigbug.mmkvflutter.MmkvFlutterPlugin; import io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin;
import fleamarket.taobao.com.xservicekit.XserviceKitPlugin; import fleamarket.taobao.com.xservicekit.XserviceKitPlugin;
/** /**
...@@ -14,7 +14,7 @@ public final class GeneratedPluginRegistrant { ...@@ -14,7 +14,7 @@ public final class GeneratedPluginRegistrant {
return; return;
} }
FlutterBoostPlugin.registerWith(registry.registrarFor("com.taobao.idlefish.flutterboost.FlutterBoostPlugin")); FlutterBoostPlugin.registerWith(registry.registrarFor("com.taobao.idlefish.flutterboost.FlutterBoostPlugin"));
MmkvFlutterPlugin.registerWith(registry.registrarFor("com.bigbug.mmkvflutter.MmkvFlutterPlugin")); SharedPreferencesPlugin.registerWith(registry.registrarFor("io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin"));
XserviceKitPlugin.registerWith(registry.registrarFor("fleamarket.taobao.com.xservicekit.XserviceKitPlugin")); XserviceKitPlugin.registerWith(registry.registrarFor("fleamarket.taobao.com.xservicekit.XserviceKitPlugin"));
} }
......
sdk.dir=/Users/apple/Library/Android/sdk sdk.dir=/Users/apple/Library/Android/sdk
flutter.sdk=/Users/apple/Downloads/flutter flutter.sdk=/Users/apple/Downloads/flutter
\ No newline at end of file flutter.buildMode=release
flutter.versionName=1.0.0
flutter.versionCode=1
\ No newline at end of file
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
#import "GeneratedPluginRegistrant.h" #import "GeneratedPluginRegistrant.h"
#import <flutter_boost/FlutterBoostPlugin.h> #import <flutter_boost/FlutterBoostPlugin.h>
#import <mmkv_flutter/MmkvFlutterPlugin.h> #import <shared_preferences/SharedPreferencesPlugin.h>
#import <xservice_kit/XserviceKitPlugin.h> #import <xservice_kit/XserviceKitPlugin.h>
@implementation GeneratedPluginRegistrant @implementation GeneratedPluginRegistrant
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry { + (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
[FlutterBoostPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterBoostPlugin"]]; [FlutterBoostPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterBoostPlugin"]];
[MmkvFlutterPlugin registerWithRegistrar:[registry registrarForPlugin:@"MmkvFlutterPlugin"]]; [FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]];
[XserviceKitPlugin registerWithRegistrar:[registry registrarForPlugin:@"XserviceKitPlugin"]]; [XserviceKitPlugin registerWithRegistrar:[registry registrarForPlugin:@"XserviceKitPlugin"]];
} }
......
...@@ -18,6 +18,6 @@ Depends on all your plugins, and provides a function to register them. ...@@ -18,6 +18,6 @@ Depends on all your plugins, and provides a function to register them.
s.public_header_files = './Classes/**/*.h' s.public_header_files = './Classes/**/*.h'
s.dependency 'Flutter' s.dependency 'Flutter'
s.dependency 'flutter_boost' s.dependency 'flutter_boost'
s.dependency 'mmkv_flutter' s.dependency 'shared_preferences'
s.dependency 'xservice_kit' s.dependency 'xservice_kit'
end end
...@@ -2,20 +2,26 @@ ...@@ -2,20 +2,26 @@
* @author lsy * @author lsy
* @date 2019-09-04 * @date 2019-09-04
**/ **/
import 'package:mmkv_flutter/mmkv_flutter.dart'; //import 'package:mmkv_flutter/mmkv_flutter.dart';
//TODO
import 'package:shared_preferences/shared_preferences.dart';
class MmKvUtil { class MmKvUtil {
static MmkvFlutter _mmkv;
// static MmkvFlutter _mmkv;
static MmKvUtil mmKvUtil; static MmKvUtil mmKvUtil;
static SharedPreferences _mmkv;
MmKvUtil._(MmkvFlutter mmkv) { //MmkvFlutter mmkv
MmKvUtil._(mmkv) {
_mmkv = mmkv; _mmkv = mmkv;
} }
static Future<MmKvUtil> getInstance() async { static Future<MmKvUtil> getInstance() async {
if (mmKvUtil == null) { if (mmKvUtil == null) {
final MmkvFlutter _mmkv = await MmkvFlutter.getInstance(); final SharedPreferences _mmkv = await SharedPreferences.getInstance();
// final MmkvFlutter _mmkv = await MmkvFlutter.getInstance();
// _mmkv
mmKvUtil = new MmKvUtil._(_mmkv); mmKvUtil = new MmKvUtil._(_mmkv);
} }
return mmKvUtil; return mmKvUtil;
...@@ -56,5 +62,4 @@ class MmKvUtil { ...@@ -56,5 +62,4 @@ class MmKvUtil {
Future<bool> clearKv() async { Future<bool> clearKv() async {
return await _mmkv.clear(); return await _mmkv.clear();
} }
} }
...@@ -21,12 +21,12 @@ class UserState extends State<UserWidget> { ...@@ -21,12 +21,12 @@ class UserState extends State<UserWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( // return Scaffold(
body: ALRootInheritWideget( // body: ALRootInheritWideget(
model: _model, // model: _model,
child: Center( // child: Center(
child: Text(_model.text), // child: Text(_model.text),
), // ),
)); // ));
} }
} }
...@@ -168,14 +168,12 @@ packages: ...@@ -168,14 +168,12 @@ packages:
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_boost: flutter_boost:
dependency: "direct dev" dependency: "direct main"
description: description:
path: "." name: flutter_boost
ref: "0.0.411" url: "https://pub.flutter-io.cn"
resolved-ref: "3978c43c31c1c29b569724fd330b367caa459acc" source: hosted
url: "https://github.com/alibaba/flutter_boost.git" version: "0.0.420"
source: git
version: "0.0.411"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
...@@ -286,13 +284,6 @@ packages: ...@@ -286,13 +284,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.9.6+3" version: "0.9.6+3"
mmkv_flutter:
dependency: "direct main"
description:
name: mmkv_flutter
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.10"
package_config: package_config:
dependency: transitive dependency: transitive
description: description:
...@@ -363,6 +354,13 @@ packages: ...@@ -363,6 +354,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.22.0" version: "0.22.0"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.3"
shelf: shelf:
dependency: transitive dependency: transitive
description: description:
......
...@@ -30,9 +30,10 @@ dependencies: ...@@ -30,9 +30,10 @@ dependencies:
rxdart: ^0.22.0 #链式编程 rxdart: ^0.22.0 #链式编程
# json_serializable: ^3.0.0 #json to model # json_serializable: ^3.0.0 #json to model
pull_to_refresh: ^1.5.0 pull_to_refresh: ^1.5.0
# shared_preferences: ^0.4.3 shared_preferences: ^0.4.3
# flutter_easyrefresh: ^1.2.7 # 上拉下拉刷新组件 # flutter_easyrefresh: ^1.2.7 # 上拉下拉刷新组件
mmkv_flutter: ^1.0.10 # mmkv_flutter: ^1.0.10
flutter_boost: ^0.0.411
...@@ -43,11 +44,7 @@ dev_dependencies: ...@@ -43,11 +44,7 @@ dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_boost:
git:
url: 'https://github.com/alibaba/flutter_boost.git'
ref: '0.0.411'
# native_flutter_transfer_plugin: # native_flutter_transfer_plugin:
# git: # git:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment