修改bug

This commit is contained in:
jyuesong
2022-01-21 17:07:42 +08:00
parent 9612802996
commit 25c98a1abf
8 changed files with 17 additions and 17 deletions

View File

@ -1 +0,0 @@

View File

@ -15,7 +15,7 @@ class EnvBean {
EnvBean.fromJson(Map<String, dynamic> json) {
value = json['value'];
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
created = json['created'];
created = int.tryParse(json['created'].toString());
status = json['status'];
timestamp = json['timestamp'];
name = json['name'];

View File

@ -21,7 +21,7 @@ class LoginBean {
token = json['token'];
lastip = json['lastip'];
lastaddr = json['lastaddr'];
lastlogon = json['lastlogon'];
lastlogon = int.tryParse(json['lastlogon'].toString());
retries = json['retries'];
platform = json['platform'];
}

View File

@ -24,10 +24,10 @@ class DependencyBean {
DependencyBean.fromJson(Map<String, dynamic> json) {
sId = json['_id'];
created = json['created'];
created = int.tryParse(json['created'].toString());
status = json['status'];
type = json['type'];
timestamp = json['timestamp'];
timestamp = json['timestamp'].toString();
name = json['name'];
log = json['log'].cast<String>();
remark = json['remark'];

View File

@ -13,7 +13,7 @@ class LoginLogBean {
{this.timestamp, this.address, this.ip, this.platform, this.status});
LoginLogBean.fromJson(Map<String, dynamic> json) {
timestamp = json['timestamp'];
timestamp = int.tryParse(json['timestamp'].toString());
address = json['address'];
ip = json['ip'];
platform = json['platform'];

View File

@ -116,9 +116,11 @@ class _OtherPageState extends ConsumerState<OtherPage> {
);
},
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 8,
horizontal: 15,
padding: const EdgeInsets.only(
top: 8,
bottom: 15,
left: 15,
right: 15,
),
child: Row(
children: [
@ -206,9 +208,11 @@ class _OtherPageState extends ConsumerState<OtherPage> {
},
behavior: HitTestBehavior.opaque,
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 10,
horizontal: 15,
padding: const EdgeInsets.only(
top: 8,
bottom: 15,
left: 15,
right: 15,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,

View File

@ -44,14 +44,14 @@ class TaskBean {
schedule = json['schedule'].toString();
saved = json['saved'];
sId = json.containsKey('_id') ? json['_id'].toString() : (json.containsKey('id') ? json['id'].toString() : "");
created = json['created'];
created = int.tryParse(json['created'].toString());
status = json['status'];
timestamp = json['timestamp'].toString();
isSystem = json['isSystem'];
isDisabled = json['isDisabled'];
logPath = json['log_path'].toString();
isPinned = json['isPinned'];
lastExecutionTime = json['last_execution_time'];
lastExecutionTime = int.tryParse(json['last_execution_time'].toString());
lastRunningTime = json['last_running_time'];
pid = json['pid'].toString();
} catch (e) {

View File

@ -6,8 +6,5 @@
// tree, read text, and verify that the values of widget properties are correct.
void main() {
String time = "Wed Jan 12 2022 20:33:39 GMT+0800 (中国标准时间)";
var result = DateTime.tryParse(time);
print(result);
}