| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import 'dart:core';
- /// @author: bo.zeng
- /// @email: cnhbwds@gmail.com
- /// @date: 2025 2025/4/10 12:47
- /// @description:
- class UserModel {
- UserModel({String? nickName, String? description,String? avatar,String? shareUrl,String? shareDesc,String? shopUrl,String? credit,int? isShow}) {
- _nickName = nickName;
- _description = description;
- _avatar = avatar;
- _shareUrl = shareUrl;
- _credit = credit;
- _isShow = isShow;
- _shareDesc = shareDesc;
- _shopUrl = shopUrl;
- }
- UserModel.fromJson(dynamic json) {
- _nickName = json['nickName'];
- _description = json['description'];
- _avatar = json['avatar'];
- _shareUrl = json['shareUrl'];
- _credit = json['credit'];
- _isShow = json['isShow'];
- _shareDesc = json['shareDesc'];
- _shopUrl = json['shopUrl'];
- }
- String? _nickName;
- String? _description;
- String? _avatar;
- String? _shareUrl;
- String? _credit;
- int? _isShow;
- String? _shareDesc;
- String? _shopUrl;
- UserModel copyWith({String? nickName, String? description,String? avatar,String? credit,String? shareUrl,String? shareDesc,String? shopUrl,int? isShow}) => UserModel(
- nickName: nickName ?? _nickName,
- description: description ?? _description,
- avatar:avatar ?? _avatar,
- shareUrl:shareUrl ?? _shareUrl,
- shareDesc:shareDesc ?? _shareDesc,
- credit:credit ?? _credit,
- isShow:isShow ?? _isShow,
- shopUrl:shopUrl ?? _shopUrl,
- );
- String? get nickName => _nickName;
- String? get description => _description;
- String? get avatar => _avatar;
- String? get shareUrl => _shareUrl;
- String? get shareDesc => _shareDesc;
- String? get credit => _credit;
- int? get isShow => _isShow;
- String? get shopUrl=> _shopUrl;
- Map<String, dynamic> toJson() {
- final map = <String, dynamic>{};
- map['nickName'] = _nickName;
- map['description'] = _description;
- map['avatar'] = _avatar;
- map['shareUrl'] = _shareUrl;
- map['shareDesc'] = _shareDesc;
- map['credit'] = _credit;
- map['isShow'] = _isShow;
- map['shopUrl'] = _shopUrl;
- return map;
- }
- }
|