Skip to content

Commit

Permalink
docs(AppWindow): add doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Merrit committed Jan 31, 2023
1 parent c77b227 commit 776e020
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/window/app_window.dart
Expand Up @@ -9,6 +9,7 @@ import '../logs/logs.dart';
import '../settings/settings.dart';
import '../storage/storage_repository.dart';

/// Represents the main window of the app.
class AppWindow {
final StorageRepository _storage;

Expand Down Expand Up @@ -40,13 +41,16 @@ class AppWindow {
await windowManager.setPreventClose(shouldPreventClose);
}

/// Closes the app.
void close() => exit(0);

/// Hides the app window.
Future<void> hide() async {
await saveWindowSize();
await windowManager.hide();
}

/// Shows the app window.
Future<void> show() async {
final Rect? savedWindowSize = await getSavedWindowSize();
if (savedWindowSize != null) windowManager.setBounds(savedWindowSize);
Expand Down

0 comments on commit 776e020

Please sign in to comment.