地区选择和罗盘十字
This commit is contained in:
35
lib/components/cross_paint.dart
Normal file
35
lib/components/cross_paint.dart
Normal file
@ -0,0 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CrossPaint extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.transparent,
|
||||
alignment: Alignment.center,
|
||||
child: CustomPaint(
|
||||
// 使用CustomPaint 背景画板
|
||||
painter: MyPainter(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyPainter extends CustomPainter {
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
// 创建画笔
|
||||
final Paint paintLine = Paint()
|
||||
..color = Colors.grey
|
||||
..strokeWidth = 2;
|
||||
// 绘制线
|
||||
canvas.drawLine(Offset(-400, 0), Offset(400, 0), paintLine);
|
||||
canvas.drawLine(Offset(0, 500), Offset(0, -440), paintLine);
|
||||
// 创建画笔
|
||||
// final Paint paintPoint = Paint()..color = Colors.red;
|
||||
// 绘制圆点
|
||||
// canvas.drawCircle(Offset(0, 0), 10, paintPoint);
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldRepaint(CustomPainter oldDelegate) => false;
|
||||
}
|
164
lib/components/region_selector.dart
Normal file
164
lib/components/region_selector.dart
Normal file
@ -0,0 +1,164 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_pickers/pickers.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../states/region.dart';
|
||||
|
||||
class RegionSelector extends StatelessWidget {
|
||||
const RegionSelector({Key key}) : super(key: key);
|
||||
|
||||
// 拼接城市
|
||||
String spliceCityName(String pname, String cname) {
|
||||
if (pname == '') return '未选择城市';
|
||||
StringBuffer sb = StringBuffer();
|
||||
sb.write(pname);
|
||||
// if (cname == '') return sb.toString();
|
||||
if (cname == '') return '未选择城市';
|
||||
sb.write(' - ');
|
||||
sb.write(cname);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: 100,
|
||||
child: Consumer<RegionProvider>(
|
||||
builder: (context, regionProvider, child) => Column(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Pickers.showAddressPicker(context,
|
||||
addAllItem: false,
|
||||
initProvince: regionProvider.provinceName,
|
||||
initCity: regionProvider.cityName,
|
||||
onConfirm: (p, c, t) {
|
||||
regionProvider.updateRegion(p, c);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
constraints: const BoxConstraints(minHeight: 42),
|
||||
padding: const EdgeInsets.fromLTRB(10, 0, 12, 0),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.grey),
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Row(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(spliceCityName(
|
||||
regionProvider.tempProvinceName,
|
||||
regionProvider.tempCityName)),
|
||||
// SizedBox(width: 8),
|
||||
Row(
|
||||
children: [
|
||||
InkWell(
|
||||
child: Icon(Icons.close,
|
||||
size: 20, color: Colors.grey[500]),
|
||||
onTap: () {}),
|
||||
Icon(Icons.keyboard_arrow_down,
|
||||
size: 28, color: Colors.grey[500]),
|
||||
],
|
||||
)
|
||||
],
|
||||
)),
|
||||
),
|
||||
],
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
// class RegionSelector extends StatefulWidget {
|
||||
// const RegionSelector({Key key}) : super(key: key);
|
||||
//
|
||||
// @override
|
||||
// State<RegionSelector> createState() => _RegionSelectorState();
|
||||
// }
|
||||
//
|
||||
// class _RegionSelectorState extends State<RegionSelector> {
|
||||
// final Future<SharedPreferences> _prefs = SharedPreferences.getInstance();
|
||||
//
|
||||
// // final rp = RegionProvider()
|
||||
// String provinceName;
|
||||
// String cityName;
|
||||
//
|
||||
// @override
|
||||
// initState() {
|
||||
// // provinceName = Provider.of<RegionProvider>(context).provinceName;
|
||||
// // cityName = Provider.of<RegionProvider>(context).cityName;
|
||||
// _prefs.then((prefs) {
|
||||
// if (prefs.getString('REGION') != null) {
|
||||
// final region =
|
||||
// RegionData.fromJson(jsonDecode(prefs.getString('REGION')));
|
||||
// provinceName = region.provinceName;
|
||||
// cityName = region.cityName;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// // 拼接城市
|
||||
// String spliceCityName(String pname, String cname) {
|
||||
// if (pname == '') return '未选择城市';
|
||||
// StringBuffer sb = StringBuffer();
|
||||
// sb.write(pname);
|
||||
// if (cname == '') return sb.toString();
|
||||
// sb.write(' - ');
|
||||
// sb.write(cname);
|
||||
// return sb.toString();
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return SizedBox(
|
||||
// height: 100,
|
||||
// child: Consumer<RegionProvider>(
|
||||
// builder: (context, regionProvider, child) => Column(
|
||||
// children: [
|
||||
// InkWell(
|
||||
// onTap: () {
|
||||
// Pickers.showAddressPicker(context,
|
||||
// addAllItem: false,
|
||||
// initProvince: regionProvider.provinceName,
|
||||
// initCity: regionProvider.cityName,
|
||||
// onConfirm: (p, c, t) {
|
||||
// regionProvider.updateRegion(p, c);
|
||||
// setState(() {
|
||||
// provinceName = p;
|
||||
// cityName = c;
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
// child: Container(
|
||||
// constraints: const BoxConstraints(minHeight: 42),
|
||||
// padding: const EdgeInsets.fromLTRB(10, 0, 12, 0),
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(color: Colors.grey),
|
||||
// borderRadius: BorderRadius.circular(6),
|
||||
// ),
|
||||
// child: Row(
|
||||
// // mainAxisSize: MainAxisSize.min,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// children: [
|
||||
// Text(spliceCityName(regionProvider.provinceName,
|
||||
// regionProvider.cityName)),
|
||||
// // SizedBox(width: 8),
|
||||
// Row(
|
||||
// children: [
|
||||
// InkWell(
|
||||
// child: Icon(Icons.close,
|
||||
// size: 20, color: Colors.grey[500]),
|
||||
// onTap: () {}),
|
||||
// Icon(Icons.keyboard_arrow_down,
|
||||
// size: 28, color: Colors.grey[500]),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// )),
|
||||
// ),
|
||||
// ],
|
||||
// )));
|
||||
// }
|
||||
// }
|
@ -1,12 +1,20 @@
|
||||
import 'package:fengshui_compass/bottom_navigation_widget.dart';
|
||||
import 'package:fengshui_compass/states/region.dart';
|
||||
import 'package:fengshui_compass/utils/color.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:fengshui_compass/bottom_navigation_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
// import '';
|
||||
|
||||
void main() {
|
||||
///屏幕刷新率和显示率不一致时的优化
|
||||
// GestureBinding.instance.resamplingEnabled = true;
|
||||
runApp(const MyApp());
|
||||
runApp(
|
||||
ChangeNotifierProvider(
|
||||
create: (context) => RegionProvider(),
|
||||
child: const MyApp(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
|
18
lib/models/region.dart
Normal file
18
lib/models/region.dart
Normal file
@ -0,0 +1,18 @@
|
||||
class RegionData {
|
||||
String provinceName;
|
||||
String cityName;
|
||||
|
||||
RegionData({this.provinceName, this.cityName});
|
||||
|
||||
RegionData.fromJson(Map<String, dynamic> json) {
|
||||
provinceName = json['provinceName'];
|
||||
cityName = json['cityName'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['provinceName'] = provinceName;
|
||||
data['cityName'] = cityName;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -1,13 +1,17 @@
|
||||
import 'dart:async';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:math';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:fengshui_compass/components/cross_paint.dart';
|
||||
import 'package:fengshui_compass/components/my_icon.dart';
|
||||
import 'package:fengshui_compass/pages/login_page.dart';
|
||||
import 'package:fengshui_compass/states/region.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_serial_port_api/flutter_serial_port_api.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:stream_transform/stream_transform.dart';
|
||||
|
||||
import '../components/region_selector.dart';
|
||||
import '../utils/recv_parse.dart';
|
||||
|
||||
class CompassPage extends StatefulWidget {
|
||||
@ -30,6 +34,7 @@ class _CompassState extends State<CompassPage> {
|
||||
|
||||
double w_x = 0.5;
|
||||
double w_y = 0.5;
|
||||
|
||||
// 与磁北极夹角
|
||||
double myaw = 0.0;
|
||||
|
||||
@ -39,9 +44,11 @@ class _CompassState extends State<CompassPage> {
|
||||
var listb = [];
|
||||
var listc = [];
|
||||
|
||||
void initDevice() {
|
||||
// 省市名称,用于获取磁偏角
|
||||
String proviceName = '';
|
||||
String cityName = '';
|
||||
|
||||
}
|
||||
void initDevice() {}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -152,9 +159,7 @@ class _CompassState extends State<CompassPage> {
|
||||
|
||||
loginAction() {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => LoginPage()));
|
||||
context, MaterialPageRoute(builder: (context) => LoginPage()));
|
||||
}
|
||||
|
||||
parsingRecvCom(str) {
|
||||
@ -172,41 +177,39 @@ class _CompassState extends State<CompassPage> {
|
||||
// var mx_l = hexToInt(str.substring(pos+10, pos+12));
|
||||
// var my_h = hexToInt(str.substring(pos+12, pos+14));
|
||||
|
||||
var myaw_flag = hexToInt(str.substring(pos+14, pos+16));
|
||||
var myaw_h = hexToInt(str.substring(pos+16, pos+18));
|
||||
var myaw_l = hexToInt(str.substring(pos+18, pos+20));
|
||||
var myaw_flag = hexToInt(str.substring(pos + 14, pos + 16));
|
||||
var myaw_h = hexToInt(str.substring(pos + 16, pos + 18));
|
||||
var myaw_l = hexToInt(str.substring(pos + 18, pos + 20));
|
||||
|
||||
var roll_tmp = (roll_h * 256 + roll_l) * 180 /32768;
|
||||
var pitch_tmp = (pitch_h * 256 + pitch_l) * 180 /32768;
|
||||
var roll_tmp = (roll_h * 256 + roll_l) * 180 / 32768;
|
||||
var pitch_tmp = (pitch_h * 256 + pitch_l) * 180 / 32768;
|
||||
// var yaw = (yaw_h * 256 + yaw_l) * 180 /32768;
|
||||
|
||||
// -180~180
|
||||
var ff = myaw_flag == 1 ? -1 : 1;
|
||||
var temp_myaw = (myaw_h *256 + myaw_l) * 0.01 * ff + 180;
|
||||
|
||||
if (roll_tmp>180) roll_tmp = roll_tmp -360;
|
||||
if (pitch_tmp>180) pitch_tmp = pitch_tmp -360;
|
||||
|
||||
var temp_myaw = (myaw_h * 256 + myaw_l) * 0.01 * ff + 180;
|
||||
|
||||
if (roll_tmp > 180) roll_tmp = roll_tmp - 360;
|
||||
if (pitch_tmp > 180) pitch_tmp = pitch_tmp - 360;
|
||||
|
||||
var w_x_tmp = 0.0;
|
||||
var w_y_tmp = 0.0;
|
||||
|
||||
// 倾角<30度
|
||||
var w_total = sqrt(roll_tmp.abs()*roll_tmp.abs() + pitch_tmp.abs()*pitch_tmp.abs());
|
||||
var w_total = sqrt(
|
||||
roll_tmp.abs() * roll_tmp.abs() + pitch_tmp.abs() * pitch_tmp.abs());
|
||||
|
||||
if (w_total <= 30) {
|
||||
w_y_tmp = 0.5 - 0.07 * roll_tmp / 30.0;
|
||||
w_x_tmp = 0.5 - 0.07 * pitch_tmp / 30.0;
|
||||
} else if (w_total > 30) {
|
||||
//todo
|
||||
w_y_tmp = 0.5 - 0.07 * w_total /30.0;
|
||||
w_y_tmp = 0.5 - 0.07 * w_total / 30.0;
|
||||
w_x_tmp = 0.5 - 0.07 * w_total / 30.0;
|
||||
}
|
||||
|
||||
// todo 其他情况
|
||||
|
||||
|
||||
var meanValue;
|
||||
|
||||
if (lista.length < 20) {
|
||||
@ -215,10 +218,8 @@ class _CompassState extends State<CompassPage> {
|
||||
} else {
|
||||
lista.removeAt(0);
|
||||
lista.add(temp_myaw);
|
||||
meanValue = lista.map((e) => e).reduce((a, b) => a+b) / lista.length;
|
||||
meanValue = lista.map((e) => e).reduce((a, b) => a + b) / lista.length;
|
||||
}
|
||||
|
||||
|
||||
|
||||
setState(() {
|
||||
// print("roll: $roll_tmp pitch: $pitch_tmp");
|
||||
@ -235,7 +236,6 @@ class _CompassState extends State<CompassPage> {
|
||||
|
||||
// 水平仪 0.5+-0.07范围
|
||||
// x旋转y在动 y旋转x在动 roll改变y坐标,pitch改变x坐标
|
||||
|
||||
});
|
||||
} else if (str.contains("9E010401") &&
|
||||
(str.length >= ((str.indexOf("9E010401") + 26)))) {
|
||||
@ -251,180 +251,230 @@ class _CompassState extends State<CompassPage> {
|
||||
} else {}
|
||||
}
|
||||
|
||||
// 拼接城市
|
||||
String spliceCityName(String pname, String cname) {
|
||||
if (pname == '') return '未选择城市';
|
||||
StringBuffer sb = StringBuffer();
|
||||
sb.write(pname);
|
||||
if (cname == '') return sb.toString();
|
||||
sb.write(' - ');
|
||||
sb.write(cname);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
// bool strEmpty(String? value) {
|
||||
// if (value == null) return true;
|
||||
// return value.trim().isEmpty;
|
||||
// }
|
||||
|
||||
selectRegion() {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text('选择城市校准磁偏角'),
|
||||
content: RegionSelector(),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Provider.of<RegionProvider>(context, listen: false)
|
||||
.saveRegion();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: const Text('保存'))
|
||||
],
|
||||
);
|
||||
}).then((value) {
|
||||
Provider.of<RegionProvider>(context, listen: false).resetTemp();
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/bg.png"), fit: BoxFit.cover)),
|
||||
child: Scaffold(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/bg.png"), fit: BoxFit.cover)),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
title: const Text(
|
||||
'定盘星',
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
leading: IconButton(
|
||||
color: Colors.amber,
|
||||
icon: Icon(isLock ? MyIcons.icon_mima : MyIcons.icon_jiesuo),
|
||||
onPressed: switchCompass,
|
||||
),
|
||||
actions: [
|
||||
//todo
|
||||
// 更改背景图
|
||||
IconButton(
|
||||
color: Colors.amber,
|
||||
icon: Icon(Icons.person, size: 22,),
|
||||
onPressed: loginAction,
|
||||
),
|
||||
],
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
title: const Text(
|
||||
'定盘星',
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(minHeight: 600),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 罗盘
|
||||
Column(
|
||||
children: [
|
||||
const Padding(padding: EdgeInsets.only(top: 145)),
|
||||
Row(
|
||||
children: [
|
||||
Spacer(flex: 1),
|
||||
Container(
|
||||
width: 700,
|
||||
height: 700,
|
||||
child: Stack(
|
||||
children: [
|
||||
Transform.rotate(
|
||||
angle: myaw * pi /360,
|
||||
child: const Image(
|
||||
image:
|
||||
AssetImage("assets/images/compass.png"),
|
||||
fit: BoxFit.fill),
|
||||
leading: IconButton(
|
||||
color: Colors.amber,
|
||||
icon: Icon(isLock ? MyIcons.icon_mima : MyIcons.icon_jiesuo),
|
||||
onPressed: switchCompass,
|
||||
),
|
||||
actions: [
|
||||
//todo
|
||||
// 更改背景图
|
||||
IconButton(
|
||||
color: Colors.amber,
|
||||
icon: const Icon(
|
||||
Icons.person,
|
||||
size: 22,
|
||||
),
|
||||
onPressed: loginAction,
|
||||
),
|
||||
],
|
||||
),
|
||||
body: SafeArea(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(minHeight: 600),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 罗盘
|
||||
Column(
|
||||
children: [
|
||||
const Padding(padding: EdgeInsets.only(top: 145)),
|
||||
Row(
|
||||
children: [
|
||||
Spacer(flex: 1),
|
||||
Container(
|
||||
width: 700,
|
||||
height: 700,
|
||||
child: Stack(
|
||||
children: [
|
||||
Transform.rotate(
|
||||
angle: myaw * pi / 360,
|
||||
child: const Image(
|
||||
image:
|
||||
AssetImage("assets/images/compass.png"),
|
||||
fit: BoxFit.fill),
|
||||
),
|
||||
Align(
|
||||
alignment: FractionalOffset(w_x, w_y),
|
||||
child: const Image(
|
||||
image: AssetImage("assets/images/water.png"),
|
||||
),
|
||||
Align(
|
||||
alignment: FractionalOffset(w_x, w_y),
|
||||
child: const Image(
|
||||
image: AssetImage("assets/images/water.png"),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
const Spacer(flex: 1),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
// 最上面一行, lock azimuth login
|
||||
Positioned(
|
||||
top: 5,
|
||||
child: Column(
|
||||
children: [
|
||||
const Image(
|
||||
width: 15,
|
||||
height: 15,
|
||||
image: AssetImage("assets/images/arrow.png"),
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
Text(
|
||||
// "${azimuth.toStringAsFixed(2)}",
|
||||
myaw.toStringAsFixed(2),
|
||||
style: const TextStyle(
|
||||
color: Colors.amber, fontSize: 36),
|
||||
),
|
||||
],
|
||||
)),
|
||||
// 最下面一行,ranging value openlaser
|
||||
Positioned(
|
||||
bottom: 80,
|
||||
left: 50,
|
||||
child: IconButton(
|
||||
onPressed: raging,
|
||||
icon: const Icon(
|
||||
MyIcons.icon_celiang,
|
||||
size: 34,
|
||||
),
|
||||
color: Colors.amber)),
|
||||
const Positioned(
|
||||
width: 180,
|
||||
height: 90,
|
||||
bottom: 60,
|
||||
child: Image(
|
||||
image: AssetImage("assets/images/range_input.png"),
|
||||
fit: BoxFit.contain,
|
||||
)),
|
||||
Positioned(
|
||||
width: 180,
|
||||
height: 90,
|
||||
bottom: 60,
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 15),
|
||||
child: Text(
|
||||
"${distance} m",
|
||||
style: const TextStyle(
|
||||
color: Colors.amber, fontSize: 28),
|
||||
),
|
||||
CrossPaint(),
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
|
||||
Positioned(
|
||||
bottom: 60,
|
||||
right: 40,
|
||||
height: 120,
|
||||
width: 100,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
IconButton(
|
||||
color: Colors.amber,
|
||||
onPressed: () {
|
||||
if (isUpClose) {
|
||||
openUpLaser();
|
||||
} else {
|
||||
closeUpLaser();
|
||||
}
|
||||
setState(() {
|
||||
isUpClose = !isUpClose;
|
||||
});
|
||||
},
|
||||
icon: Icon(
|
||||
isUpClose
|
||||
? MyIcons.icon_shangdeng
|
||||
: MyIcons.icon_shangdnegguanbi,
|
||||
size: 36)),
|
||||
IconButton(
|
||||
color: Colors.amber,
|
||||
onPressed: () {
|
||||
if (isSideClose) {
|
||||
openSideLaser();
|
||||
} else {
|
||||
closeSideLaser();
|
||||
}
|
||||
setState(() {
|
||||
isSideClose = !isSideClose;
|
||||
});
|
||||
},
|
||||
icon: Icon(
|
||||
isSideClose
|
||||
? MyIcons.icon_zuoyoudneg
|
||||
: MyIcons.icon_zuoyoudengguanbi,
|
||||
size: 32,
|
||||
))
|
||||
const Spacer(flex: 1),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)),
|
||||
));
|
||||
)
|
||||
],
|
||||
),
|
||||
// 最上面一行, lock azimuth login
|
||||
Positioned(
|
||||
top: 5,
|
||||
child: Column(
|
||||
children: [
|
||||
const Image(
|
||||
width: 15,
|
||||
height: 15,
|
||||
image: AssetImage("assets/images/arrow.png"),
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
Text(
|
||||
// "${azimuth.toStringAsFixed(2)}",
|
||||
myaw.toStringAsFixed(2),
|
||||
style:
|
||||
const TextStyle(color: Colors.amber, fontSize: 36),
|
||||
),
|
||||
],
|
||||
)),
|
||||
Positioned(
|
||||
top: 5,
|
||||
right: 8,
|
||||
child: IconButton(
|
||||
onPressed: () => selectRegion(),
|
||||
icon: const Icon(Icons.settings, color: Colors.amber),
|
||||
)),
|
||||
// 最下面一行,ranging value openlaser
|
||||
Positioned(
|
||||
bottom: 80,
|
||||
left: 50,
|
||||
child: IconButton(
|
||||
onPressed: raging,
|
||||
icon: const Icon(
|
||||
MyIcons.icon_celiang,
|
||||
size: 34,
|
||||
),
|
||||
color: Colors.amber)),
|
||||
const Positioned(
|
||||
width: 180,
|
||||
height: 90,
|
||||
bottom: 60,
|
||||
child: Image(
|
||||
image: AssetImage("assets/images/range_input.png"),
|
||||
fit: BoxFit.contain,
|
||||
)),
|
||||
Positioned(
|
||||
width: 180,
|
||||
height: 90,
|
||||
bottom: 60,
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 15),
|
||||
child: Text(
|
||||
"${distance} m",
|
||||
style:
|
||||
const TextStyle(color: Colors.amber, fontSize: 28),
|
||||
),
|
||||
),
|
||||
)),
|
||||
|
||||
Positioned(
|
||||
bottom: 60,
|
||||
right: 40,
|
||||
height: 120,
|
||||
width: 100,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
IconButton(
|
||||
color: Colors.amber,
|
||||
onPressed: () {
|
||||
if (isUpClose) {
|
||||
openUpLaser();
|
||||
} else {
|
||||
closeUpLaser();
|
||||
}
|
||||
setState(() {
|
||||
isUpClose = !isUpClose;
|
||||
});
|
||||
},
|
||||
icon: Icon(
|
||||
isUpClose
|
||||
? MyIcons.icon_shangdeng
|
||||
: MyIcons.icon_shangdnegguanbi,
|
||||
size: 36)),
|
||||
IconButton(
|
||||
color: Colors.amber,
|
||||
onPressed: () {
|
||||
if (isSideClose) {
|
||||
openSideLaser();
|
||||
} else {
|
||||
closeSideLaser();
|
||||
}
|
||||
setState(() {
|
||||
isSideClose = !isSideClose;
|
||||
});
|
||||
},
|
||||
icon: Icon(
|
||||
isSideClose
|
||||
? MyIcons.icon_zuoyoudneg
|
||||
: MyIcons.icon_zuoyoudengguanbi,
|
||||
size: 32,
|
||||
))
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
71
lib/states/region.dart
Normal file
71
lib/states/region.dart
Normal file
@ -0,0 +1,71 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../models/region.dart';
|
||||
|
||||
class RegionProvider extends ChangeNotifier {
|
||||
RegionProvider() {
|
||||
loadRegionData();
|
||||
}
|
||||
|
||||
String _provinceName = '';
|
||||
String _cityName = '';
|
||||
String _tempProvinceName = '';
|
||||
String _tempCityName = '';
|
||||
|
||||
String get provinceName => _provinceName;
|
||||
|
||||
String get cityName => _cityName;
|
||||
|
||||
String get tempProvinceName => _tempProvinceName;
|
||||
|
||||
String get tempCityName => _tempCityName;
|
||||
|
||||
final Future<SharedPreferences> _prefs = SharedPreferences.getInstance();
|
||||
|
||||
loadRegionData() {
|
||||
_prefs.then((prefs) {
|
||||
if (prefs.getString('REGION') != null) {
|
||||
final region =
|
||||
RegionData.fromJson(jsonDecode(prefs.getString('REGION')));
|
||||
_provinceName = region.provinceName;
|
||||
_cityName = region.cityName;
|
||||
_tempProvinceName = region.provinceName;
|
||||
_tempCityName = region.cityName;
|
||||
notifyListeners();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
updateRegion(pname, cname) {
|
||||
// _provinceName = pname;
|
||||
// _cityName = cname;
|
||||
_tempProvinceName = pname;
|
||||
_tempCityName = cname;
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
//将临时变量保存到正式变量,并保存本地
|
||||
saveRegion() {
|
||||
_provinceName = _tempProvinceName;
|
||||
_cityName = _tempCityName;
|
||||
print(_tempCityName);
|
||||
final region = <String, dynamic>{
|
||||
"provinceName": _tempProvinceName,
|
||||
'cityName': _tempCityName
|
||||
};
|
||||
_prefs.then((prefs) {
|
||||
prefs.setString('REGION', jsonEncode(region));
|
||||
});
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
resetTemp() async {
|
||||
_tempProvinceName = _provinceName;
|
||||
_tempCityName = _cityName;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
165
pubspec.lock
165
pubspec.lock
@ -5,77 +5,77 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.8.2"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.16.0"
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: cupertino_icons
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "1.0.5"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dio
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "4.0.6"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
ffi:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ffi
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
version: "2.0.1"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "6.1.2"
|
||||
flutter:
|
||||
@ -87,7 +87,7 @@ packages:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_lints
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
flutter_localizations:
|
||||
@ -95,6 +95,13 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_pickers:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_pickers
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.1.9"
|
||||
flutter_serial_port_api:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -118,170 +125,184 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fluttertoast
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "7.1.8"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
version: "4.0.1"
|
||||
intl:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: intl
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "0.17.0"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "0.6.4"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "0.12.11"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "0.1.4"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.7.0"
|
||||
nested:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: nested
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
package_info:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.8.1"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_linux
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.1.5"
|
||||
version: "2.1.7"
|
||||
path_provider_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_platform_interface
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.0.3"
|
||||
version: "2.0.4"
|
||||
path_provider_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_windows
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.0.5"
|
||||
version: "2.1.0"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: platform
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
process:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: process
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "4.2.4"
|
||||
provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: provider
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "6.0.3"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: shared_preferences
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.0.13"
|
||||
version: "2.0.15"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.0.11"
|
||||
version: "2.0.12"
|
||||
shared_preferences_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_ios
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_linux
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
shared_preferences_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_macos
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.0.3"
|
||||
version: "2.0.4"
|
||||
shared_preferences_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_platform_interface
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
shared_preferences_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_web
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.0.3"
|
||||
version: "2.0.4"
|
||||
shared_preferences_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_windows
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@ -291,107 +312,107 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.8.2"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
stream_transform:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: stream_transform
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "0.0.20"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "0.4.9"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
version: "1.3.1"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
webview_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: webview_flutter
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "3.0.4"
|
||||
webview_flutter_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_android
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.8.3"
|
||||
version: "2.8.14"
|
||||
webview_flutter_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_platform_interface
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "1.8.1"
|
||||
version: "1.9.1"
|
||||
webview_flutter_wkwebview:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_wkwebview
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.7.1"
|
||||
version: "2.8.1"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "2.5.1"
|
||||
version: "2.7.0"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xdg_directories
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/"
|
||||
source: hosted
|
||||
version: "0.2.0+1"
|
||||
sdks:
|
||||
dart: ">=2.17.0-0 <3.0.0"
|
||||
flutter: ">=2.8.0"
|
||||
dart: ">=2.17.0 <3.0.0"
|
||||
flutter: ">=3.0.0"
|
||||
|
@ -30,6 +30,8 @@ dependencies:
|
||||
flutter_serial_port_api:
|
||||
git:
|
||||
url: https://gitee.com/liang-fu/flutter_serial_port_api.git
|
||||
flutter_pickers: ^2.1.9
|
||||
provider: ^6.0.3
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
Reference in New Issue
Block a user