2026-06-02 23:28:39 +02:00
|
|
|
import 'dart:io';
|
2026-06-06 20:41:24 +02:00
|
|
|
import 'package:flutter/foundation.dart';
|
2026-06-02 23:28:39 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
|
import 'package:window_manager/window_manager.dart';
|
|
|
|
|
import 'app.dart';
|
|
|
|
|
|
|
|
|
|
void main() async {
|
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
|
|
2026-06-06 20:41:24 +02:00
|
|
|
if (!kIsWeb && (Platform.isMacOS || Platform.isWindows || Platform.isLinux)) {
|
2026-06-02 23:28:39 +02:00
|
|
|
await windowManager.ensureInitialized();
|
|
|
|
|
const options = WindowOptions(
|
|
|
|
|
minimumSize: Size(1000, 650),
|
|
|
|
|
title: 'OciDeck',
|
|
|
|
|
);
|
|
|
|
|
windowManager.waitUntilReadyToShow(options, () async {
|
|
|
|
|
await windowManager.show();
|
|
|
|
|
await windowManager.focus();
|
|
|
|
|
await windowManager.setPreventClose(true);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
runApp(const ProviderScope(child: OciDeckApp()));
|
|
|
|
|
}
|