set image center when remote resolution is changed

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-01-10 17:13:40 +08:00
parent c7fd38ed23
commit a3643f53bf
8 changed files with 34 additions and 22 deletions

View File

@@ -977,10 +977,10 @@ Future<bool> matchPeer(String searchText, Peer peer) async {
/// Get the image for the current [platform].
Widget getPlatformImage(String platform, {double size = 50}) {
platform = platform.toLowerCase();
if (platform == 'mac os') {
if (platform == kPeerPlatformMacOS) {
platform = 'mac';
} else if (platform != 'linux' && platform != 'android') {
} else if (platform != kPeerPlatformLinux &&
platform != kPeerPlatformAndroid) {
platform = 'win';
}
return SvgPicture.asset('assets/$platform.svg', height: size, width: size);