newHost^2
王亚玲 2 years ago
parent 5bda94b7b7
commit 6bb26ff433

@ -9,14 +9,16 @@ class BlacklistModel extends Equatable {
final int id;
final List<ImgModel> imgList;
final String? name;
final String nickName;
factory BlacklistModel.fromJson(Map<String, dynamic> json) =>
_$BlacklistModelFromJson(json);
BlacklistModel({
const BlacklistModel({
required this.id,
required this.imgList,
required this.name,
this.name,
required this.nickName,
});
@override
@ -24,5 +26,6 @@ class BlacklistModel extends Equatable {
id,
imgList,
name,
nickName,
];
}

@ -13,4 +13,5 @@ BlacklistModel _$BlacklistModelFromJson(Map<String, dynamic> json) =>
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
name: json['name'] as String?,
nickName: json['nickName'] as String,
);

@ -102,6 +102,7 @@ class _blackListPageState extends State<blackListPage> {
TextStyle(fontSize: 24.sp, color: Color(0xA6000000))),
])),
),
20.hb,
Expanded(
child:
// ListView.builder(
@ -192,7 +193,7 @@ class _blackListPageState extends State<blackListPage> {
// )
,
title: Text(
model.name == null ? '' : _getText(model.name!),
model.nickName ?? '',
style: TextStyle(fontSize: 28.sp, color: ktextSubColor),
),
trailing: GestureDetector(
@ -240,13 +241,13 @@ class _blackListPageState extends State<blackListPage> {
);
}
_getText(String name) {
String name2 = name.substring(0, 1);
for (var i = 0; i < name.length - 1; i++) {
name2 += '*';
}
return name2;
}
// _getText(String name) {
// String name2 = name.substring(0, 1);
// for (var i = 0; i < name.length - 1; i++) {
// name2 += '*';
// }
// return name2;
// }
// _blackList(BlacklistModel model) {
// return ListTile(
// leading: Container(

@ -272,11 +272,10 @@ class _ChatCardState extends State<ChatCard> {
.make(),
onPressed: () //=> Get.back(result: true),
async {
var isShielding =
await BlackListFunc.Block(widget.model.id);
if (isShielding) {
//var isShielding =
await BlackListFunc.Block(
widget.model.createId);
Get.back();
}
},
),
],

Loading…
Cancel
Save