mirror of
https://gitee.com/farsunset/cim.git
synced 2025-07-12 19:39:06 +08:00
commit
2ba80c85cf
2
cim-client-sdk/cim-flutter-sdk/.flutter-plugins
Normal file
2
cim-client-sdk/cim-flutter-sdk/.flutter-plugins
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# This is a generated file; do not edit or check into version control.
|
||||||
|
device_info_plus=C:\\Users\\smeb\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\device_info_plus-8.2.2\\
|
@ -0,0 +1 @@
|
|||||||
|
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-8.2.2\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-8.2.2\\\\","native_build":false,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info_plus-8.2.2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]}],"date_created":"2023-07-04 15:53:37.990976","version":"3.7.7"}
|
@ -1,3 +1,3 @@
|
|||||||
## 0.0.1
|
## 1.0.1
|
||||||
|
|
||||||
* TODO: Describe initial release.
|
* 支持所有平台
|
||||||
|
@ -1 +1,25 @@
|
|||||||
TODO: Add your license here.
|
Copyright 2022 The SDK Authors. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
* Neither the name of Google Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1,18 +1,48 @@
|
|||||||
# cim_flutter_sdk
|
# cim_flutter_sdk
|
||||||
|
|
||||||
A new Flutter plugin project.
|
开源通讯库 [CIM](https://gitee.com/farsunset/cim) 的 flutter版本SDK
|
||||||
|
|
||||||
## Getting Started
|
## 如何在自己的项目中引用SDK
|
||||||
|
|
||||||
This project is a starting point for a Flutter
|
在 pubspec.yaml 引入
|
||||||
[plug-in package](https://flutter.dev/developing-packages/),
|
|
||||||
a specialized package that includes platform-specific implementation code for
|
|
||||||
Android and/or iOS.
|
|
||||||
|
|
||||||
For help getting started with Flutter development, view the
|
|
||||||
[online documentation](https://flutter.dev/docs), which offers tutorials,
|
|
||||||
samples, guidance on mobile development, and a full API reference.
|
|
||||||
|
|
||||||
The plugin project was generated without specifying the `--platforms` flag, no platforms are currently supported.
|
```
|
||||||
To add platforms, run `flutter create -t plugin --platforms <platforms> .` in this directory.
|
dependencies:
|
||||||
You can also find a detailed instruction on how to add platforms in the `pubspec.yaml` at https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms.
|
cim_flutter_sdk:^1.0.1
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## 如何使用
|
||||||
|
|
||||||
|
```
|
||||||
|
import 'package:cim_flutter_sdk/cim_socket.dart';
|
||||||
|
...
|
||||||
|
|
||||||
|
final CIMSocket cimSocket = CIMSocket();
|
||||||
|
|
||||||
|
String Message = 'Unknown';
|
||||||
|
|
||||||
|
cimSocket.init('127.0.0.1', 34567, 16501516154949);
|
||||||
|
cimSocket.connect();
|
||||||
|
cimSocket.addListener(() {
|
||||||
|
if (cimSocket.model == null) return;
|
||||||
|
setState(() {
|
||||||
|
Message = cimSocket.model!.toProto3Json().toString();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
return MaterialApp(
|
||||||
|
home: Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('Plugin example app'),
|
||||||
|
),
|
||||||
|
body: Center(
|
||||||
|
child: Text('Message is: $Message\n'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
```
|
||||||
|
30
cim-client-sdk/cim-flutter-sdk/example/.metadata
Normal file
30
cim-client-sdk/cim-flutter-sdk/example/.metadata
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# This file tracks properties of this Flutter project.
|
||||||
|
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||||
|
#
|
||||||
|
# This file should be version controlled.
|
||||||
|
|
||||||
|
version:
|
||||||
|
revision: 2ad6cd72c040113b47ee9055e722606a490ef0da
|
||||||
|
channel: stable
|
||||||
|
|
||||||
|
project_type: app
|
||||||
|
|
||||||
|
# Tracks metadata for the flutter migrate command
|
||||||
|
migration:
|
||||||
|
platforms:
|
||||||
|
- platform: root
|
||||||
|
create_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da
|
||||||
|
base_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da
|
||||||
|
- platform: windows
|
||||||
|
create_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da
|
||||||
|
base_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da
|
||||||
|
|
||||||
|
# User provided section
|
||||||
|
|
||||||
|
# List of Local paths (relative to this file) that should be
|
||||||
|
# ignored by the migrate tool.
|
||||||
|
#
|
||||||
|
# Files that are not part of the templates will be ignored by default.
|
||||||
|
unmanaged_files:
|
||||||
|
- 'lib/main.dart'
|
||||||
|
- 'ios/Runner.xcodeproj/project.pbxproj'
|
@ -1,9 +1,8 @@
|
|||||||
import 'package:cim_flutter_sdk/CimSocket.dart';
|
import 'package:cim_flutter_sdk/cim_socket.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:cim_flutter_sdk/cim_flutter_sdk.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
@ -18,26 +17,22 @@ class MyApp extends StatefulWidget {
|
|||||||
|
|
||||||
class _MyAppState extends State<MyApp> {
|
class _MyAppState extends State<MyApp> {
|
||||||
String Message = 'Unknown';
|
String Message = 'Unknown';
|
||||||
final _cimFlutterSdkPlugin = CimFlutterSdk();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
initCimState();
|
initCimState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final CIMSocket cimSocket = CIMSocket();
|
||||||
// Platform messages are asynchronous, so we initialize in an async method.
|
// Platform messages are asynchronous, so we initialize in an async method.
|
||||||
Future<void> initCimState() async {
|
Future<void> initCimState() async {
|
||||||
CIMSocket cimSocket;
|
|
||||||
// Platform messages may fail, so we use a try/catch PlatformException.
|
// Platform messages may fail, so we use a try/catch PlatformException.
|
||||||
// We also handle the message potentially returning null.
|
// We also handle the message potentially returning null.
|
||||||
try {
|
try {
|
||||||
cimSocket = await _cimFlutterSdkPlugin.connect(
|
cimSocket.init('api.hoxin.farsunset.com', 34567, 16501516154949);
|
||||||
'127.0.0.1', 23456, 16501516154949);
|
cimSocket.connect();
|
||||||
cimSocket.addListener(() {
|
cimSocket.addListener(() {
|
||||||
print(cimSocket.model!.toProto3Json());
|
if (cimSocket.model == null) return;
|
||||||
if (!mounted) return;
|
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
Message = cimSocket.model!.toProto3Json().toString();
|
Message = cimSocket.model!.toProto3Json().toString();
|
||||||
});
|
});
|
||||||
|
@ -31,7 +31,7 @@ packages:
|
|||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "0.0.1"
|
version: "1.0.1"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
// platforms in the `pubspec.yaml` at
|
// platforms in the `pubspec.yaml` at
|
||||||
// https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms.
|
// https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms.
|
||||||
|
|
||||||
import 'CimSocket.dart';
|
import 'cim_socket.dart';
|
||||||
import 'cim_flutter_sdk_platform_interface.dart';
|
|
||||||
|
|
||||||
class CimFlutterSdk {
|
class CimFlutterSdk {
|
||||||
final CIMSocket cimSocket = CIMSocket();
|
final CIMSocket cimSocket = CIMSocket();
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
// ignore: file_names
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
@ -9,9 +8,9 @@ import 'package:crypto/crypto.dart';
|
|||||||
import 'package:device_info_plus/device_info_plus.dart';
|
import 'package:device_info_plus/device_info_plus.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import './Message.pb.dart' as Message;
|
import './Message.pb.dart' as messages;
|
||||||
import './ReplyBody.pb.dart' as ReplyBody;
|
import './ReplyBody.pb.dart' as replybody;
|
||||||
import './SentBody.pb.dart' as SentBody;
|
import './SentBody.pb.dart' as sentbody;
|
||||||
import 'package:fixnum/fixnum.dart';
|
import 'package:fixnum/fixnum.dart';
|
||||||
import 'package:convert/convert.dart';
|
import 'package:convert/convert.dart';
|
||||||
|
|
||||||
@ -37,7 +36,7 @@ const PING_TYPE = 1;
|
|||||||
// ignore: constant_identifier_names
|
// ignore: constant_identifier_names
|
||||||
const DATA_HEADER_LENGTH = 1;
|
const DATA_HEADER_LENGTH = 1;
|
||||||
|
|
||||||
const SOCKET_APP_VERSION = '100';
|
const sOCKETAPPVERSION = '100';
|
||||||
|
|
||||||
class CIMSocket extends ChangeNotifier {
|
class CIMSocket extends ChangeNotifier {
|
||||||
late Socket? socket;
|
late Socket? socket;
|
||||||
@ -49,11 +48,15 @@ class CIMSocket extends ChangeNotifier {
|
|||||||
late TimerUtil timer = TimerUtil()
|
late TimerUtil timer = TimerUtil()
|
||||||
..mTotalTime = 10000
|
..mTotalTime = 10000
|
||||||
..setOnTimerTickCallback((millisUntilFinished) {
|
..setOnTimerTickCallback((millisUntilFinished) {
|
||||||
connect();
|
if (millisUntilFinished == 0 && uid != null) {
|
||||||
|
connect();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
late bool isConnected = false;
|
late bool isConnected = false;
|
||||||
|
|
||||||
late Message.Model? model = null;
|
late messages.Model? _model = null;
|
||||||
|
|
||||||
|
messages.Model? get model => _model;
|
||||||
|
|
||||||
Future init(String uri, int port, int uid) async {
|
Future init(String uri, int port, int uid) async {
|
||||||
this.uri = uri;
|
this.uri = uri;
|
||||||
@ -75,47 +78,39 @@ class CIMSocket extends ChangeNotifier {
|
|||||||
sendPong();
|
sendPong();
|
||||||
} else if (data[0] == REPLY_BODY) {
|
} else if (data[0] == REPLY_BODY) {
|
||||||
var message = data.sublist(3, length + 3);
|
var message = data.sublist(3, length + 3);
|
||||||
ReplyBody.Model info = ReplyBody.Model();
|
replybody.Model info = replybody.Model();
|
||||||
info.mergeFromBuffer(message);
|
info.mergeFromBuffer(message);
|
||||||
} else if (data[0] == Message_TYPE) {
|
} else if (data[0] == Message_TYPE) {
|
||||||
var message = data.sublist(3, length + 3);
|
var message = data.sublist(3, length + 3);
|
||||||
Message.Model model = Message.Model();
|
messages.Model model = messages.Model();
|
||||||
model.mergeFromBuffer(message);
|
model.mergeFromBuffer(message);
|
||||||
switchMessage(model);
|
switchMessage(model);
|
||||||
}
|
}
|
||||||
}, onError: (error, StackTrace trace) {
|
}, onError: (error, StackTrace trace) {
|
||||||
print('CIMSocket error');
|
|
||||||
socket = null;
|
socket = null;
|
||||||
isConnected = false;
|
isConnected = false;
|
||||||
if (!timer.isActive()) {
|
if (!timer.isActive()) {
|
||||||
timer.startTimer();
|
timer.setTotalTime(12000);
|
||||||
|
timer.startCountDown();
|
||||||
}
|
}
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}, onDone: () {
|
}, onDone: () {
|
||||||
print('CIMSocket done');
|
|
||||||
socket = null;
|
socket = null;
|
||||||
isConnected = false;
|
isConnected = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
if (endCode != "999") {
|
if (endCode != "999") {
|
||||||
if (!timer.isActive()) {
|
timer.setTotalTime(12000);
|
||||||
timer.startTimer();
|
timer.startCountDown();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, cancelOnError: true);
|
}, cancelOnError: true);
|
||||||
socket = sock;
|
socket = sock;
|
||||||
sendLoginMsg();
|
sendLoginMsg();
|
||||||
}).catchError((e) {
|
}).catchError((e) {
|
||||||
print('CIMSocket catcherror');
|
|
||||||
print('Unable to connect: $e');
|
|
||||||
socket = null;
|
socket = null;
|
||||||
isConnected = false;
|
isConnected = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
// Future.delayed(Duration(milliseconds: 3000), () {
|
timer.setTotalTime(12000);
|
||||||
// connect();
|
timer.startCountDown();
|
||||||
// });
|
|
||||||
if (!timer.isActive()) {
|
|
||||||
timer.startTimer();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +136,7 @@ class CIMSocket extends ChangeNotifier {
|
|||||||
Map<String, String> map = {
|
Map<String, String> map = {
|
||||||
"uid": uid.toString(), //主id
|
"uid": uid.toString(), //主id
|
||||||
"channel": channel,
|
"channel": channel,
|
||||||
"appVersion": SOCKET_APP_VERSION,
|
"appVersion": sOCKETAPPVERSION,
|
||||||
"osVersion": systemVersion,
|
"osVersion": systemVersion,
|
||||||
"packageName": "cn.asihe.cim",
|
"packageName": "cn.asihe.cim",
|
||||||
"deviceId": deviceId,
|
"deviceId": deviceId,
|
||||||
@ -151,7 +146,7 @@ class CIMSocket extends ChangeNotifier {
|
|||||||
};
|
};
|
||||||
int time = DateTime.now().millisecondsSinceEpoch;
|
int time = DateTime.now().millisecondsSinceEpoch;
|
||||||
Int64 timeStamp = Int64.parseInt(time.toString());
|
Int64 timeStamp = Int64.parseInt(time.toString());
|
||||||
var body = SentBody.Model(data: map);
|
var body = sentbody.Model(data: map);
|
||||||
body.key = "client_bind";
|
body.key = "client_bind";
|
||||||
body.timestamp = timeStamp;
|
body.timestamp = timeStamp;
|
||||||
var data = body.writeToBuffer();
|
var data = body.writeToBuffer();
|
||||||
@ -162,7 +157,6 @@ class CIMSocket extends ChangeNotifier {
|
|||||||
protobuf.setRange(3, data.length + 3, data);
|
protobuf.setRange(3, data.length + 3, data);
|
||||||
socket!.add(protobuf);
|
socket!.add(protobuf);
|
||||||
await socket!.flush();
|
await socket!.flush();
|
||||||
print('CIMSocket login finished');
|
|
||||||
isConnected = true;
|
isConnected = true;
|
||||||
if (timer.isActive()) {
|
if (timer.isActive()) {
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
@ -175,7 +169,7 @@ class CIMSocket extends ChangeNotifier {
|
|||||||
Map<String, String> map1 = {"tag": tag};
|
Map<String, String> map1 = {"tag": tag};
|
||||||
int time = DateTime.now().millisecondsSinceEpoch;
|
int time = DateTime.now().millisecondsSinceEpoch;
|
||||||
Int64 timeStamp = Int64.parseInt(time.toString());
|
Int64 timeStamp = Int64.parseInt(time.toString());
|
||||||
var body = SentBody.Model(data: map1);
|
var body = sentbody.Model(data: map1);
|
||||||
body.key = "client_set_tag";
|
body.key = "client_set_tag";
|
||||||
body.timestamp = timeStamp;
|
body.timestamp = timeStamp;
|
||||||
var data = body.writeToBuffer();
|
var data = body.writeToBuffer();
|
||||||
@ -186,23 +180,22 @@ class CIMSocket extends ChangeNotifier {
|
|||||||
protobuf.setRange(3, data.length + 3, data);
|
protobuf.setRange(3, data.length + 3, data);
|
||||||
socket!.add(protobuf);
|
socket!.add(protobuf);
|
||||||
await socket!.flush();
|
await socket!.flush();
|
||||||
print('CIMSocket bind chattingTag Success!');
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//发送PONG响应
|
//发送PONG响应
|
||||||
Future sendPong() async {
|
Future sendPong() async {
|
||||||
var PONG = Uint8List(7);
|
var pONG = Uint8List(7);
|
||||||
var PONG_BODY = Uint8List(4);
|
var pONGBODY = Uint8List(4);
|
||||||
PONG_BODY[0] = 80;
|
pONGBODY[0] = 80;
|
||||||
PONG_BODY[1] = 79;
|
pONGBODY[1] = 79;
|
||||||
PONG_BODY[2] = 78;
|
pONGBODY[2] = 78;
|
||||||
PONG_BODY[3] = 71;
|
pONGBODY[3] = 71;
|
||||||
PONG[0] = PONG_TYPE;
|
pONG[0] = PONG_TYPE;
|
||||||
PONG[1] = (PONG_BODY.length & 0xff);
|
pONG[1] = (pONGBODY.length & 0xff);
|
||||||
PONG[2] = ((PONG_BODY.length >> 8) & 0xff);
|
pONG[2] = ((pONGBODY.length >> 8) & 0xff);
|
||||||
PONG.setRange(3, 6, PONG_BODY);
|
pONG.setRange(3, 6, pONGBODY);
|
||||||
socket!.add(PONG);
|
socket!.add(pONG);
|
||||||
await socket!.flush();
|
await socket!.flush();
|
||||||
isConnected = true;
|
isConnected = true;
|
||||||
if (timer.isActive()) {
|
if (timer.isActive()) {
|
||||||
@ -212,9 +205,8 @@ class CIMSocket extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
///消息分发器
|
///消息分发器
|
||||||
Future switchMessage(Message.Model model, {bool isHistory = false}) async {
|
Future switchMessage(messages.Model model) async {
|
||||||
print(model.toProto3Json());
|
_model = model;
|
||||||
model = model;
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,8 @@
|
|||||||
name: cim_flutter_sdk
|
name: cim_flutter_sdk
|
||||||
description: A new Flutter plugin project.
|
description: a flutter sdk for cim.
|
||||||
version: 0.0.1
|
repository: https://gitee.com/farsunset/cim
|
||||||
homepage:
|
version: 1.0.1
|
||||||
|
homepage: http://farsunset.com/
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.19.4 <3.0.0'
|
sdk: '>=2.19.4 <3.0.0'
|
||||||
@ -14,65 +15,67 @@ dependencies:
|
|||||||
protobuf: ^2.0.1 # Google protobuf 序列化
|
protobuf: ^2.0.1 # Google protobuf 序列化
|
||||||
device_info_plus: ^8.2.2
|
device_info_plus: ^8.2.2
|
||||||
common_utils: ^2.1.0
|
common_utils: ^2.1.0
|
||||||
|
crypto: ^3.0.3
|
||||||
|
convert: ^3.1.1
|
||||||
|
fixnum: ^1.1.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_lints: ^2.0.0
|
flutter_lints: ^2.0.0
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
|
||||||
# The following section is specific to Flutter packages.
|
# The following section is specific to Flutter packages.
|
||||||
flutter:
|
#flutter:
|
||||||
# This section identifies this Flutter project as a plugin project.
|
# This section identifies this Flutter project as a plugin project.
|
||||||
# The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
|
# The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
|
||||||
# which should be registered in the plugin registry. This is required for
|
# which should be registered in the plugin registry. This is required for
|
||||||
# using method channels.
|
# using method channels.
|
||||||
# The Android 'package' specifies package in which the registered class is.
|
# The Android 'package' specifies package in which the registered class is.
|
||||||
# This is required for using method channels on Android.
|
# This is required for using method channels on Android.
|
||||||
# The 'ffiPlugin' specifies that native code should be built and bundled.
|
# The 'ffiPlugin' specifies that native code should be built and bundled.
|
||||||
# This is required for using `dart:ffi`.
|
# This is required for using `dart:ffi`.
|
||||||
# All these are used by the tooling to maintain consistency when
|
# All these are used by the tooling to maintain consistency when
|
||||||
# adding or updating assets for this project.
|
# adding or updating assets for this project.
|
||||||
plugin:
|
#plugin:
|
||||||
platforms:
|
# platforms:
|
||||||
# This plugin project was generated without specifying any
|
# This plugin project was generated without specifying any
|
||||||
# platforms with the `--platform` argument. If you see the `some_platform` map below, remove it and
|
# platforms with the `--platform` argument. If you see the `some_platform` map below, remove it and
|
||||||
# then add platforms following the instruction here:
|
# then add platforms following the instruction here:
|
||||||
# https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms
|
# https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms
|
||||||
# -------------------
|
# -------------------
|
||||||
some_platform:
|
# some_platform:
|
||||||
pluginClass: somePluginClass
|
# pluginClass: somePluginClass
|
||||||
# -------------------
|
# -------------------
|
||||||
|
|
||||||
# To add assets to your plugin package, add an assets section, like this:
|
# To add assets to your plugin package, add an assets section, like this:
|
||||||
# assets:
|
# assets:
|
||||||
# - images/a_dot_burr.jpeg
|
# - images/a_dot_burr.jpeg
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
#
|
#
|
||||||
# For details regarding assets in packages, see
|
# For details regarding assets in packages, see
|
||||||
# https://flutter.dev/assets-and-images/#from-packages
|
# https://flutter.dev/assets-and-images/#from-packages
|
||||||
#
|
#
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/assets-and-images/#resolution-aware
|
# https://flutter.dev/assets-and-images/#resolution-aware
|
||||||
|
|
||||||
# To add custom fonts to your plugin package, add a fonts section here,
|
# 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
|
# 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
|
# "family" key with the font family name, and a "fonts" key with a
|
||||||
# list giving the asset and other descriptors for the font. For
|
# list giving the asset and other descriptors for the font. For
|
||||||
# example:
|
# example:
|
||||||
# fonts:
|
# fonts:
|
||||||
# - family: Schyler
|
# - family: Schyler
|
||||||
# fonts:
|
# fonts:
|
||||||
# - asset: fonts/Schyler-Regular.ttf
|
# - asset: fonts/Schyler-Regular.ttf
|
||||||
# - asset: fonts/Schyler-Italic.ttf
|
# - asset: fonts/Schyler-Italic.ttf
|
||||||
# style: italic
|
# style: italic
|
||||||
# - family: Trajan Pro
|
# - family: Trajan Pro
|
||||||
# fonts:
|
# fonts:
|
||||||
# - asset: fonts/TrajanPro.ttf
|
# - asset: fonts/TrajanPro.ttf
|
||||||
# - asset: fonts/TrajanPro_Bold.ttf
|
# - asset: fonts/TrajanPro_Bold.ttf
|
||||||
# weight: 700
|
# weight: 700
|
||||||
#
|
#
|
||||||
# For details regarding fonts in packages, see
|
# For details regarding fonts in packages, see
|
||||||
# https://flutter.dev/custom-fonts/#from-packages
|
# https://flutter.dev/custom-fonts/#from-packages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user