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:
Janez T
2025-11-14 09:52:00 +01:00
commit 4577dec95a
314 changed files with 103048 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../providers/messages_provider.dart';
/// Toast logger utility - replaces SnackBar with system messages in the channels tab
class ToastLogger {
/// Log an info message
static void info(BuildContext context, String message) {
_log(context, message, 'info');
}
/// Log a success message
static void success(BuildContext context, String message) {
_log(context, message, 'success');
}
/// Log a warning message
static void warning(BuildContext context, String message) {
_log(context, message, 'warning');
}
/// Log an error message
static void error(BuildContext context, String message) {
_log(context, message, 'error');
}
/// Internal method to log a system message
static void _log(BuildContext context, String message, String level) {
try {
final messagesProvider = context.read<MessagesProvider>();
messagesProvider.logSystemMessage(text: message, level: level);
} catch (e) {
// Fallback to print if provider is not available
debugPrint('[$level] $message');
}
}
}