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
+37
View File
@@ -0,0 +1,37 @@
import 'package:equatable/equatable.dart';
class CommentModel extends Equatable {
const CommentModel({
required this.id,
required this.userId,
required this.username,
required this.novelId,
required this.content,
required this.createdAt,
this.avatarUrl,
this.chapterId,
});
final String id;
final String userId;
final String username;
final String novelId;
final String content;
final DateTime createdAt;
final String? avatarUrl;
final String? chapterId;
factory CommentModel.fromJson(Map<String, dynamic> json) => CommentModel(
id: json['id'] as String,
userId: json['userId'] as String,
username: json['username'] as String? ?? 'User',
novelId: json['novelId'] as String,
content: json['content'] as String,
createdAt: DateTime.parse(json['createdAt'] as String),
avatarUrl: json['avatarUrl'] as String?,
chapterId: json['chapterId'] as String?,
);
@override
List<Object?> get props => [id];
}