You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
159 lines
5.2 KiB
159 lines
5.2 KiB
2 years ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||
|
import 'package:project_telephony/ui/home/home_page.dart';
|
||
|
import 'package:project_telephony/utils/headers.dart';
|
||
|
import 'package:project_telephony/ui/widget/plone_bottom.dart';
|
||
|
|
||
|
import '../../../base/base_style.dart';
|
||
|
|
||
|
import '../../widget/plone_back_button.dart';
|
||
|
|
||
|
class SpecifyPhonePage extends StatefulWidget {
|
||
|
const SpecifyPhonePage({Key? key}) : super(key: key);
|
||
|
|
||
|
@override
|
||
|
_SpecifyPhonePageState createState() => _SpecifyPhonePageState();
|
||
|
}
|
||
|
|
||
|
class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
|
||
|
final EasyRefreshController _refreshController = EasyRefreshController();
|
||
|
|
||
|
@override
|
||
|
void dispose() {
|
||
|
_refreshController.dispose();
|
||
|
super.dispose();
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Scaffold(
|
||
|
appBar: AppBar(
|
||
|
elevation: 0,
|
||
|
title: Text(
|
||
|
'发送号码设置',
|
||
|
style: TextStyle(
|
||
|
fontSize: BaseStyle.fontSize34,
|
||
|
color: BaseStyle.color333333,
|
||
|
fontWeight: FontWeight.bold),
|
||
|
),
|
||
|
titleSpacing: 162.w,
|
||
|
leading: const CloudBackButton(isSpecial: true),
|
||
|
backgroundColor: kForeGroundColor),
|
||
|
backgroundColor: kForeGroundColor,
|
||
|
body: EasyRefresh(
|
||
|
firstRefresh: true,
|
||
|
controller: _refreshController,
|
||
|
header: MaterialHeader(),
|
||
|
// footer: MaterialFooter(),
|
||
|
onRefresh: () async {
|
||
|
// await userProvider.updateUserInfo();
|
||
|
|
||
|
setState(() {});
|
||
|
},
|
||
|
child: ListView(
|
||
|
children: [
|
||
|
_getNullList(),
|
||
|
PloneBottom(
|
||
|
onTap: () {
|
||
|
showModalBottomSheet(
|
||
|
builder: (BuildContext context) {
|
||
|
return Container(
|
||
|
width: double.infinity,
|
||
|
height: 750.w,
|
||
|
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||
|
child: Column(
|
||
|
children: [
|
||
|
48.hb,
|
||
|
Text(
|
||
|
"添加号码",
|
||
|
style: TextStyle(
|
||
|
fontSize: 34.w,
|
||
|
fontWeight: FontWeight.bold),
|
||
|
),
|
||
|
Expanded(
|
||
|
child: ListView(
|
||
|
children: [
|
||
|
_getAddPhone("通话记录添加", "通过本机通话记录添加号码", () {
|
||
|
|
||
|
}),
|
||
|
_getAddPhone("通迅录添加", "通过本机通讯录添加号码", () {}),
|
||
|
_getAddPhone(
|
||
|
"添加单个或批量号码", "通过输入号码段添加批量号码", () {}),
|
||
|
],
|
||
|
)),
|
||
|
PloneBottom(
|
||
|
onTap: () {
|
||
|
Navigator.pop(context);
|
||
|
},
|
||
|
hPadding: 32,
|
||
|
border: true,
|
||
|
textColor: const Color(0xFF1890FF),
|
||
|
color2: const Color(0xFFF9F9F9),
|
||
|
color1: const Color(0xFFF9F9F9),
|
||
|
text: "取消",
|
||
|
),
|
||
|
32.hb
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
},
|
||
|
context: context);
|
||
|
},
|
||
|
border: true,
|
||
|
color2: const Color(0xFF74BCFF),
|
||
|
color1: const Color(0xFF1890FF),
|
||
|
text: "添加",
|
||
|
),
|
||
|
],
|
||
|
)),
|
||
|
);
|
||
|
}
|
||
|
|
||
|
_getAddPhone(String title, String text, VoidCallback widget) {
|
||
|
return GestureDetector(
|
||
|
onTap: widget,
|
||
|
child: ListTile(
|
||
|
title: Text(
|
||
|
title,
|
||
|
style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.bold),
|
||
|
),
|
||
|
subtitle: Text(
|
||
|
text,
|
||
|
style: TextStyle(fontSize: 28.sp, color: BaseStyle.color999999),
|
||
|
),
|
||
|
trailing: const Icon(Icons.chevron_right),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
|
||
|
_getNullList() {
|
||
|
return Column(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
children: [
|
||
|
490.hb,
|
||
|
Image.asset(
|
||
|
Assets.icons.nullphonelist.path,
|
||
|
width: 240.w,
|
||
|
height: 212.w,
|
||
|
fit: BoxFit.fill,
|
||
|
),
|
||
|
48.hb,
|
||
|
Text(
|
||
|
"这里是空的",
|
||
|
style: TextStyle(
|
||
|
color: const Color(0xFF999999),
|
||
|
fontWeight: FontWeight.bold,
|
||
|
fontSize: 36.sp),
|
||
|
),
|
||
|
16.hb,
|
||
|
Text(
|
||
|
"还没有添加指定号码",
|
||
|
style: TextStyle(color: const Color(0xFF999999), fontSize: 28.sp),
|
||
|
),
|
||
|
490.hb,
|
||
|
],
|
||
|
);
|
||
|
}
|
||
|
}
|