fix ios init error and view log auto scroll back
This commit is contained in:
parent
cd10de8e89
commit
7cebc1d90c
|
@ -10,8 +10,13 @@ import '../Method.dart';
|
|||
late String _downloadAndExportPath;
|
||||
|
||||
Future initDownloadAndExportPath() async {
|
||||
if (Platform.isWindows ||
|
||||
Platform.isMacOS ||
|
||||
Platform.isAndroid ||
|
||||
Platform.isLinux) {
|
||||
_downloadAndExportPath = await method.loadDownloadAndExportPath();
|
||||
}
|
||||
}
|
||||
|
||||
Widget downloadAndExportPathSetting() {
|
||||
if (Platform.isWindows ||
|
||||
|
|
|
@ -164,9 +164,8 @@ class ViewLogWrap extends StatelessWidget {
|
|||
var size = MediaQuery.of(context).size;
|
||||
var min = size.width < size.height ? size.width : size.height;
|
||||
var width = (min - 45) / 4;
|
||||
return Wrap(
|
||||
alignment: WrapAlignment.spaceAround,
|
||||
children: comics.map((e) {
|
||||
|
||||
var entries = comics.map((e) {
|
||||
return InkWell(
|
||||
key: e.key,
|
||||
onTap: () {
|
||||
|
@ -199,7 +198,25 @@ class ViewLogWrap extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
});
|
||||
|
||||
Map<int, List<Widget>> map = Map();
|
||||
for (var i = 0; i < entries.length; i++) {
|
||||
late List<Widget> list;
|
||||
if (i % 4 == 0) {
|
||||
list = [];
|
||||
map[i ~/ 4] = list;
|
||||
} else {
|
||||
list = map[i ~/ 4]!;
|
||||
}
|
||||
list.add(entries.elementAt(i));
|
||||
}
|
||||
|
||||
return Column(
|
||||
children: map.values.map((e) => Wrap(
|
||||
alignment: WrapAlignment.spaceAround,
|
||||
children: e,
|
||||
)).toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue