diff --git a/lib/local_storage/sqflite_localpodcast.dart b/lib/local_storage/sqflite_localpodcast.dart index 37dd196..7741340 100644 --- a/lib/local_storage/sqflite_localpodcast.dart +++ b/lib/local_storage/sqflite_localpodcast.dart @@ -414,11 +414,11 @@ class DBHelper { ORDER BY add_date DESC"""); return list .map((record) => SubHistory( - record['status'] == 0 ? true : false, DateTime.fromMillisecondsSinceEpoch(record['remove_date']), DateTime.fromMillisecondsSinceEpoch(record['add_date']), record['rss_url'], - record['title'])) + record['title'], + status: record['status'] == 0 ? true : false,)) .toList(); } diff --git a/lib/type/sub_history.dart b/lib/type/sub_history.dart index 40a4dee..8525490 100644 --- a/lib/type/sub_history.dart +++ b/lib/type/sub_history.dart @@ -1,3 +1,5 @@ +import 'package:flutter/foundation.dart'; + class SubHistory { /// POdcast subscribe date. DateTime subDate; @@ -14,5 +16,6 @@ class SubHistory { /// POdcast rss link. String rssUrl; - SubHistory(this.status, this.delDate, this.subDate, this.rssUrl, this.title); + SubHistory(this.delDate, this.subDate, this.rssUrl, this.title, + {@required this.status}); }