78 lines
2.2 KiB
Dart
Executable File
78 lines
2.2 KiB
Dart
Executable File
|
||
import 'package:flutter/material.dart';
|
||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
import 'package:get/get.dart';
|
||
|
||
import '../../../../appRouters.dart';
|
||
import '../../../../app_settings/app_colors.dart';
|
||
import '../../../../tools/titleAppBar.dart';
|
||
import '../../../../translations/trans_lib.dart';
|
||
|
||
class LockAddressPage extends StatefulWidget {
|
||
const LockAddressPage({Key? key}) : super(key: key);
|
||
|
||
@override
|
||
State<LockAddressPage> createState() => _LockAddressPageState();
|
||
}
|
||
|
||
class _LockAddressPageState extends State<LockAddressPage> with RouteAware{
|
||
Map<String, Object>? addressInfo;
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return Scaffold(
|
||
backgroundColor: AppColors.mainBackgroundColor,
|
||
appBar: TitleAppBar(
|
||
barTitle: TranslationLoader.lanKeys!.lockAddress!.tr,
|
||
haveBack: true,
|
||
backgroundColor: AppColors.mainColor,
|
||
actionsList: [
|
||
TextButton(
|
||
child: Text(
|
||
TranslationLoader.lanKeys!.next!.tr,
|
||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||
),
|
||
onPressed: () {
|
||
if(addressInfo!.isEmpty){
|
||
EasyLoading.showToast("请先获取到位置信息哦!", duration: 2000.milliseconds);
|
||
return;
|
||
}
|
||
Get.toNamed(Routers.saveLockPage, arguments: addressInfo);
|
||
// Navigator.pushNamed(context, Routers.saveLockPage);
|
||
},
|
||
),
|
||
],
|
||
),
|
||
// body: LockAddressGaoDePage(callback: (addressInfoMap){
|
||
// addressInfo = addressInfoMap;
|
||
// },)
|
||
body: Container(),
|
||
);
|
||
}
|
||
|
||
@override
|
||
void dispose() {
|
||
super.dispose();
|
||
// routeObserver.unsubscribe(this);
|
||
}
|
||
|
||
@override
|
||
void didChangeDependencies() {
|
||
super.didChangeDependencies();
|
||
// 订阅 routeObserver,之后就会尝试调用抽象类 RouteAware 的方法
|
||
// routeObserver.subscribe(this, ModalRoute.of(context) as PageRoute);
|
||
}
|
||
|
||
@override
|
||
void didPush() {
|
||
// 当前页面入栈
|
||
}
|
||
|
||
@override
|
||
void didPopNext() {
|
||
// 当前路由的下个路由出栈,且当前页面显示
|
||
}
|
||
|
||
}
|