- Created CMakeLists.txt for Flutter and runner components. - Implemented resource script (Runner.rc) for application metadata. - Developed main entry point (main.cpp) for the Windows application. - Added FlutterWindow class to manage the Flutter view within a Win32 window. - Implemented utility functions for console management and command line argument parsing. - Established Win32Window class for high DPI-aware window handling. - Included application icon and manifest for proper Windows integration. - Set up build configurations and dependencies for the Flutter application on Windows.
53 lines
1.5 KiB
Dart
53 lines
1.5 KiB
Dart
import 'package:marco/helpers/theme/app_theme.dart';
|
|
import 'package:marco/helpers/widgets/my_constant.dart';
|
|
import 'package:marco/helpers/widgets/my_screen_media.dart';
|
|
import 'package:marco/helpers/widgets/my_text_style.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class My {
|
|
// entry point of the package
|
|
init() {}
|
|
|
|
static void changeTheme(ThemeData theme) {
|
|
AppTheme.theme = theme;
|
|
}
|
|
|
|
static void setTextDirection(TextDirection direction) {
|
|
AppTheme.textDirection = direction;
|
|
}
|
|
|
|
static void changeFontFamily(GoogleFontFunction fontFamily) {
|
|
MyTextStyle.changeFontFamily(fontFamily);
|
|
}
|
|
|
|
static void changeDefaultFontWeight(Map<int, FontWeight> defaultFontWeight) {
|
|
MyTextStyle.changeDefaultFontWeight(defaultFontWeight);
|
|
}
|
|
|
|
static void changeDefaultTextFontWeight(
|
|
Map<MyTextType, int> defaultFontWeight) {
|
|
MyTextStyle.changeDefaultTextFontWeight(defaultFontWeight);
|
|
}
|
|
|
|
static void changeDefaultTextSize(Map<MyTextType, double> defaultTextSize) {
|
|
MyTextStyle.changeDefaultTextSize(defaultTextSize);
|
|
}
|
|
|
|
static void changeDefaultLetterSpacing(
|
|
Map<MyTextType, double> defaultLetterSpacing) {
|
|
MyTextStyle.changeDefaultLetterSpacing(defaultLetterSpacing);
|
|
}
|
|
|
|
static setConstant(MyConstantData constantData) {
|
|
MyConstant.setConstant(constantData);
|
|
}
|
|
|
|
static setFlexSpacing(double spacing) {
|
|
MyScreenMedia.flexSpacing = spacing;
|
|
}
|
|
|
|
static setFlexColumns(int columns) {
|
|
MyScreenMedia.flexColumns = columns;
|
|
}
|
|
}
|