lock button move down
This commit is contained in:
@ -1,23 +1,17 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io' as io;
|
||||
import 'dart:math';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
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/services.dart';
|
||||
import 'package:flutter_serial_port_api/flutter_serial_port_api.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:stream_transform/stream_transform.dart';
|
||||
|
||||
import '../components/grid_clip_paint.dart';
|
||||
import '../components/region_selector.dart';
|
||||
import '../states/compass_image.dart';
|
||||
import '../utils/recv_parse.dart';
|
||||
@ -205,7 +199,7 @@ class _CompassState extends State<CompassPage> {
|
||||
// 倾角<30度
|
||||
var w_total = sqrt(
|
||||
roll_tmp.abs() * roll_tmp.abs() + pitch_tmp.abs() * pitch_tmp.abs());
|
||||
|
||||
print(w_total);
|
||||
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;
|
||||
@ -341,11 +335,12 @@ class _CompassState extends State<CompassPage> {
|
||||
'定盘星',
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
leading: IconButton(
|
||||
color: Colors.amber,
|
||||
icon: Icon(isLock ? MyIcons.icon_mima : MyIcons.icon_jiesuo),
|
||||
onPressed: switchCompass,
|
||||
),
|
||||
// todo: leading can't click
|
||||
// leading: IconButton(
|
||||
// color: Colors.amber,
|
||||
// icon: Icon(isLock ? MyIcons.icon_mima : MyIcons.icon_jiesuo),
|
||||
// onPressed: switchCompass,
|
||||
// ),
|
||||
actions: [
|
||||
//todo
|
||||
// 更改背景图
|
||||
@ -598,6 +593,17 @@ class _CompassState extends State<CompassPage> {
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
||||
Positioned(
|
||||
left: 5,
|
||||
top: 54,
|
||||
child: IconButton(
|
||||
color: Colors.amber,
|
||||
icon: Icon(
|
||||
isLock ? MyIcons.icon_mima : MyIcons.icon_jiesuo),
|
||||
onPressed: switchCompass,
|
||||
),
|
||||
),
|
||||
// 最下面一行,ranging value openlaser
|
||||
Positioned(
|
||||
bottom: 80,
|
||||
|
Reference in New Issue
Block a user