提交更改

master
王亚玲 2 years ago
parent 099b478f11
commit 07e765a521

@ -8,6 +8,7 @@ class ExcludePhoneModel extends Equatable{
final int id;
final String phone;
final String remark;
final String address;
factory ExcludePhoneModel.fromJson(Map<String, dynamic> json) =>_$ExcludePhoneModelFromJson(json);
Map<String,dynamic> toJson()=> _$ExcludePhoneModelToJson(this);
@ -15,8 +16,9 @@ class ExcludePhoneModel extends Equatable{
required this.id,
required this.phone,
required this.remark,
required this.address,
});
@override
List<Object?> get props => [id,phone,remark];
List<Object?> get props => [id,phone,remark,address];
}

@ -6,14 +6,18 @@ part of 'exclude_phone_model.dart';
// JsonSerializableGenerator
// **************************************************************************
ExcludePhoneModel _$ExcludePhoneModelFromJson(Map<String, dynamic> json) => ExcludePhoneModel(
ExcludePhoneModel _$ExcludePhoneModelFromJson(Map<String, dynamic> json) =>
ExcludePhoneModel(
id: json['id'] as int,
phone: json['phone'] as String,
remark: json['remark'] as String,
address: json['address'] as String,
);
Map<String, dynamic> _$ExcludePhoneModelToJson(ExcludePhoneModel instance) => <String, dynamic>{
Map<String, dynamic> _$ExcludePhoneModelToJson(ExcludePhoneModel instance) =>
<String, dynamic>{
'id': instance.id,
'phone': instance.phone,
'remark': instance.remark,
'address': instance.address,
};

@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
@ -15,7 +14,6 @@ import '../../../base/base_style.dart';
import '../../../model/exclude_phone_model.dart';
import '../../widget/scaffold_theme_widget.dart';
import 'func/exclude_contacts_func.dart';
@ -28,9 +26,7 @@ class SpecifyPhonePage extends StatefulWidget {
class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
final EasyRefreshController _refreshController = EasyRefreshController();
List<ExcludePhoneModel> findList = [
];
List<ExcludePhoneModel> findList = [];
@override
void dispose() {
@ -80,10 +76,12 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
return AlertDialog(
content: const Text('获取通讯录权限还未开启'),
actions: [
ElevatedButton(onPressed: (){
ElevatedButton(
onPressed: () {
openAppSettings();
},
child: const Text("前往开启"),),
child: const Text("前往开启"),
),
],
);
});
@ -133,7 +131,6 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
),
);
}
_getNum() {
@ -173,7 +170,8 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
),
24.hb,
CupertinoTextField(
padding: EdgeInsets.symmetric(horizontal: 24.w,vertical: 20.w),
padding: EdgeInsets.symmetric(
horizontal: 24.w, vertical: 20.w),
decoration: BoxDecoration(
border: Border.all(color: Colors.white),
// borderRadius: BorderRadius.all(
@ -195,7 +193,8 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
),
24.hb,
CupertinoTextField(
padding: EdgeInsets.symmetric(horizontal: 24.w,vertical: 20.w),
padding: EdgeInsets.symmetric(
horizontal: 24.w, vertical: 20.w),
decoration: BoxDecoration(
border: Border.all(color: Colors.white),
// borderRadius: BorderRadius.all(
@ -222,13 +221,15 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
);
});
},
title: Text(item.phone,
title: Text(
item.phone,
style: TextStyle(
fontSize: 32.sp,
color: BaseStyle.color333333,
fontWeight: FontWeight.bold)),
subtitle: Text(
item.remark,
item.address,
style: TextStyle(fontSize: 28.sp, color: BaseStyle.color999999),
),
trailing: TextButton(
@ -254,7 +255,6 @@ class _SpecifyPhonePageState extends State<SpecifyPhonePage> {
);
}
_getAddPhone(String title, String text, VoidCallback widget) {
return GestureDetector(
onTap: widget,

Loading…
Cancel
Save