update flutter to 3.27.0 & update packages

This commit is contained in:
2024-12-12 16:41:42 +08:00
parent c2cfd066f6
commit e4e2d264f5
31 changed files with 172 additions and 266 deletions

View File

@@ -1,4 +1,4 @@
part of comic_source;
part of 'comic_source.dart';
class CategoryData {
/// The title is displayed in the tab bar.

View File

@@ -1,4 +1,4 @@
library comic_source;
library;
import 'dart:async';
import 'dart:collection';

View File

@@ -198,9 +198,7 @@ class ComicDetails with HistoryMixin {
maxPage = json["maxPage"],
comments = (json["comments"] as List?)
?.map((e) => Comment.fromJson(e))
.toList(){
print(json);
}
.toList();
Map<String, dynamic> toJson() {
return {

View File

@@ -90,11 +90,10 @@ class ComicSourceParser {
var className = line1.split("class")[1].split("extends ComicSource").first;
className = className.trim();
JsEngine().runCode("""
(() => {
$js
(() => { $js
this['temp'] = new $className()
}).call()
""");
""", className);
_name = JsEngine().runCode("this['temp'].name") ??
(throw ComicSourceParseException('name is required'));
var key = JsEngine().runCode("this['temp'].key") ??

View File

@@ -42,6 +42,7 @@ class History implements Comic {
int page;
@override
String id;
/// readEpisode is a set of episode numbers that have been read.

View File

@@ -111,4 +111,10 @@ extension StyledText on TextStyle {
TextStyle get s40 => copyWith(fontSize: 40);
TextStyle withColor(Color? color) => copyWith(color: color);
}
extension ColorExt on Color {
Color toOpacity(double opacity) {
return withValues(alpha: opacity);
}
}