mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-18 02:04:18 +01:00
bookmark and history some code
This commit is contained in:
27
lib/data/browser_history.dart
Normal file
27
lib/data/browser_history.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
class BrowserHistory {
|
||||
int? id;
|
||||
String? title;
|
||||
String? url;
|
||||
String? favicon;
|
||||
int? createdAt;
|
||||
|
||||
BrowserHistory({this.id, this.title, this.url, this.favicon, this.createdAt});
|
||||
|
||||
BrowserHistory.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
title = json['title'];
|
||||
url = json['url'];
|
||||
favicon = json['favicon'];
|
||||
createdAt = json['created_at'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['title'] = this.title;
|
||||
data['url'] = this.url;
|
||||
data['favicon'] = this.favicon;
|
||||
data['created_at'] = this.createdAt;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user