mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
fix
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:venera/foundation/comic_source/comic_source.dart';
|
||||
import 'package:venera/foundation/comic_type.dart';
|
||||
import 'package:venera/network/download.dart';
|
||||
import 'package:venera/pages/reader/reader.dart';
|
||||
import 'package:venera/utils/ext.dart';
|
||||
import 'package:venera/utils/io.dart';
|
||||
|
||||
import 'app.dart';
|
||||
@@ -62,7 +63,7 @@ class LocalComic with HistoryMixin implements Comic {
|
||||
subtitle = row[2] as String,
|
||||
tags = List.from(jsonDecode(row[3] as String)),
|
||||
directory = row[4] as String,
|
||||
chapters = Map.from(jsonDecode(row[5] as String)),
|
||||
chapters = MapOrNull.from(jsonDecode(row[5] as String)),
|
||||
cover = row[6] as String,
|
||||
comicType = ComicType(row[7] as int),
|
||||
downloadedChapters = List.from(jsonDecode(row[8] as String)),
|
||||
|
@@ -394,7 +394,7 @@ class _SearchSettingsDialogState extends State<_SearchSettingsDialog> {
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
).fixWidth(double.infinity).paddingHorizontal(16),
|
||||
buildSearchOptions(),
|
||||
const SizedBox(height: 24),
|
||||
FilledButton(
|
||||
@@ -404,7 +404,7 @@ class _SearchSettingsDialogState extends State<_SearchSettingsDialog> {
|
||||
},
|
||||
),
|
||||
],
|
||||
).fixWidth(400),
|
||||
).fixWidth(double.infinity),
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -85,8 +85,14 @@ extension StringExt on String{
|
||||
bool get isNum => double.tryParse(this) != null;
|
||||
}
|
||||
|
||||
class ListOrNull{
|
||||
abstract class ListOrNull{
|
||||
static List<T>? from<T>(Iterable<dynamic>? i){
|
||||
return i == null ? null : List.from(i);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class MapOrNull{
|
||||
static Map<K, V>? from<K, V>(Map<dynamic, dynamic>? i){
|
||||
return i == null ? null : Map<K, V>.from(i);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user