58 lines
1.4 KiB
Dart
Executable File
58 lines
1.4 KiB
Dart
Executable File
import 'dart:async';
|
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:star_lock/main/lockMian/lockMain/lockMain_page.dart';
|
|
import 'package:star_lock/main/lockMian/lockMain/xhj/lockMain_xhj_state.dart';
|
|
import 'package:star_lock/tools/baseGetXController.dart';
|
|
|
|
class LockMainXHJLogic extends BaseGetXController {
|
|
final LockMainXHJState state = LockMainXHJState();
|
|
|
|
void setIndex(int index) {
|
|
state.index = index;
|
|
update();
|
|
}
|
|
|
|
bool get isMall => state.index ==1;
|
|
|
|
//打开设备弹窗
|
|
void openEquipment() {
|
|
showModalBottomSheet(
|
|
context: Get.context!,
|
|
isScrollControlled: true,
|
|
backgroundColor: Colors.white,
|
|
builder: (context) {
|
|
return ClipRRect(
|
|
borderRadius: BorderRadius.only(
|
|
topLeft: Radius.circular(16.r),
|
|
topRight: Radius.circular(16.r),
|
|
),
|
|
child: SizedBox(
|
|
height: Get.height * 0.7,
|
|
child: StarLockMainPage(
|
|
showAppBar: false,
|
|
showDrawer: false,
|
|
),
|
|
),
|
|
);
|
|
});
|
|
}
|
|
|
|
@override
|
|
void onReady() {
|
|
super.onReady();
|
|
}
|
|
|
|
@override
|
|
void onInit() {
|
|
super.onInit();
|
|
}
|
|
|
|
@override
|
|
void onClose() {
|
|
super.onClose();
|
|
}
|
|
}
|