92 lines
2.6 KiB
Dart
Executable File

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/tools/noData.dart';
import '../../../../../app_settings/app_colors.dart';
import '../../../../../tools/titleAppBar.dart';
class SelectWirelessKeyboardPage extends StatefulWidget {
const SelectWirelessKeyboardPage({Key? key}) : super(key: key);
@override
State<SelectWirelessKeyboardPage> createState() =>
_SelectWirelessKeyboardPageState();
}
class _SelectWirelessKeyboardPageState extends State<SelectWirelessKeyboardPage> {
List dataList = [];
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: '选择无线键盘'.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: dataList.isEmpty
? NoData()
: ListView.builder(
itemCount: 20,
itemBuilder: (c, index) {
return nearbyLockItem('images/icon_lock.png', '', () {
// Navigator.pushNamed(context, Routers.saveLockPage);
});
}),
);
}
Widget nearbyLockItem(
String lockTypeIcon, String lockTypeTitle, Function() action) {
return GestureDetector(
onTap: action,
child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 80.h,
color: Colors.white,
child: Row(
children: [
// SizedBox(width:20.w),
// Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
SizedBox(width: 20.w),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 24.sp,
),
),
],
),
),
SizedBox(width: 20.w),
Image.asset(
'images/main/icon_main_addLock.png',
width: 36.w,
height: 36.w,
),
SizedBox(width: 30.w),
],
),
),
Container(
height: 0.5.h,
color: Colors.grey,
)
],
),
);
}
void onShow() {}
void onHide() {}
}