新提交
This commit is contained in:
parent
ece7aa270c
commit
f41e6a8c96
File diff suppressed because one or more lines are too long
@ -10,7 +10,11 @@ import 'package:scence_map/controllers/plumController.dart';
|
||||
import 'appbar.dart';
|
||||
import 'pages/aim_point/aimpointController.dart';
|
||||
import 'pages/history/history_record.dart';
|
||||
import 'pages/login/login_page.dart';
|
||||
import 'pages/login/my_routes.dart';
|
||||
import 'pages/pass_track/view.dart';
|
||||
import 'pages/setting/child_pages/XyChange/xy_change.dart';
|
||||
import 'pages/setting/child_pages/persondetail/person_details.dart';
|
||||
import 'pages/task/pile/pileNav/view.dart';
|
||||
// import 'pages/pile/rightDra/pileGenerate.dart';
|
||||
import 'pages/real/index.dart';
|
||||
@ -29,11 +33,15 @@ void main() async {
|
||||
Get.put(GnssController());
|
||||
Get.put(AntennaController());
|
||||
Get.put(AppController());
|
||||
Get.put(LoginPageController());
|
||||
Get.put(AccountLoginController());
|
||||
Get.put(PhoneLoginController());
|
||||
LoginPrefs loginPrefs = LoginPrefs();
|
||||
String value =
|
||||
await loginPrefs.init(); // await 关键字必须用在异步方法中 await等待异步方法执行完毕 异步方法必须用变量接收
|
||||
if ('ok' == value) {
|
||||
connect.init();
|
||||
loginPrefs.removeToken(); //注释掉即能实现短时间二次登录不需要再重新登录
|
||||
runApp(const MyApp());
|
||||
}
|
||||
}
|
||||
@ -48,7 +56,10 @@ class MyApp extends StatelessWidget {
|
||||
theme: appcontroller.isDarkMode.value
|
||||
? ThemeData.dark()
|
||||
: ThemeData.light(),
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: MyHomePage(title: 'Flutter Demo Home Page'),
|
||||
initialRoute: "home",
|
||||
onGenerateRoute: onGenerateRoute,
|
||||
);
|
||||
});
|
||||
}
|
||||
@ -68,7 +79,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
final List<Widget> _pages = [
|
||||
Real(),
|
||||
PassTrack(
|
||||
date: '',
|
||||
// date: '',
|
||||
),
|
||||
TaskManagePage(),
|
||||
HistoryRecord(),
|
||||
@ -81,12 +92,6 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
drawerEdgeDragWidth: 0.0, // 禁止通过滑动打开drawer
|
||||
// endDrawer: appcontroller.currentIndex.value == 1
|
||||
// ? Drawer(
|
||||
// width: size.width * .8,
|
||||
// child: const PileGenerate(),
|
||||
// )
|
||||
// : null,
|
||||
appBar: PreferredSize(
|
||||
preferredSize: Size.fromHeight(appBarHeight),
|
||||
child: CustomAppBar(
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'package:data_table_2/data_table_2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class PageNumber extends StatefulWidget {
|
||||
const PageNumber({
|
||||
@ -46,6 +47,8 @@ class PageNumberState extends State<PageNumber> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class CustomPager extends StatefulWidget {
|
||||
const CustomPager(this.controller, {super.key});
|
||||
|
||||
@ -55,6 +58,7 @@ class CustomPager extends StatefulWidget {
|
||||
CustomPagerState createState() => CustomPagerState();
|
||||
}
|
||||
|
||||
|
||||
class CustomPagerState extends State<CustomPager> {
|
||||
static const List<int> _availableSizes = [10, 20, 30, 50, 100];
|
||||
|
||||
|
@ -12,7 +12,6 @@ import 'tableCol.dart';
|
||||
|
||||
// import 'record_data_source.dart'; // bug 切换到对应proj_type 下
|
||||
|
||||
|
||||
int currentPage = 1;
|
||||
List dataList = [];
|
||||
List constructionData = [];
|
||||
@ -170,8 +169,7 @@ class _HistoryRecordState extends State<HistoryRecord> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
final isDarkMode =
|
||||
Theme.of(context).brightness == Brightness.dark;
|
||||
final isDarkMode = Theme.of(context).brightness == Brightness.dark;
|
||||
return Container(
|
||||
height: size.height,
|
||||
padding: const EdgeInsets.all(3),
|
||||
|
@ -1,5 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@ -7,29 +7,28 @@ import 'package:cpnav/service/base.dart';
|
||||
|
||||
import '../../service/user/loginprefs.dart';
|
||||
|
||||
class Login extends StatefulWidget {
|
||||
const Login({super.key});
|
||||
|
||||
@override
|
||||
State<Login> createState() => _LoginState();
|
||||
}
|
||||
|
||||
class _LoginState extends State<Login> with SingleTickerProviderStateMixin {
|
||||
//with SingleTickerProviderStateMixin 使this 不报错
|
||||
class LoginPageController extends GetxController
|
||||
with SingleGetTickerProviderMixin {
|
||||
late TabController _tabController;
|
||||
//初始化实例
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
_tabController = TabController(length: 2, vsync: this);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
void onClose() {
|
||||
_tabController.dispose();
|
||||
super.dispose();
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
TabController get tabController => _tabController;
|
||||
}
|
||||
|
||||
class Login extends GetView<LoginPageController> {
|
||||
const Login({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@ -44,7 +43,7 @@ class _LoginState extends State<Login> with SingleTickerProviderStateMixin {
|
||||
labelStyle: const TextStyle(color: Colors.black), // 设置选中标签的字体颜色为黑色
|
||||
unselectedLabelStyle:
|
||||
const TextStyle(color: Colors.grey), // 设置未选中标签的字体颜色为灰色
|
||||
controller: _tabController,
|
||||
controller: controller.tabController,
|
||||
tabs: const [
|
||||
Tab(text: '手机号登录', icon: Icon(Icons.phone_android)),
|
||||
Tab(text: '账号登录', icon: Icon(Icons.account_box_outlined)),
|
||||
@ -52,7 +51,7 @@ class _LoginState extends State<Login> with SingleTickerProviderStateMixin {
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
controller: controller.tabController,
|
||||
children: const [
|
||||
PhoneLoginPage(),
|
||||
AccountLoginPage(),
|
||||
@ -65,48 +64,56 @@ class _LoginState extends State<Login> with SingleTickerProviderStateMixin {
|
||||
}
|
||||
}
|
||||
|
||||
class AccountLoginPage extends StatefulWidget {
|
||||
const AccountLoginPage({super.key});
|
||||
class AccountLoginController extends GetxController {
|
||||
final formKey = GlobalKey<FormState>();
|
||||
final username = ''.obs;
|
||||
final password = ''.obs;
|
||||
final verifyCode = ''.obs;
|
||||
final svgString = ''.obs;
|
||||
final captchaId = ''.obs;
|
||||
final obscureText = false.obs;
|
||||
|
||||
@override
|
||||
State<AccountLoginPage> createState() => _AccountLoginPageState();
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
changeCaptcha();
|
||||
}
|
||||
|
||||
class _AccountLoginPageState extends State<AccountLoginPage> {
|
||||
//初始化FormState
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
String username = "";
|
||||
String password = "";
|
||||
String verifyCode = "";
|
||||
String svgString = "";
|
||||
String captchaId = "";
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
await changeCaptcha();
|
||||
});
|
||||
}
|
||||
|
||||
changeCaptcha() async {
|
||||
Future<void> changeCaptcha() async {
|
||||
var captcha = await GetServices().getCaptcha();
|
||||
setState(() {
|
||||
svgString = captcha['data'];
|
||||
captchaId = captcha['captchaId'];
|
||||
});
|
||||
svgString.value = captcha['data'];
|
||||
captchaId.value = captcha['captchaId'];
|
||||
}
|
||||
|
||||
showErrorSnackbar(BuildContext context, String text) {
|
||||
void showErrorSnackbar(String text) {
|
||||
final snackBar = SnackBar(
|
||||
content: Text(text),
|
||||
backgroundColor: Colors.red,
|
||||
);
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||
ScaffoldMessenger.of(Get.context!).showSnackBar(snackBar);
|
||||
}
|
||||
|
||||
LoginPrefs loginPrefs = LoginPrefs();
|
||||
bool _obscureText = false;
|
||||
// Future<void> login() async {
|
||||
// if (formKey.currentState!.validate()) {
|
||||
// formKey.currentState!.save();
|
||||
// var res = await GetServices().getAccountLogin(
|
||||
// captchaId.value, password.value, username.value, verifyCode.value);
|
||||
// if (res['code'] != 1000) {
|
||||
// changeCaptcha();
|
||||
// showErrorSnackbar(res["message"]);
|
||||
// } else {
|
||||
// LoginPrefs().saveExpire(res["data"]["expire"]);
|
||||
// LoginPrefs().saveToken(res["data"]["token"]);
|
||||
// Get.offNamed('home'); // 跳转至首页
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
class AccountLoginPage extends GetView<AccountLoginController> {
|
||||
const AccountLoginPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
@ -115,7 +122,7 @@ class _AccountLoginPageState extends State<AccountLoginPage> {
|
||||
child: Column(
|
||||
children: [
|
||||
Form(
|
||||
key: _formKey,
|
||||
key: controller.formKey,
|
||||
child: Column(
|
||||
children: [
|
||||
// 账号输入框
|
||||
@ -123,7 +130,8 @@ class _AccountLoginPageState extends State<AccountLoginPage> {
|
||||
decoration: const InputDecoration(
|
||||
labelText: '用户名:',
|
||||
),
|
||||
onSaved: (String? value) => username = value!,
|
||||
onSaved: (String? value) =>
|
||||
controller.username.value = value!,
|
||||
validator: (String? value) {
|
||||
String str = "";
|
||||
|
||||
@ -140,23 +148,22 @@ class _AccountLoginPageState extends State<AccountLoginPage> {
|
||||
const SizedBox(height: 16.0),
|
||||
|
||||
// 密码输入框
|
||||
TextFormField(
|
||||
Obx(() => TextFormField(
|
||||
decoration: InputDecoration(
|
||||
labelText: '密码:',
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(
|
||||
_obscureText
|
||||
controller.obscureText.value
|
||||
? Icons.visibility
|
||||
: Icons.visibility_off,
|
||||
),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
_obscureText = !_obscureText; // 切换密码可见状态
|
||||
});
|
||||
controller.obscureText.toggle(); // 切换密码可见状态
|
||||
}),
|
||||
),
|
||||
obscureText: _obscureText,
|
||||
onSaved: (String? value) => password = value!,
|
||||
obscureText: controller.obscureText.value,
|
||||
onSaved: (String? value) =>
|
||||
controller.password.value = value!,
|
||||
validator: (String? value) {
|
||||
String str = "";
|
||||
RegExp regex = RegExp(r'^[a-zA-Z0-9@#$]+$');
|
||||
@ -169,7 +176,7 @@ class _AccountLoginPageState extends State<AccountLoginPage> {
|
||||
|
||||
return str == "" ? null : str;
|
||||
},
|
||||
),
|
||||
)),
|
||||
const SizedBox(height: 24.0),
|
||||
Row(
|
||||
children: [
|
||||
@ -188,46 +195,51 @@ class _AccountLoginPageState extends State<AccountLoginPage> {
|
||||
|
||||
return str == "" ? null : str;
|
||||
},
|
||||
onSaved: (String? value) => verifyCode = value!,
|
||||
onSaved: (String? value) =>
|
||||
controller.verifyCode.value = value!,
|
||||
),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
changeCaptcha();
|
||||
controller.changeCaptcha();
|
||||
},
|
||||
child: svgString.isNotEmpty
|
||||
child: Obx(() => controller.svgString.isNotEmpty
|
||||
? SvgPicture.string(
|
||||
svgString,
|
||||
controller.svgString.value,
|
||||
width: 70, // 设置宽度
|
||||
height: 40, // 设置高度
|
||||
color: Colors.black,
|
||||
)
|
||||
: const Text(""))
|
||||
: const Text("")))
|
||||
],
|
||||
),
|
||||
// 登录按钮
|
||||
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
_formKey.currentState!.save(); //必须
|
||||
if (controller.formKey.currentState!.validate()) {
|
||||
controller.formKey.currentState!.save(); //必须
|
||||
var res = await GetServices().getAccountLogin(
|
||||
captchaId, password, username, verifyCode);
|
||||
setState(() {
|
||||
controller.captchaId.value,
|
||||
controller.password.value,
|
||||
controller.username.value,
|
||||
controller.verifyCode.value);
|
||||
|
||||
if (res['code'] != 1000) {
|
||||
changeCaptcha();
|
||||
showErrorSnackbar(context, res["message"]);
|
||||
controller.changeCaptcha();
|
||||
controller.showErrorSnackbar(res["message"]);
|
||||
} else {
|
||||
loginPrefs.saveExpire((res["data"]["expire"]));
|
||||
loginPrefs.saveToken((res["data"]["token"]));
|
||||
Navigator.pushNamed(context, 'home'); //跳转至首页
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
child: const Text('登录'),
|
||||
),
|
||||
)
|
||||
],
|
||||
))
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -235,69 +247,92 @@ class _AccountLoginPageState extends State<AccountLoginPage> {
|
||||
}
|
||||
}
|
||||
|
||||
class PhoneLoginPage extends StatefulWidget {
|
||||
const PhoneLoginPage({super.key});
|
||||
|
||||
@override
|
||||
State<PhoneLoginPage> createState() => _PhoneLoginPageState();
|
||||
}
|
||||
|
||||
class _PhoneLoginPageState extends State<PhoneLoginPage> {
|
||||
String phoneNumber = "";
|
||||
String smsCode = "";
|
||||
bool issmsCode = false;
|
||||
String smsText = "获取验证码";
|
||||
int _seconds = 60;
|
||||
late Timer _timer;
|
||||
//初始化FormState
|
||||
class PhoneLoginController extends GetxController {
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
LoginPrefs loginPrefs = LoginPrefs();
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
final phoneNumber = ''.obs;
|
||||
final smsCode = ''.obs;
|
||||
final issmsCode = false.obs;
|
||||
final smsText = '获取验证码'.obs;
|
||||
final _seconds = 60.obs;
|
||||
late Timer _timer;
|
||||
|
||||
phoneNumber = loginPrefs.getPhone();
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
phoneNumber.value = LoginPrefs().getPhone();
|
||||
}
|
||||
|
||||
void startTimer() {
|
||||
_timer = Timer.periodic(const Duration(seconds: 1), (timer) {
|
||||
if (_seconds > 0) {
|
||||
_seconds -= 1;
|
||||
smsText = "重新获取(${_seconds}s)";
|
||||
if (_seconds.value > 0) {
|
||||
_seconds.value -= 1;
|
||||
smsText.value = "重新获取(${_seconds.value}s)";
|
||||
} else {
|
||||
_timer.cancel(); // 到0时关闭定时器
|
||||
smsText = "获取验证码";
|
||||
smsText.value = "获取验证码";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
showErrorSnackbar(BuildContext context, String text) {
|
||||
void showErrorSnackbar(String text) {
|
||||
final snackBar = SnackBar(
|
||||
content: Text(text),
|
||||
backgroundColor: Colors.red,
|
||||
);
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||
ScaffoldMessenger.of(Get.context!).showSnackBar(snackBar);
|
||||
}
|
||||
|
||||
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
Future<void> getSmsCode() async {
|
||||
issmsCode.value = true;
|
||||
if (_formKey.currentState!.validate()) {
|
||||
_formKey.currentState!.save();
|
||||
// 收回键盘
|
||||
FocusScope.of(Get.context!).unfocus();
|
||||
await GetServices().getsmsCode(phoneNumber.value);
|
||||
startTimer(); // 开始定时器
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> login() async {
|
||||
issmsCode.value = false;
|
||||
if (_formKey.currentState!.validate()) {
|
||||
_formKey.currentState!.save();
|
||||
// 表单校验通过,执行提交逻辑...
|
||||
// 收回键盘
|
||||
FocusScope.of(Get.context!).unfocus();
|
||||
var res =
|
||||
await GetServices().phoneLogin(phoneNumber.value, smsCode.value);
|
||||
if (res['code'] != 1000) {
|
||||
showErrorSnackbar(res["message"]);
|
||||
} else {
|
||||
LoginPrefs().savePhone(phoneNumber.value);
|
||||
LoginPrefs().saveExpire(res["data"]["expire"]);
|
||||
LoginPrefs().saveToken(res["data"]["token"]);
|
||||
Get.offNamed('home'); // 跳转至首页
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PhoneLoginPage extends GetView<PhoneLoginController> {
|
||||
const PhoneLoginPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
key: _scaffoldKey,
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Form(
|
||||
key: _formKey,
|
||||
child:
|
||||
// 手机号输入框
|
||||
Column(
|
||||
key: controller._formKey,
|
||||
child: Column(
|
||||
children: [
|
||||
// 手机号输入框
|
||||
TextFormField(
|
||||
maxLength: 11,
|
||||
initialValue: phoneNumber,
|
||||
initialValue: controller.phoneNumber.value,
|
||||
decoration: const InputDecoration(
|
||||
labelText: '手机号',
|
||||
),
|
||||
@ -313,7 +348,8 @@ class _PhoneLoginPageState extends State<PhoneLoginPage> {
|
||||
|
||||
return str == "" ? null : str;
|
||||
},
|
||||
onSaved: (String? value) => phoneNumber = value!,
|
||||
onSaved: (String? value) =>
|
||||
controller.phoneNumber.value = value!,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
@ -330,27 +366,21 @@ class _PhoneLoginPageState extends State<PhoneLoginPage> {
|
||||
str = '验证码不能为空';
|
||||
}
|
||||
|
||||
if (issmsCode) {
|
||||
if (controller.issmsCode.value) {
|
||||
return null;
|
||||
}
|
||||
return str == "" ? null : str;
|
||||
},
|
||||
onSaved: (val) => smsCode = val!,
|
||||
onSaved: (String? value) =>
|
||||
controller.smsCode.value = value!,
|
||||
),
|
||||
),
|
||||
// 获取验证码按钮
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
issmsCode = true;
|
||||
if (_formKey.currentState!.validate()) {
|
||||
_formKey.currentState!.save();
|
||||
// 收回键盘
|
||||
FocusScope.of(context).unfocus();
|
||||
await GetServices().getsmsCode(phoneNumber);
|
||||
startTimer(); // 开始定时器
|
||||
}
|
||||
controller.getSmsCode();
|
||||
},
|
||||
child: Text(smsText),
|
||||
child: Obx(() => Text(controller.smsText.value)),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -359,32 +389,13 @@ class _PhoneLoginPageState extends State<PhoneLoginPage> {
|
||||
// 登录按钮
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
issmsCode = false;
|
||||
if (_formKey.currentState!.validate()) {
|
||||
_formKey.currentState!.save();
|
||||
// 表单校验通过,执行提交逻辑...
|
||||
// 收回键盘
|
||||
FocusScope.of(context).unfocus();
|
||||
var res = await GetServices()
|
||||
.phoneLogin(phoneNumber, smsCode);
|
||||
setState(() {
|
||||
if (res['code'] != 1000) {
|
||||
showErrorSnackbar(
|
||||
_scaffoldKey.currentContext!, res["message"]);
|
||||
} else {
|
||||
loginPrefs.savePhone(phoneNumber);
|
||||
loginPrefs.saveExpire(res["data"]["expire"]);
|
||||
loginPrefs.saveToken(res["data"]["token"]);
|
||||
Navigator.pushNamed(
|
||||
_scaffoldKey.currentContext!, 'home'); //跳转至首页
|
||||
}
|
||||
});
|
||||
}
|
||||
controller.login();
|
||||
},
|
||||
child: const Text('登录'),
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
48
lib/pages/login/my_routes.dart
Normal file
48
lib/pages/login/my_routes.dart
Normal file
@ -0,0 +1,48 @@
|
||||
//配置路由
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../main.dart';
|
||||
import '../../service/user/loginprefs.dart';
|
||||
import 'login_page.dart';
|
||||
|
||||
/*
|
||||
* 这个方法是固定写法,功能就像是一个拦截器。
|
||||
*/
|
||||
Route<dynamic>? onGenerateRoute(RouteSettings settings) {
|
||||
Map<String, Widget> routes = {
|
||||
'home': MyHomePage(title: 'Flutter Demo Home Page'), //定义app路径
|
||||
'login': const Login(), //定义login路径
|
||||
};
|
||||
|
||||
String routerName = routeBeforeHook(settings);
|
||||
bool mathMap = false;
|
||||
Route<dynamic>? mathWidget;
|
||||
routes.forEach((key, v) {
|
||||
if (key == routerName) {
|
||||
mathMap = true;
|
||||
mathWidget = MaterialPageRoute(builder: (BuildContext context) => v);
|
||||
}
|
||||
});
|
||||
|
||||
if (mathMap) {
|
||||
return mathWidget;
|
||||
}
|
||||
return MaterialPageRoute(
|
||||
builder: (BuildContext context) => const Text('404'));
|
||||
}
|
||||
|
||||
String routeBeforeHook(RouteSettings settings) {
|
||||
if (checkToken() == false) {
|
||||
return 'login';
|
||||
} else {
|
||||
return settings.name!;
|
||||
}
|
||||
}
|
||||
|
||||
bool checkToken() {
|
||||
LoginPrefs loginPrefs = LoginPrefs();
|
||||
String token = loginPrefs.getToken();
|
||||
if ('' != token) return true;
|
||||
return false;
|
||||
}
|
@ -19,17 +19,17 @@ import "controller.dart";
|
||||
|
||||
ScenceMapController mapcontroller = Get.put(ScenceMapController());
|
||||
|
||||
class PassTrack extends StatefulWidget {
|
||||
final String date;
|
||||
final controller;
|
||||
// class PassTrack extends StatefulWidget {
|
||||
// final String date;
|
||||
// final controller;
|
||||
|
||||
const PassTrack({super.key, required this.date, this.controller});
|
||||
// const PassTrack({super.key, required this.date, this.controller});
|
||||
|
||||
@override
|
||||
State<PassTrack> createState() => _PasstrackState();
|
||||
}
|
||||
// @override
|
||||
// State<PassTrack> createState() => _PasstrackState();
|
||||
// }
|
||||
|
||||
class _PasstrackState extends State<PassTrack> {
|
||||
class PassTrack extends GetView<PassTrackController> {
|
||||
final GlobalKey<PopupMenuButtonState<int>> _popupMenuKey =
|
||||
GlobalKey<PopupMenuButtonState<int>>();
|
||||
final controller = Get.put(PassTrackController("TEST", "pile_cm"));
|
||||
@ -42,39 +42,39 @@ class _PasstrackState extends State<PassTrack> {
|
||||
int maxLength = 200;
|
||||
SfRangeValues _rangevalues = const SfRangeValues(0.0, 200.0);
|
||||
|
||||
@override
|
||||
initState() {
|
||||
super.initState();
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
// sWidth = sqrt(screen.width * screen.width + screen.height * screen.height)
|
||||
// .ceil();
|
||||
// @override
|
||||
// initState() {
|
||||
// super.initState();
|
||||
// SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
// // sWidth = sqrt(screen.width * screen.width + screen.height * screen.height)
|
||||
// // .ceil();
|
||||
|
||||
// // scenceMapController.scale = passTrackPlugin.passTrack_getScale() * 1.0;
|
||||
// fileHandle.date = widget.date;
|
||||
// await fileHandle.init();
|
||||
// //在帧绘制完成后执行数据渲染
|
||||
// // await initPlatformState();
|
||||
// if (fileHandle.pointData.isNotEmpty) {
|
||||
// DecodeDataObj obj = fileHandle.pointData[0].obj!;
|
||||
// scenceMapController.centerXY = Offset(obj.y / 20, obj.x / 20);
|
||||
// }
|
||||
// // // scenceMapController.scale = passTrackPlugin.passTrack_getScale() * 1.0;
|
||||
// // fileHandle.date = widget.date;
|
||||
// // await fileHandle.init();
|
||||
// // //在帧绘制完成后执行数据渲染
|
||||
// // // await initPlatformState();
|
||||
// // if (fileHandle.pointData.isNotEmpty) {
|
||||
// // DecodeDataObj obj = fileHandle.pointData[0].obj!;
|
||||
// // scenceMapController.centerXY = Offset(obj.y / 20, obj.x / 20);
|
||||
// // }
|
||||
|
||||
// for (var item in fileHandle.deviceList) {
|
||||
// if (item["point"] != null) {
|
||||
// bits = item["bits"];
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// // passTrackPlugin.map_setCenterDevice(bits);
|
||||
// setState(() {
|
||||
// if (fileHandle.pointData.isNotEmpty) {
|
||||
// maxLength = fileHandle.pointData.length;
|
||||
// // _value = maxLength;
|
||||
// _rangevalues = SfRangeValues(0.0, maxLength.toDouble());
|
||||
// }
|
||||
// // for (var item in fileHandle.deviceList) {
|
||||
// // if (item["point"] != null) {
|
||||
// // bits = item["bits"];
|
||||
// // break;
|
||||
// // }
|
||||
// // }
|
||||
// // // passTrackPlugin.map_setCenterDevice(bits);
|
||||
// // setState(() {
|
||||
// // if (fileHandle.pointData.isNotEmpty) {
|
||||
// // maxLength = fileHandle.pointData.length;
|
||||
// // // _value = maxLength;
|
||||
// // _rangevalues = SfRangeValues(0.0, maxLength.toDouble());
|
||||
// // }
|
||||
// // });
|
||||
// });
|
||||
});
|
||||
}
|
||||
// }
|
||||
|
||||
Future<void> initPlatformState() async {
|
||||
// String platformVersion;
|
||||
|
@ -12,50 +12,249 @@ import 'coor_trans.dart';
|
||||
final BlueToothController blueToothController = Get.put(BlueToothController());
|
||||
BlueSetting blueSetting = BlueSetting();
|
||||
|
||||
class XyChangeView extends StatefulWidget {
|
||||
const XyChangeView({super.key});
|
||||
// class XyChangeView extends StatefulWidget {
|
||||
// const XyChangeView({super.key});
|
||||
|
||||
@override
|
||||
State<XyChangeView> createState() => _XyChangeViewState();
|
||||
}
|
||||
// @override
|
||||
// State<XyChangeView> createState() => _XyChangeViewState();
|
||||
// }
|
||||
|
||||
class _XyChangeViewState extends State<XyChangeView> {
|
||||
List<Widget> list = [];
|
||||
CoorTransModel coorTrans = CoorTransModel(
|
||||
name: "",
|
||||
L0: 0,
|
||||
belt: "",
|
||||
dstEllipsoid: "",
|
||||
dx: 0,
|
||||
dy: 0,
|
||||
dz: 0,
|
||||
id: 0,
|
||||
wx: 0,
|
||||
wy: 0,
|
||||
wz: 0,
|
||||
k: 0,
|
||||
elevation: 0,
|
||||
isMain: 0,
|
||||
rota: 0,
|
||||
srcEllipsoid: "");
|
||||
// class _XyChangeViewState extends State<XyChangeView> {
|
||||
// List<Widget> list = [];
|
||||
// CoorTransModel coorTrans = CoorTransModel(
|
||||
// name: "",
|
||||
// L0: 0,
|
||||
// belt: "",
|
||||
// dstEllipsoid: "",
|
||||
// dx: 0,
|
||||
// dy: 0,
|
||||
// dz: 0,
|
||||
// id: 0,
|
||||
// wx: 0,
|
||||
// wy: 0,
|
||||
// wz: 0,
|
||||
// k: 0,
|
||||
// elevation: 0,
|
||||
// isMain: 0,
|
||||
// rota: 0,
|
||||
// srcEllipsoid: "");
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
List coordTransmap = await GetServices().getCoordTrans();
|
||||
if (coordTransmap.isNotEmpty) {
|
||||
var mianBelt =
|
||||
coordTransmap.firstWhere((element) => element['belt'] == 'main');
|
||||
coorTrans = CoorTransModel.fromJson(mianBelt);
|
||||
setState(() {});
|
||||
} else {
|
||||
print("当前项目没有设置中央子午线");
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
// @override
|
||||
// void initState() {
|
||||
// super.initState();
|
||||
// SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
// List coordTransmap = await GetServices().getCoordTrans();
|
||||
// if (coordTransmap.isNotEmpty) {
|
||||
// var mianBelt =
|
||||
// coordTransmap.firstWhere((element) => element['belt'] == 'main');
|
||||
// coorTrans = CoorTransModel.fromJson(mianBelt);
|
||||
// setState(() {});
|
||||
// } else {
|
||||
// print("当前项目没有设置中央子午线");
|
||||
// return;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// final deviceType = getDeviceType(context);
|
||||
// final size = MediaQuery.of(context).size;
|
||||
|
||||
// return Scaffold(
|
||||
// appBar: AppBar(
|
||||
// title: const Text("坐标转换"),
|
||||
// toolbarHeight: 40,
|
||||
// ),
|
||||
// body: Container(
|
||||
// margin: const EdgeInsets.all(5),
|
||||
// child: ListView.builder(
|
||||
// itemCount: 1,
|
||||
// itemBuilder: (BuildContext context, int index) {
|
||||
// TextEditingController l0Controller =
|
||||
// TextEditingController(text: coorTrans.L0.toString());
|
||||
// TextEditingController elevationController =
|
||||
// TextEditingController(text: coorTrans.elevation.toString());
|
||||
// TextEditingController dxController =
|
||||
// TextEditingController(text: coorTrans.dx.toString());
|
||||
// TextEditingController dyController =
|
||||
// TextEditingController(text: coorTrans.dy.toString());
|
||||
// TextEditingController dzController =
|
||||
// TextEditingController(text: coorTrans.dz.toString());
|
||||
// TextEditingController wxController =
|
||||
// TextEditingController(text: coorTrans.wx.toString());
|
||||
// TextEditingController wyController =
|
||||
// TextEditingController(text: coorTrans.wy.toString());
|
||||
// TextEditingController wzController =
|
||||
// TextEditingController(text: coorTrans.wz.toString());
|
||||
// TextEditingController kController =
|
||||
// TextEditingController(text: coorTrans.k.toString());
|
||||
// List<Widget> list1 = [
|
||||
// Flexible(
|
||||
// child: TextFormField(
|
||||
// keyboardType: TextInputType.number,
|
||||
// controller: l0Controller,
|
||||
// decoration: const InputDecoration(
|
||||
// prefixText: '中央子午线:',
|
||||
// border: InputBorder.none,
|
||||
// ),
|
||||
// onChanged: (String value) {
|
||||
// // coorTrans.L0 =(value);
|
||||
// },
|
||||
// )),
|
||||
// const Divider(),
|
||||
// Flexible(
|
||||
// child: TextFormField(
|
||||
// keyboardType: TextInputType.number,
|
||||
// controller: elevationController,
|
||||
// decoration: const InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
// prefixText: '投影高程:',
|
||||
// ),
|
||||
// onChanged: (String value) {
|
||||
// // coorTrans.L0 =(value);
|
||||
// },
|
||||
// )),
|
||||
// ];
|
||||
// List<Widget> list2 = [
|
||||
// Flexible(
|
||||
// child: TextFormField(
|
||||
// keyboardType: TextInputType.number,
|
||||
// controller: dxController,
|
||||
// decoration: const InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
// prefixText: 'x平移(m):',
|
||||
// ),
|
||||
// onChanged: (String value) {
|
||||
// // coorTrans.L0 =(value);
|
||||
// },
|
||||
// )),
|
||||
// const Divider(),
|
||||
// Flexible(
|
||||
// child: TextFormField(
|
||||
// keyboardType: TextInputType.number,
|
||||
// controller: dyController,
|
||||
// decoration: const InputDecoration(
|
||||
// prefixText: 'Y平移(米):',
|
||||
// border: InputBorder.none,
|
||||
// ),
|
||||
// onChanged: (String value) {
|
||||
// // coorTrans.L0 =(value);
|
||||
// },
|
||||
// )),
|
||||
// const Divider(),
|
||||
// Flexible(
|
||||
// child: TextFormField(
|
||||
// keyboardType: TextInputType.number,
|
||||
// controller: dzController,
|
||||
// decoration: const InputDecoration(
|
||||
// prefixText: 'Z平移(米):',
|
||||
// border: InputBorder.none,
|
||||
// ),
|
||||
// onChanged: (String value) {
|
||||
// // coorTrans.L0 =(value);
|
||||
// },
|
||||
// )),
|
||||
// const Divider(),
|
||||
// ];
|
||||
// List<Widget> list3 = [
|
||||
// Flexible(
|
||||
// child: TextFormField(
|
||||
// keyboardType: TextInputType.number,
|
||||
// controller: wxController,
|
||||
// decoration: const InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
// prefixText: 'X轴旋转(秒):',
|
||||
// ),
|
||||
// onChanged: (String value) {
|
||||
// // coorTrans.L0 =(value);
|
||||
// },
|
||||
// )),
|
||||
// const Divider(),
|
||||
// Flexible(
|
||||
// child: TextFormField(
|
||||
// keyboardType: TextInputType.number,
|
||||
// controller: wyController,
|
||||
// decoration: const InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
// prefixText: 'Y轴旋转(秒):',
|
||||
// ),
|
||||
// onChanged: (String value) {
|
||||
// // coorTrans.L0 =(value);
|
||||
// },
|
||||
// )),
|
||||
// const Divider(),
|
||||
// Flexible(
|
||||
// child: TextFormField(
|
||||
// keyboardType: TextInputType.number,
|
||||
// controller: wzController,
|
||||
// decoration: const InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
// prefixText: 'Z轴旋转(秒):',
|
||||
// ),
|
||||
// onChanged: (String value) {
|
||||
// // coorTrans.L0 =(value);
|
||||
// },
|
||||
// )),
|
||||
// const Divider(),
|
||||
// ];
|
||||
|
||||
// return Column(
|
||||
// children: <Widget>[
|
||||
// deviceType == DeviceType.mobile && size.width < 350
|
||||
// ? Column(
|
||||
// children: list1,
|
||||
// )
|
||||
// : Row(
|
||||
// children: list1,
|
||||
// ),
|
||||
// const Divider(),
|
||||
// deviceType == DeviceType.mobile && size.width < 350
|
||||
// ? Column(
|
||||
// children: list2,
|
||||
// )
|
||||
// : Row(children: list2),
|
||||
// const Divider(),
|
||||
// deviceType == DeviceType.mobile && size.width < 350
|
||||
// ? Column(
|
||||
// children: list3,
|
||||
// )
|
||||
// : Row(
|
||||
// children: list3,
|
||||
// ),
|
||||
// const Divider(),
|
||||
// SizedBox(
|
||||
// child: TextFormField(
|
||||
// keyboardType: TextInputType.number,
|
||||
// controller: kController,
|
||||
// decoration: const InputDecoration(
|
||||
// border: InputBorder.none,
|
||||
// prefixText: '尺度:',
|
||||
// ),
|
||||
// onChanged: (String value) {
|
||||
// // coorTrans.L0 =(value);
|
||||
// },
|
||||
// )),
|
||||
// const Divider(),
|
||||
// TextButton(
|
||||
// onPressed: () {
|
||||
// Connect().writeCoorTransValue(
|
||||
// blueToothController.connectedDeviceID.value,
|
||||
// coorTrans);
|
||||
// },
|
||||
// child: const Text("更新设置"))
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ));
|
||||
// }
|
||||
// }
|
||||
|
||||
class XyChangeView extends StatelessWidget {
|
||||
XyChangeView({super.key});
|
||||
|
||||
final XYChangeController _controller = Get.put(XYChangeController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final deviceType = getDeviceType(context);
|
||||
@ -71,24 +270,24 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
child: ListView.builder(
|
||||
itemCount: 1,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
TextEditingController l0Controller =
|
||||
TextEditingController(text: coorTrans.L0.toString());
|
||||
TextEditingController elevationController =
|
||||
TextEditingController(text: coorTrans.elevation.toString());
|
||||
TextEditingController dxController =
|
||||
TextEditingController(text: coorTrans.dx.toString());
|
||||
TextEditingController dyController =
|
||||
TextEditingController(text: coorTrans.dy.toString());
|
||||
TextEditingController dzController =
|
||||
TextEditingController(text: coorTrans.dz.toString());
|
||||
TextEditingController wxController =
|
||||
TextEditingController(text: coorTrans.wx.toString());
|
||||
TextEditingController wyController =
|
||||
TextEditingController(text: coorTrans.wy.toString());
|
||||
TextEditingController wzController =
|
||||
TextEditingController(text: coorTrans.wz.toString());
|
||||
TextEditingController kController =
|
||||
TextEditingController(text: coorTrans.k.toString());
|
||||
TextEditingController l0Controller = TextEditingController(
|
||||
text: _controller.coorTrans.value.L0.toString());
|
||||
TextEditingController elevationController = TextEditingController(
|
||||
text: _controller.coorTrans.value.elevation.toString());
|
||||
TextEditingController dxController = TextEditingController(
|
||||
text: _controller.coorTrans.value.dx.toString());
|
||||
TextEditingController dyController = TextEditingController(
|
||||
text: _controller.coorTrans.value.dy.toString());
|
||||
TextEditingController dzController = TextEditingController(
|
||||
text: _controller.coorTrans.value.dz.toString());
|
||||
TextEditingController wxController = TextEditingController(
|
||||
text: _controller.coorTrans.value.wx.toString());
|
||||
TextEditingController wyController = TextEditingController(
|
||||
text: _controller.coorTrans.value.wy.toString());
|
||||
TextEditingController wzController = TextEditingController(
|
||||
text: _controller.coorTrans.value.wz.toString());
|
||||
TextEditingController kController = TextEditingController(
|
||||
text: _controller.coorTrans.value.k.toString());
|
||||
List<Widget> list1 = [
|
||||
Flexible(
|
||||
child: TextFormField(
|
||||
@ -99,7 +298,7 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
border: InputBorder.none,
|
||||
),
|
||||
onChanged: (String value) {
|
||||
// coorTrans.L0 =(value);
|
||||
// _controller.coorTrans.value.L0 =(value);
|
||||
},
|
||||
)),
|
||||
const Divider(),
|
||||
@ -112,7 +311,7 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
prefixText: '投影高程:',
|
||||
),
|
||||
onChanged: (String value) {
|
||||
// coorTrans.L0 =(value);
|
||||
// _controller.coorTrans.value.L0 =(value);
|
||||
},
|
||||
)),
|
||||
];
|
||||
@ -126,7 +325,7 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
prefixText: 'x平移(m):',
|
||||
),
|
||||
onChanged: (String value) {
|
||||
// coorTrans.L0 =(value);
|
||||
// _controller.coorTrans.value.L0 =(value);
|
||||
},
|
||||
)),
|
||||
const Divider(),
|
||||
@ -139,7 +338,7 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
border: InputBorder.none,
|
||||
),
|
||||
onChanged: (String value) {
|
||||
// coorTrans.L0 =(value);
|
||||
// _controller.coorTrans.value.L0 =(value);
|
||||
},
|
||||
)),
|
||||
const Divider(),
|
||||
@ -152,7 +351,7 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
border: InputBorder.none,
|
||||
),
|
||||
onChanged: (String value) {
|
||||
// coorTrans.L0 =(value);
|
||||
// _controller.coorTrans.value.L0 =(value);
|
||||
},
|
||||
)),
|
||||
const Divider(),
|
||||
@ -167,7 +366,7 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
prefixText: 'X轴旋转(秒):',
|
||||
),
|
||||
onChanged: (String value) {
|
||||
// coorTrans.L0 =(value);
|
||||
// _controller.coorTrans.value.L0 =(value);
|
||||
},
|
||||
)),
|
||||
const Divider(),
|
||||
@ -180,7 +379,7 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
prefixText: 'Y轴旋转(秒):',
|
||||
),
|
||||
onChanged: (String value) {
|
||||
// coorTrans.L0 =(value);
|
||||
// _controller.coorTrans.value.L0 =(value);
|
||||
},
|
||||
)),
|
||||
const Divider(),
|
||||
@ -193,7 +392,7 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
prefixText: 'Z轴旋转(秒):',
|
||||
),
|
||||
onChanged: (String value) {
|
||||
// coorTrans.L0 =(value);
|
||||
// _controller.coorTrans.value.L0 =(value);
|
||||
},
|
||||
)),
|
||||
const Divider(),
|
||||
@ -232,7 +431,7 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
prefixText: '尺度:',
|
||||
),
|
||||
onChanged: (String value) {
|
||||
// coorTrans.L0 =(value);
|
||||
// _controller.coorTrans.value.L0 =(value);
|
||||
},
|
||||
)),
|
||||
const Divider(),
|
||||
@ -240,7 +439,7 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
onPressed: () {
|
||||
Connect().writeCoorTransValue(
|
||||
blueToothController.connectedDeviceID.value,
|
||||
coorTrans);
|
||||
_controller.coorTrans.value);
|
||||
},
|
||||
child: const Text("更新设置"))
|
||||
],
|
||||
@ -250,3 +449,40 @@ class _XyChangeViewState extends State<XyChangeView> {
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
class XYChangeController extends GetxController {
|
||||
List<Widget> list = [];
|
||||
var coorTrans = CoorTransModel(
|
||||
name: "",
|
||||
L0: 0,
|
||||
belt: "",
|
||||
dstEllipsoid: "",
|
||||
dx: 0,
|
||||
dy: 0,
|
||||
dz: 0,
|
||||
id: 0,
|
||||
wx: 0,
|
||||
wy: 0,
|
||||
wz: 0,
|
||||
k: 0,
|
||||
elevation: 0,
|
||||
isMain: 0,
|
||||
rota: 0,
|
||||
srcEllipsoid: "",
|
||||
).obs;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
List coordTransmap = await GetServices().getCoordTrans();
|
||||
if (coordTransmap.isNotEmpty) {
|
||||
var mianBelt =
|
||||
coordTransmap.firstWhere((element) => element['belt'] == 'main');
|
||||
coorTrans.value = CoorTransModel.fromJson(mianBelt);
|
||||
} else {
|
||||
print("当前项目没有设置中央子午线");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ class _SettingPortraitState extends State<SettingPortrait> {
|
||||
// }),
|
||||
ListItem('坐标转换', Icons.settings, () {
|
||||
Navigator.push(context,
|
||||
MaterialPageRoute(builder: (context) => const XyChangeView()));
|
||||
MaterialPageRoute(builder: (context) => XyChangeView()));
|
||||
}),
|
||||
ListItem('个人中心', Icons.person_outline_outlined, () {
|
||||
Navigator.push(context,
|
||||
|
@ -3,10 +3,12 @@ import 'package:get/get.dart';
|
||||
class PileGenerController extends GetxController {
|
||||
var isPileCardVisible = false.obs; // 控制生成桩点的卡片是否可见
|
||||
var isRealViewCardVisible = false.obs; // 控制生成桩点的卡片是否可见
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
// 监听 isRealViewCardVisible 的变化
|
||||
|
||||
ever(isRealViewCardVisible, (bool isVisible) {
|
||||
if (isVisible) {
|
||||
isPileCardVisible.value = false;
|
||||
|
@ -303,7 +303,7 @@ class PileGenerateCard extends StatelessWidget {
|
||||
child: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(color: Colors.transparent),
|
||||
child: Stack(children: [
|
||||
child: const Stack(children: [
|
||||
Card(
|
||||
color: Colors.transparent,
|
||||
elevation: 5.0,
|
||||
@ -348,7 +348,7 @@ class PileGenerateCard1 extends StatelessWidget {
|
||||
child: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(color: Colors.transparent),
|
||||
child: Stack(children: [
|
||||
child: const Stack(children: [
|
||||
Card(
|
||||
color: Colors.transparent,
|
||||
elevation: 5.0,
|
||||
|
Loading…
Reference in New Issue
Block a user