app-starlock/lib/mine/gateway/gatewayConnectionLock/gatewayConnectionLockList_page.dart
2024-05-18 09:37:50 +08:00

99 lines
3.4 KiB
Dart
Executable File

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../app_settings/app_colors.dart';
import '../../../tools/titleAppBar.dart';
import '../../../translations/trans_lib.dart';
class GatewayConnectionLockListPage extends StatefulWidget {
const GatewayConnectionLockListPage({Key? key}) : super(key: key);
@override
State<GatewayConnectionLockListPage> createState() => _GatewayConnectionLockListPageState();
}
class _GatewayConnectionLockListPageState extends State<GatewayConnectionLockListPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.gateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body: Column(
children: [
Container(
width: 1.sw,
color: Colors.grey.shade300,
padding: EdgeInsets.all(15.h),
child: Text(TranslationLoader.lanKeys!.gatewayConnectionLock!.tr)
),
Expanded(
child: ListView.builder(
itemCount:10,
itemBuilder: (c, index){
return _gatewayConnectionLockListItem('images/mine/icon_mine_gatewaySignal_prompt.png', "MCBN01 8f3106", TranslationLoader.lanKeys!.strongSignal!.tr,(){
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
});
}
),
)
],
),
);
}
Widget _gatewayConnectionLockListItem(String lockTypeIcon, String gateWayName, String signalStrength, Function() action){
return GestureDetector(
onTap: action,
child: Container(
// height: 100.h,
margin: const EdgeInsets.only(bottom: 2),
padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
),
child: Row(
children: [
SizedBox(width: 10.w,),
Image.asset(lockTypeIcon, width: 90.w, height: 90.w,),
SizedBox(width: 20.w,),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
// color: Colors.red,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(gateWayName, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
],
),
),
SizedBox(height:5.h),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,),
SizedBox(width: 10.w,),
Text(signalStrength, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
],
),
),
SizedBox(width:20.h),
],
),
),
SizedBox(width:20.h),
],
),
),
);
}
}