fix: resolve flutter analyze errors - remove leaked code, fix method calls, cleanup imports

This commit is contained in:
2026-03-23 16:55:54 +07:00
parent 4f202936fa
commit 71f1feaf98
33 changed files with 2851 additions and 224 deletions
+38
View File
@@ -0,0 +1,38 @@
import 'package:equatable/equatable.dart';
import 'novel_model.dart';
class BookmarkModel extends Equatable {
const BookmarkModel({
required this.id,
required this.novelId,
this.lastChapterId,
this.lastChapterNumber,
this.readChapters = const [],
this.novel,
});
final String id;
final String novelId;
final String? lastChapterId;
final int? lastChapterNumber;
final List<int> readChapters;
final NovelModel? novel;
factory BookmarkModel.fromJson(Map<String, dynamic> json) => BookmarkModel(
id: json['id'] as String,
novelId: json['novelId'] as String,
lastChapterId: json['lastChapterId'] as String?,
lastChapterNumber: json['lastChapterNumber'] as int?,
readChapters: (json['readChapters'] as List<dynamic>?)
?.map((e) => (e as num).toInt())
.toList() ??
[],
novel: json['novel'] != null
? NovelModel.fromJson(json['novel'] as Map<String, dynamic>)
: null,
);
@override
List<Object?> get props => [id, novelId];
}