mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-13 09:20:29 +00:00
feat: Implement Windows runner for Flutter application
- Added FlutterWindow class to manage the Flutter view within a Win32 window. - Created main entry point in main.cpp to initialize and run the Flutter application. - Implemented utility functions for console attachment and command line argument parsing. - Added resource management for application icon and manifest. - Enhanced Win32Window class for DPI awareness and theme management. - Included necessary headers and resource files for building the Windows runner.
This commit is contained in:
52
lib/models/update_info.dart
Normal file
52
lib/models/update_info.dart
Normal file
@@ -0,0 +1,52 @@
|
||||
/// Information about an available app update
|
||||
class UpdateInfo {
|
||||
final bool isAvailable;
|
||||
final String currentCommitHash;
|
||||
final String? latestCommitHash;
|
||||
final String? downloadUrl;
|
||||
final String? buildId;
|
||||
final String? timestamp;
|
||||
|
||||
const UpdateInfo({
|
||||
required this.isAvailable,
|
||||
required this.currentCommitHash,
|
||||
this.latestCommitHash,
|
||||
this.downloadUrl,
|
||||
this.buildId,
|
||||
this.timestamp,
|
||||
});
|
||||
|
||||
/// Factory constructor for when no update is available
|
||||
factory UpdateInfo.noUpdate(String currentCommitHash) {
|
||||
return UpdateInfo(
|
||||
isAvailable: false,
|
||||
currentCommitHash: currentCommitHash,
|
||||
);
|
||||
}
|
||||
|
||||
/// Factory constructor for when an update is available
|
||||
factory UpdateInfo.available({
|
||||
required String currentCommitHash,
|
||||
required String latestCommitHash,
|
||||
required String downloadUrl,
|
||||
String? buildId,
|
||||
String? timestamp,
|
||||
}) {
|
||||
return UpdateInfo(
|
||||
isAvailable: true,
|
||||
currentCommitHash: currentCommitHash,
|
||||
latestCommitHash: latestCommitHash,
|
||||
downloadUrl: downloadUrl,
|
||||
buildId: buildId,
|
||||
timestamp: timestamp,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateInfo(isAvailable: $isAvailable, '
|
||||
'current: $currentCommitHash, '
|
||||
'latest: $latestCommitHash, '
|
||||
'downloadUrl: $downloadUrl)';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user