Fix missing about tile on windows

This commit is contained in:
shilangyu 2021-02-06 13:17:39 +01:00
parent 2239beb4bf
commit 4367c4329e
2 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,10 @@ class AboutTile extends HookWidget {
@override
Widget build(BuildContext context) {
final packageInfoSnap = useMemoFuture(PackageInfo.fromPlatform);
final packageInfoSnap = useMemoFuture(
() => PackageInfo.fromPlatform()
.onError((_, __) => PackageInfo(version: '')),
);
final assetBundle = DefaultAssetBundle.of(context);
final changelogSnap =
useMemoFuture(() => assetBundle.loadString('CHANGELOG.md'));

View File

@ -91,6 +91,7 @@ add_custom_command(
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
windows-x64 $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
"${FLUTTER_LIBRARY}"