布局更改

master
王亚玲 2 years ago
parent c85c2ebd10
commit 29b26d623e

@ -1,11 +1,12 @@
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_contacts/contact.dart';
import 'package:flutter_contacts/flutter_contacts.dart'; import 'package:flutter_contacts/flutter_contacts.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:get/get_utils/get_utils.dart';
import 'package:project_telephony/ui/widget/scaffold_theme_widget.dart'; import 'package:project_telephony/ui/widget/scaffold_theme_widget.dart';
class ExcludeContactsPage extends StatefulWidget { class ExcludeContactsPage extends StatefulWidget {

@ -1,9 +1,12 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:project_telephony/utils/headers.dart';
import 'package:project_telephony/ui/widget/scaffold_theme_widget.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import '../../base/base_style.dart';
import '../widget/plone_back_button.dart';
import '../widget/plone_bottom.dart';
class ExcludeSinglePage extends StatefulWidget { class ExcludeSinglePage extends StatefulWidget {
const ExcludeSinglePage({Key? key}) : super(key: key); const ExcludeSinglePage({Key? key}) : super(key: key);
@ -12,33 +15,59 @@ class ExcludeSinglePage extends StatefulWidget {
} }
class _ExcludeSinglePageState extends State<ExcludeSinglePage> { class _ExcludeSinglePageState extends State<ExcludeSinglePage> {
String phone="";
String name="";
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ScaffoldThemeWidget( return Scaffold(
title: '添加单个或批量号码', appBar: AppBar(
bottom: "添加", elevation: 0,
onTap: () {}, title: Text(
child: Container( '添加单个或批量号码',
style: TextStyle(
fontSize: BaseStyle.fontSize34,
color: BaseStyle.color333333,
fontWeight: FontWeight.bold),
),
titleSpacing: 110.w,
leading: const CloudBackButton(isSpecial: true),
backgroundColor: kForeGroundColor),
backgroundColor: Colors.white,
body: Container(
padding: EdgeInsets.only(top: 25.h, left: 50.w, right: 50.w), padding: EdgeInsets.only(top: 25.h, left: 50.w, right: 50.w),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
addNumber("号码", "请输入号码"), addNumber("号码", "请输入号码"),
15.heightBox, 40.hb,
addNumber("名称", "请输入名称"), addNumber("名称", "请输入名称"),
15.heightBox, 43.hb,
RichText( Text(
text: const TextSpan( "使用说明:",
children: [ style: TextStyle(color: BaseStyle.color999999, fontSize: 28.sp),
TextSpan(text: "使用说明:"),
TextSpan(text: "如输入000*可屏蔽所有000开头的号码")
],
),
), ),
12.hb,
Text("如输入00852*可匹配所有00852开头的号码",
style: TextStyle(color: BaseStyle.color999999, fontSize: 28.sp))
// RichText(
// text: const TextSpan(
// children: [
// TextSpan(text: "使用说明:"),
// TextSpan(text: "如输入000*可屏蔽所有000开头的号码")
// ],
// ),
// ),
], ],
), ),
), ),
bottomNavigationBar: PloneBottom(
onTap: (){},
border: name.isEmpty || phone.isEmpty,
opacity:name.isEmpty || phone.isEmpty ? 0.4 : 1,
text: "添加",
).paddingOnly(bottom: 30.w),
); );
} }
@ -48,19 +77,34 @@ class _ExcludeSinglePageState extends State<ExcludeSinglePage> {
children: [ children: [
Text( Text(
title, title,
style: const TextStyle( style: TextStyle(
fontSize: 18, fontSize: 28.sp,
color: Colors.black38, color: Colors.black38,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
15.heightBox, 15.heightBox,
TextField( CupertinoTextField(
decoration: InputDecoration( padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 20.w),
hintText: content, decoration: BoxDecoration(
border: const OutlineInputBorder( border: Border.all(color: Colors.white),
), // borderRadius: BorderRadius.all(
), // Radius.circular(4.w)
// ),
color: const Color(0xFFF9F9F9)),
placeholderStyle:
TextStyle(color: BaseStyle.color999999, fontSize: 28.sp),
placeholder: content,
onChanged: (value) {
if(title=="号码"){
phone=value;
print("phone:$phone");
}else{
name=value;
print("name:$name");
}
setState(() {});
},
), ),
], ],
); );

@ -0,0 +1,21 @@
import 'package:project_telephony/constants/api.dart';
import 'package:project_telephony/model/network/api_client.dart';
import 'package:project_telephony/utils/inner_model/base_list_model.dart';
import '../../../../model/exclude_phone_model.dart';
import '../../../../utils/toast/cloud_toast.dart';
class ExcludeFunc {
//
static Future<List<ExcludePhoneModel>> getContacts() async {
BaseListModel res=await apiClient.requestList(API.exclude.find,);
if(res.code==0){
return res.nullSafetyList.map((e) => ExcludePhoneModel.fromJson(e)).toList();
}else{
CloudToast.show(res.msg);
return [];
}
}
//
// static Future<bool>
}

@ -3,13 +3,14 @@ import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:project_telephony/base/base_style.dart'; import 'package:project_telephony/base/base_style.dart';
import 'package:project_telephony/constants/api.dart';
import 'package:project_telephony/model/network/api_client.dart';
import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/headers.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import '../../../../model/phone_num_model.dart'; import '../../../../model/phone_num_model.dart';
import '../../../../utils/toast/cloud_toast.dart';
import '../../../widget/scaffold_theme_widget.dart'; import '../../../widget/scaffold_theme_widget.dart';
class CallRecordsList extends StatefulWidget { class CallRecordsList extends StatefulWidget {
const CallRecordsList({Key? key}) : super(key: key); const CallRecordsList({Key? key}) : super(key: key);
@ -20,27 +21,27 @@ class CallRecordsList extends StatefulWidget {
class _CallRecordsListState extends State<CallRecordsList> { class _CallRecordsListState extends State<CallRecordsList> {
List<PhoneNumModel> phoneNum = []; List<PhoneNumModel> phoneNum = [];
List<PhoneNumModel> phoneNum2 = []; List<PhoneNumModel> phoneNum2 = [];
List<String> phoneNum3 = [];
final EasyRefreshController _easyRefreshController = EasyRefreshController(); final EasyRefreshController _easyRefreshController = EasyRefreshController();
late bool notifications; late bool notifications;
late bool trackHistory; late bool trackHistory;
late bool instantOrders; late bool instantOrders;
late SharedPreferences prefs; late SharedPreferences prefs;
List<String> numList = []; List<String> numList = [];
// List<String> =[]
@override @override
void initState() { void initState() {
// getList(); // getList();
getList(); getList();
super.initState(); super.initState();
} }
@override @override
void dispose() { void dispose() {
_easyRefreshController.dispose(); _easyRefreshController.dispose();
super.dispose(); super.dispose();
} }
getList() async { getList() async {
phoneNum.clear(); phoneNum.clear();
final Iterable<CallLogEntry> entries = await CallLog.query(); final Iterable<CallLogEntry> entries = await CallLog.query();
@ -55,33 +56,87 @@ class _CallRecordsListState extends State<CallRecordsList> {
)); ));
} }
} }
for(int i=0;i<phoneNum.length;i++){
phoneNum2.add(PhoneNumModel(
num: phoneNum[i].num,
time: phoneNum[i].time,
name: phoneNum[i].name,
state: phoneNum[i].state,
));
} }
// for (CallLogEntry entrie in entries) {
// if (!numList.contains(entrie.number)) {
// numList.add(entrie.number!);
// phoneNum.add(PhoneNumModel(
// num: entrie.number,
// time: entrie.timestamp,
// name: entrie.name,
// state: false,
// ));
// }
// }
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var profileBuilder = FutureBuilder(
future: getList() , // a Future<String> or null
builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
if(snapshot.connectionState==ConnectionState.done){
return ListView.builder(
itemBuilder: (context, index) {
return _getBox(phoneNum[index]);
},
itemCount: phoneNum.length,
);
}else{
return const SizedBox();
}
});
return ScaffoldThemeWidget( return ScaffoldThemeWidget(
bottom: '添加', bottom: '添加',
title: '从通话记录添加', title: '从通话记录添加',
isBorder: true, isBorder: true,
isOpacity: false, isOpacity: phoneNum3.isNotEmpty,
onTap: () { onTap: () async{
if(phoneNum3.isEmpty){
CloudToast.show('请选择手机号');
}else{
var res=await apiClient.request(API.exclude.add,data: {});
print(phoneNum3);
}
// _easyRefreshController.callRefresh();
// phoneNum3.clear();
}, },
child: profileBuilder child: EasyRefresh(
); firstRefresh: true,
header: MaterialHeader(),
controller: _easyRefreshController,
onRefresh: () async {
getList();
setState(() {});
},
child:
ListView.builder(
itemBuilder: (context, index) {
return _getBox(phoneNum2[index],phoneNum2[index].num!);
},
itemCount: phoneNum2.length,
),
));
// var profileBuilder = FutureBuilder(
// // future: _incrementCounter(),
// future: getList() , // a Future<String> or null
// builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
// if(snapshot.connectionState==ConnectionState.done){
// return ListView.builder(
// itemBuilder: (context, index) {
// return _getBox(phoneNum[index]);
// },
// itemCount: phoneNum.length,
// );
// }else{
// return const SizedBox();
// }
// });
// return ScaffoldThemeWidget(
// bottom: '添加',
// title: '从通话记录添加',
// isBorder: true,
// isOpacity: false,
// onTap: () {
//
// },
// child: profileBuilder
// );
// Column( // Column(
// children: [ // children: [
// Container(width: 750.w, height: 1000.w, child: Text("") // Container(width: 750.w, height: 1000.w, child: Text("")
@ -103,12 +158,16 @@ return ScaffoldThemeWidget(
// ); // );
} }
_getBox(PhoneNumModel item) { _getBox(PhoneNumModel item, String index) {
return CheckboxListTile( return CheckboxListTile(
onChanged: (bool? value) { onChanged: (bool? value) {
setState(() { setState(() {
item.state = value!; item.state = value!;
if(item.state){
phoneNum3.add(index);
}else{
phoneNum3.remove(index);
}
}); });
}, },
value: item.state, value: item.state,

@ -11,6 +11,7 @@ import '../../widget/plone_back_button.dart';
// } // }
class PhoneSetPage extends StatefulWidget { class PhoneSetPage extends StatefulWidget {
const PhoneSetPage({Key? key}) : super(key: key); const PhoneSetPage({Key? key}) : super(key: key);
@override @override

@ -1,18 +1,21 @@
import 'package:call_log/call_log.dart'; import 'dart:ffi';
import 'package:flustars/flustars.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:project_telephony/constants/api.dart';
import 'package:project_telephony/model/network/api_client.dart';
import 'package:project_telephony/ui/exclude/exclude_contacts_page.dart'; import 'package:project_telephony/ui/exclude/exclude_contacts_page.dart';
import 'package:project_telephony/ui/exclude/exclude_single_page.dart'; import 'package:project_telephony/ui/exclude/exclude_single_page.dart';
import 'package:project_telephony/ui/home/home_page.dart';
import 'package:project_telephony/ui/home/set/phone_num_list/call_records_list.dart'; import 'package:project_telephony/ui/home/set/phone_num_list/call_records_list.dart';
import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/headers.dart';
import 'package:project_telephony/ui/widget/plone_bottom.dart'; import 'package:project_telephony/ui/widget/plone_bottom.dart';
import 'package:project_telephony/utils/toast/cloud_toast.dart';
import '../../../base/base_style.dart'; import '../../../base/base_style.dart';
import '../../../model/phone_num_model.dart'; import '../../../model/exclude_phone_model.dart';
import '../../widget/appdialog.dart';
import '../../widget/scaffold_theme_widget.dart'; import '../../widget/scaffold_theme_widget.dart';
class SpecifyPhonePage extends StatefulWidget { class SpecifyPhonePage extends StatefulWidget {
@ -24,6 +27,9 @@ class SpecifyPhonePage extends StatefulWidget {
class _SpecifyPhonePageState extends State<SpecifyPhonePage> { class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
final EasyRefreshController _refreshController = EasyRefreshController(); final EasyRefreshController _refreshController = EasyRefreshController();
List<ExcludePhoneModel> findList = [
const ExcludePhoneModel(id: 0, phone: '123123123123', remark: '好的')
];
@override @override
void dispose() { void dispose() {
@ -34,7 +40,7 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ScaffoldThemeWidget( return ScaffoldThemeWidget(
title: "发送号码设置", title: "指定号码",
bottom: '添加', bottom: '添加',
onTap: () { onTap: () {
showModalBottomSheet( showModalBottomSheet(
@ -55,13 +61,14 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
child: ListView( child: ListView(
children: [ children: [
_getAddPhone("通话记录添加", "通过本机通话记录添加号码", () { _getAddPhone("通话记录添加", "通过本机通话记录添加号码", () {
Get.to(() => ScaffoldThemeWidget( Navigator.of(context)
bottom: '添加', .push(
title: '从通话记录添加', MaterialPageRoute(
isBorder: true, builder: (_) => const CallRecordsList()),
isOpacity: false, )
onTap: () {}, .then((val) => _getNullList());
child: const CallRecordsList()));
// Get.to(() => const CallRecordsList());
}), }),
_getAddPhone("通迅录添加", "通过本机通讯录添加号码", () { _getAddPhone("通迅录添加", "通过本机通讯录添加号码", () {
Get.to(() => (const ExcludeContactsPage())); Get.to(() => (const ExcludeContactsPage()));
@ -95,167 +102,141 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
header: MaterialHeader(), header: MaterialHeader(),
// footer: MaterialFooter(), // footer: MaterialFooter(),
onRefresh: () async { onRefresh: () async {
// findList = await ExcludeFunc.getContacts();
// await userProvider.updateUserInfo(); // await userProvider.updateUserInfo();
setState(() {}); setState(() {});
}, },
child: ListView( child: findList.isEmpty ? _getNullList() : _getNum()
children: [
_getNullList(), // ListView(
], // children: [findList.isEmpty ? _getNullList() : _getNum()],
)), // )
),
); );
// PloneBottom(
// onTap: () { }
// showModalBottomSheet(
// builder: (BuildContext context) { _getNum() {
// return Container( return ListView.builder(
// width: double.infinity, itemBuilder: (context, index) {
// height: 750.w, return _getNumContant(findList[index]);
// padding: EdgeInsets.symmetric(horizontal: 32.w), },
// child: Column( itemCount: findList.length,
// children: [ );
// 48.hb, }
// Text(
// "添加号码", _getNumContant(ExcludePhoneModel item) {
// style: TextStyle( return Container(
// fontSize: 34.w, margin: EdgeInsets.symmetric(horizontal: 16.w),
// fontWeight: FontWeight.bold), child: ListTile(
// ), onTap: () {
// Expanded( showDialog(
// child: ListView( context: context,
// children: [ builder: (context) {
// _getAddPhone("通话记录添加", "通过本机通话记录添加号码", () { return CupertinoAlertDialog(
// Get.to(() => ScaffoldThemeWidget( title: Text(
// bottom: '添加', "修改名称",
// title: '从通话记录添加', style: TextStyle(
// isBorder: true, color: BaseStyle.color333333, fontSize: 34.sp),
// isOpacity: false, ),
// onTap: () { }, content: Column(
// child: CallRecordsList() children: [
// )); Column(
// }), crossAxisAlignment: CrossAxisAlignment.start,
// _getAddPhone("通迅录添加", "通过本机通讯录添加号码", () { children: [
// Get.to(() => (const ExcludeContactsPage())); Text(
// }), "名称",
// _getAddPhone( style: TextStyle(
// "添加单个或批量号码", "通过输入号码段添加批量号码", () {}), fontSize: 28.sp,
// ], color: BaseStyle.color999999,
// )), ),
// PloneBottom( ),
// onTap: () { 24.hb,
// Navigator.pop(context); CupertinoTextField(
// }, padding: EdgeInsets.symmetric(horizontal: 24.w,vertical: 20.w),
// hPadding: 32, decoration: BoxDecoration(
// border: true, border: Border.all(color: Colors.white),
// textColor: const Color(0xFF1890FF), // borderRadius: BorderRadius.all(
// color2: const Color(0xFFF9F9F9), // Radius.circular(4.w)
// color1: const Color(0xFFF9F9F9),
// text: "取消",
// ),
// 32.hb
// ],
// ),
// );
// },
// context: context);
// },
// border: true,
// color2: const Color(0xFF74BCFF),
// color1: const Color(0xFF1890FF),
// text: "添加",
// ),
// 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("通话记录添加", "通过本机通话记录添加号码", () {
// Get.to(() => const ScaffoldThemeWidget(
// bottom: '添加',
// title: '从通话记录添加',
// isBorder: true,
// isOpacity: false,
// child: CallRecordsList()
// ));
// }),
// _getAddPhone("通迅录添加", "通过本机通讯录添加号码", () {
// Get.to(() => (const ExcludeContactsPage()));
// }),
// _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
// ],
// ), // ),
// ); color: const Color(0xFFF9F9F9)),
// }, placeholderStyle:
// context: context); const TextStyle(color: BaseStyle.color333333),
// }, placeholder: item.remark,
// border: true, onChanged: (value) {},
// color2: const Color(0xFF74BCFF), ),
// color1: const Color(0xFF1890FF), 20.hb,
// text: "添加", Text(
"号码",
style: TextStyle(
fontSize: 28.sp,
color: BaseStyle.color999999,
),
),
24.hb,
CupertinoTextField(
padding: EdgeInsets.symmetric(horizontal: 24.w,vertical: 20.w),
decoration: BoxDecoration(
border: Border.all(color: Colors.white),
// borderRadius: BorderRadius.all(
// Radius.circular(4.w)
// ), // ),
// ], color: const Color(0xFFF9F9F9)),
// )), placeholder: item.phone,
// ); onChanged: (value) {},
),
82.hb,
// _getUpdate("爸爸", "123123123"),
PloneBottom(
blM:false,
border: true,
color1:const Color(0xFF1890FF),
color2:const Color(0xFF74BCFF),
onTap: () {},
text: "保存",
)
],
),
],
),
);
});
},
title: Text(item.phone,
style: TextStyle(
fontSize: 32.sp,
color: BaseStyle.color333333,
fontWeight: FontWeight.bold)),
subtitle: Text(
item.remark,
style: TextStyle(fontSize: 28.sp, color: BaseStyle.color999999),
),
trailing: TextButton(
style: ButtonStyle(
side: MaterialStateProperty.all(
BorderSide(width: 2.w, color: const Color(0xFFE8E8E8)))),
onPressed: () async {
var res =
await apiClient.request(API.exclude.find, data: {item.id});
if (res.code == 0) {
_refreshController.callRefresh();
CloudToast.show(res.msg);
} else {
CloudToast.show(res.msg);
}
},
child: Text(
"删除",
style: TextStyle(fontSize: 28.sp, color: BaseStyle.color333333),
),
),
),
);
} }
_getAddPhone(String title, String text, VoidCallback widget) { _getAddPhone(String title, String text, VoidCallback widget) {
return GestureDetector( return GestureDetector(
onTap: widget, onTap: widget,

@ -1,4 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:project_telephony/base/base_style.dart';
import 'package:project_telephony/ui/widget/plone_bottom.dart';
import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/headers.dart';
import 'package:project_telephony/utils/user_tool.dart'; import 'package:project_telephony/utils/user_tool.dart';
@ -74,7 +77,6 @@ _getBotton(String bContent, context) {
CloudToast.show(res.msg); CloudToast.show(res.msg);
} }
}, },
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 64.w), margin: EdgeInsets.symmetric(horizontal: 64.w),
width: 500.w, width: 500.w,
@ -160,3 +162,107 @@ _getVip() {
), ),
); );
} }
// class FindDialog extends StatefulWidget{
// final String title;
//
// // final Widget widget;
// final VoidCallback ontap;
// final String name;
// final String phone;
//
// const FindDialog(
// {Key? key,
// required this.title,
// required this.ontap,
// // required this.widget,
// required this.name,
// required this.phone})
// : super(key: key);
//
// @override
// Widget build(BuildContext context) {
// return Scaffold(
// body:Container(
// margin: EdgeInsets.only(
// left: 100.w,
// right: 100.w,
// ),
// height: 720.w,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Text(
// title,
// style: TextStyle(
// fontSize: 36.sp,
// ),
// ),
// _getUpdate(name, phone),
// PloneBottom(
// onTap: ontap,
// text: "保存",
// )
// ],
// ),
// ),
// );
// }
//
// _getUpdate(String name, String phone) {
// return Container(
// height: 400.w,
// padding: EdgeInsets.zero,
// child: Column(
// children: [
// Text(
// "名称",
// style: TextStyle(
// fontSize: 28.sp,
// color: BaseStyle.color999999,
// ),
// ),
// 24.hb,
// SizedBox(
// height: 96.w,
// child: TextField(
// decoration: InputDecoration.collapsed(
// hintText: name,
// hintStyle:
// TextStyle(fontSize: 28.sp, color: BaseStyle.color333333),
// fillColor: Colors.transparent,
// // contentPadding: EdgeInsets.zero,
// ),
// ),
// ),
// 48.hb,
// Text(
// "名称",
// style: TextStyle(
// fontSize: 28.sp,
// color: BaseStyle.color999999,
// ),
// ),
// 24.hb,
// SizedBox(
// height: 96.w,
// child: TextField(
// decoration: InputDecoration.collapsed(
// hintText: phone,
// hintStyle:
// TextStyle(fontSize: 28.sp, color: BaseStyle.color333333),
// fillColor: Colors.transparent,
// // contentPadding: EdgeInsets.zero,
// ),
// ),
// )
// ],
// ),
// );
// }
//
// @override
// State<StatefulWidget> createState() {
// throw UnimplementedError();
// }
// }

@ -23,7 +23,7 @@ class ScaffoldThemeWidget extends StatefulWidget {
final bool isBorder; final bool isBorder;
final bool isOpacity; final bool isOpacity;
final VoidCallback onTap; final VoidCallback onTap;
final int wid;
const ScaffoldThemeWidget({ const ScaffoldThemeWidget({
Key? key, Key? key,
required this.title, required this.title,
@ -32,6 +32,7 @@ class ScaffoldThemeWidget extends StatefulWidget {
this.isBorder = false, this.isBorder = false,
this.isOpacity = true, this.isOpacity = true,
required this.onTap, required this.onTap,
this.wid=162
}) : super(key: key); }) : super(key: key);
@override @override
@ -54,12 +55,13 @@ class _ScaffoldThemeWidgetState extends State<ScaffoldThemeWidget> {
color: BaseStyle.color333333, color: BaseStyle.color333333,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
titleSpacing: 162.w, titleSpacing: widget.wid.w,
leading: const CloudBackButton(isSpecial: true), leading: const CloudBackButton(isSpecial: true),
backgroundColor: kForeGroundColor), backgroundColor: kForeGroundColor),
backgroundColor: Colors.white, backgroundColor: Colors.white,
body: widget.child, body: widget.child,
bottomNavigationBar: PloneBottom( bottomNavigationBar:
PloneBottom(
onTap: widget.onTap, onTap: widget.onTap,
border: widget.isBorder, border: widget.isBorder,
opacity: widget.isOpacity ? 1 : 0.4, opacity: widget.isOpacity ? 1 : 0.4,

Loading…
Cancel
Save