mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
refactor: del unused or dead code and optimize reusable code
This commit is contained in:
@@ -898,3 +898,14 @@ Future<List<Peer>>? matchPeers(String searchText, List<Peer> peers) async {
|
||||
}
|
||||
return filteredList;
|
||||
}
|
||||
|
||||
/// Get the image for the current [platform].
|
||||
Widget getPlatformImage(String platform, {double size = 50}) {
|
||||
platform = platform.toLowerCase();
|
||||
if (platform == 'mac os') {
|
||||
platform = 'mac';
|
||||
} else if (platform != 'linux' && platform != 'android') {
|
||||
platform = 'win';
|
||||
}
|
||||
return Image.asset('assets/$platform.png', height: size, width: size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user