app-starlock/star_lock/lib/mine/message/messageList_page.dart
2023-07-18 18:10:57 +08:00

86 lines
3.0 KiB
Dart

import 'package:flutter/material.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 MessageListPage extends StatefulWidget {
const MessageListPage({Key? key}) : super(key: key);
@override
State<MessageListPage> createState() => _MessageListPageState();
}
class _MessageListPageState extends State<MessageListPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.message!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
body: ListView.builder(
itemCount:10,
itemBuilder: (c, index){
return _seletGatewayListListItem('images/mine/icon_mine_gatewayListMainIcon.png', "您的钥匙已发送成功", "2023.6.21 11.15", (){
// Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage);
});
}
),
);
}
Widget _seletGatewayListListItem(String lockTypeIcon, String gateWayName, String networkSignal, 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: 80.w, height: 80.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(networkSignal, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
],
),
),
SizedBox(width:20.h),
],
),
)
],
),
),
);
}
}