Merge branch 'master' of https://git.oa00.com/austin_dai/project_telephony
# Conflicts: # lib/ui/widget/appdialog.dartmaster
commit
33e19f8d3d
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,158 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:project_telephony/ui/home/set/specify_phone_page.dart';
|
||||
import 'package:project_telephony/utils/headers.dart';
|
||||
|
||||
import '../../../base/base_style.dart';
|
||||
|
||||
import '../../widget/plone_back_button.dart';
|
||||
|
||||
// class setItem{
|
||||
//
|
||||
// }
|
||||
|
||||
class PhoneSetPage extends StatefulWidget {
|
||||
const PhoneSetPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_PhoneSetPageState createState() => _PhoneSetPageState();
|
||||
}
|
||||
|
||||
class _PhoneSetPageState extends State<PhoneSetPage> {
|
||||
int select = 0;
|
||||
List setList = [
|
||||
{
|
||||
"icon": Assets.icons.rylyphone.path,
|
||||
"title": "任意来源号码发送",
|
||||
"text": "所有的号码来电都会发送",
|
||||
// "select": true,
|
||||
},
|
||||
{
|
||||
"icon": Assets.icons.txlphone.path,
|
||||
"title": "在通讯录中的号码发送",
|
||||
"text": "只给在通讯录中的号码来电发送",
|
||||
// "select": false,
|
||||
},
|
||||
{
|
||||
"icon": Assets.icons.notxlphone.path,
|
||||
"title": "不在通讯录中的号码发送",
|
||||
"text": "只给不在通讯录中的号码来电发送",
|
||||
// "select": false,
|
||||
},
|
||||
];
|
||||
|
||||
@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: Column(
|
||||
children: [
|
||||
_getList(),
|
||||
24.hb,
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.to(()=>const SpecifyPhonePage());
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 30.w),
|
||||
height: 144.w,
|
||||
child: ListTile(
|
||||
leading: SizedBox(
|
||||
width: 72.w,
|
||||
height: 72.w,
|
||||
child: Image.asset(
|
||||
Assets.icons.zdphone.path,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
title: Text(
|
||||
"指定号码不发送",
|
||||
style:
|
||||
TextStyle(fontSize: 32.sp, fontWeight: FontWeight.bold),
|
||||
),
|
||||
subtitle: Text(
|
||||
"通过添加指定号码来设置不发送",
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, color: const Color(0xFF999999)),
|
||||
),
|
||||
trailing: SizedBox(
|
||||
width: 48.w,
|
||||
height: 48.w,
|
||||
child: const Icon(Icons.arrow_forward_ios),
|
||||
)),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_getList() {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 30.w),
|
||||
height: 500.w,
|
||||
child: ListView.builder(
|
||||
itemBuilder: (context, index) {
|
||||
return _getListBox(setList, index);
|
||||
},
|
||||
itemCount: setList.length,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_getListBox(List item, int index) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
select = index;
|
||||
// print(_selectIndex);
|
||||
setState(() {});
|
||||
},
|
||||
child: ListTile(
|
||||
leading: SizedBox(
|
||||
width: 72.w,
|
||||
height: 72.w,
|
||||
child: Image.asset(
|
||||
item[index]["icon"],
|
||||
fit: BoxFit.fill,
|
||||
)),
|
||||
title: Text(
|
||||
item[index]["title"],
|
||||
style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.bold),
|
||||
),
|
||||
subtitle: Text(
|
||||
item[index]["text"],
|
||||
style: TextStyle(fontSize: 28.sp, color: const Color(0xFF999999)),
|
||||
),
|
||||
trailing: SizedBox(
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
child: Radio(
|
||||
onChanged: (int? value) {
|
||||
select = index;
|
||||
// print(_selectIndex);
|
||||
setState(() {});
|
||||
},
|
||||
groupValue: select,
|
||||
value: index,
|
||||
),
|
||||
),
|
||||
|
||||
// BeeCheckRadio(
|
||||
// value: index,
|
||||
// groupValue: [select],
|
||||
// ),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
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,
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue