fix: use tray manager instead of system tray

This commit is contained in:
Prateek Sunal 2024-03-28 21:53:44 +05:30
parent 6966124249
commit 28156132a6
9 changed files with 2132 additions and 2090 deletions

View file

@ -18,7 +18,7 @@ import 'package:ente_auth/ui/settings/app_update_dialog.dart';
import 'package:flutter/foundation.dart';
import "package:flutter/material.dart";
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:system_tray/system_tray.dart';
import 'package:tray_manager/tray_manager.dart';
import 'package:window_manager/window_manager.dart';
class App extends StatefulWidget {
@ -34,7 +34,7 @@ class App extends StatefulWidget {
State<App> createState() => _AppState();
}
class _AppState extends State<App> with WindowListener {
class _AppState extends State<App> with WindowListener, TrayListener {
late StreamSubscription<SignedOutEvent> _signedOutEvent;
late StreamSubscription<SignedInEvent> _signedInEvent;
Locale? locale;
@ -49,9 +49,15 @@ class _AppState extends State<App> with WindowListener {
await windowManager.setPreventClose(true);
}
Future<void> initTrayManager() async {
trayManager.addListener(this);
}
@override
void initState() {
initWindowManager();
initTrayManager();
_signedOutEvent = Bus.instance.on<SignedOutEvent>().listen((event) {
if (mounted) {
setState(() {});
@ -85,7 +91,10 @@ class _AppState extends State<App> with WindowListener {
@override
void dispose() {
super.dispose();
windowManager.removeListener(this);
trayManager.removeListener(this);
_signedOutEvent.cancel();
_signedInEvent.cancel();
}
@ -147,12 +156,42 @@ class _AppState extends State<App> with WindowListener {
@override
void onWindowClose() async {
final AppWindow appWindow = AppWindow();
await appWindow.hide();
await windowManager.hide();
}
@override
void onWindowResize() {
WindowListenerService.instance.onWindowResize().ignore();
}
@override
void onTrayIconMouseDown() {
if (Platform.isWindows) {
windowManager.show();
} else {
trayManager.popUpContextMenu();
}
}
@override
void onTrayIconRightMouseDown() {
if (Platform.isWindows) {
trayManager.popUpContextMenu();
} else {
windowManager.show();
}
}
@override
void onTrayIconRightMouseUp() {}
@override
void onTrayMenuItemClick(MenuItem menuItem) {
if (menuItem.key == 'show_window') {
windowManager.show();
} else if (menuItem.key == 'exit_app') {
windowManager.setPreventClose(false);
windowManager.close();
}
}
}

View file

@ -1,185 +1,172 @@
import 'dart:async';
import 'dart:io';
import 'package:adaptive_theme/adaptive_theme.dart';
import "package:ente_auth/app/view/app.dart";
import 'package:ente_auth/core/configuration.dart';
import 'package:ente_auth/core/constants.dart';
import 'package:ente_auth/core/logging/super_logging.dart';
import 'package:ente_auth/core/network.dart';
import 'package:ente_auth/ente_theme_data.dart';
import 'package:ente_auth/locale.dart';
import 'package:ente_auth/services/authenticator_service.dart';
import 'package:ente_auth/services/billing_service.dart';
import 'package:ente_auth/services/notification_service.dart';
import 'package:ente_auth/services/preference_service.dart';
import 'package:ente_auth/services/update_service.dart';
import 'package:ente_auth/services/user_remote_flag_service.dart';
import 'package:ente_auth/services/user_service.dart';
import 'package:ente_auth/services/window_listener_service.dart';
import 'package:ente_auth/store/code_store.dart';
import 'package:ente_auth/ui/tools/app_lock.dart';
import 'package:ente_auth/ui/tools/lock_screen.dart';
import 'package:ente_auth/ui/utils/icon_utils.dart';
import 'package:ente_auth/utils/platform_util.dart';
import 'package:ente_auth/utils/window_protocol_handler.dart';
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
import 'package:flutter/foundation.dart';
import "package:flutter/material.dart";
import 'package:flutter/scheduler.dart';
import 'package:flutter_displaymode/flutter_displaymode.dart';
import 'package:logging/logging.dart';
import 'package:path_provider/path_provider.dart';
import 'package:privacy_screen/privacy_screen.dart';
import 'package:system_tray/system_tray.dart';
import 'package:window_manager/window_manager.dart';
final _logger = Logger("main");
Future<void> initSystemTray() async {
String path = Platform.isWindows
? 'assets/icons/auth-icon.ico'
: 'assets/icons/auth-icon.png';
final AppWindow appWindow = AppWindow();
final SystemTray systemTray = SystemTray();
// We first init the systray menu
await systemTray.initSystemTray(
title: "",
iconPath: path,
);
// create context menu
final show = MenuItem(label: 'Show', onClicked: () => appWindow.show());
final hide = MenuItem(label: 'Hide', onClicked: () => appWindow.hide());
final exit = MenuItem(label: 'Exit', onClicked: () => windowManager.close());
// set context menu
await systemTray.setContextMenu([show, hide, exit]);
const kSystemTrayEventClick = 'leftMouseDown';
const kSystemTrayEventRightClick = 'rightMouseDown';
// // handle system tray event
systemTray.registerSystemTrayEventHandler((eventName) {
if (eventName == kSystemTrayEventClick) {
Platform.isWindows ? appWindow.show() : systemTray.popUpContextMenu();
} else if (eventName == kSystemTrayEventRightClick) {
Platform.isWindows ? systemTray.popUpContextMenu() : appWindow.show();
}
});
}
void main() async {
WidgetsFlutterBinding.ensureInitialized();
initSystemTray().ignore();
if (PlatformUtil.isDesktop()) {
await windowManager.ensureInitialized();
await WindowListenerService.instance.init();
WindowOptions windowOptions = WindowOptions(
size: WindowListenerService.instance.getWindowSize(),
);
await windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});
}
await _runInForeground();
await _setupPrivacyScreen();
if (Platform.isAndroid) {
FlutterDisplayMode.setHighRefreshRate().ignore();
}
}
Future<void> _runInForeground() async {
final savedThemeMode = _themeMode(await AdaptiveTheme.getThemeMode());
return await _runWithLogs(() async {
_logger.info("Starting app in foreground");
await _init(false, via: 'mainMethod');
final Locale locale = await getLocale();
unawaited(UpdateService.instance.showUpdateNotification());
runApp(
AppLock(
builder: (args) => App(locale: locale),
lockScreen: const LockScreen(),
enabled: Configuration.instance.shouldShowLockScreen(),
locale: locale,
lightTheme: lightThemeData,
darkTheme: darkThemeData,
savedThemeMode: savedThemeMode,
),
);
});
}
ThemeMode _themeMode(AdaptiveThemeMode? savedThemeMode) {
if (savedThemeMode == null) return ThemeMode.system;
if (savedThemeMode.isLight) return ThemeMode.light;
if (savedThemeMode.isDark) return ThemeMode.dark;
return ThemeMode.system;
}
Future _runWithLogs(Function() function, {String prefix = ""}) async {
String dir = "";
try {
dir = "${(await getApplicationSupportDirectory()).path}/logs";
} catch (_) {}
await SuperLogging.main(
LogConfig(
body: function,
logDirPath: dir,
maxLogFiles: 5,
sentryDsn: sentryDSN,
enableInDebugMode: true,
prefix: prefix,
),
);
}
void _registerWindowsProtocol() {
const kWindowsScheme = 'ente';
// Register our protocol only on Windows platform
if (!kIsWeb && Platform.isWindows) {
WindowsProtocolHandler()
.register(kWindowsScheme, executable: null, arguments: null);
}
}
Future<void> _init(bool bool, {String? via}) async {
_registerWindowsProtocol();
await initCryptoUtil();
await PreferenceService.instance.init();
await CodeStore.instance.init();
await Configuration.instance.init();
await Network.instance.init();
await UserService.instance.init();
await UserRemoteFlagService.instance.init();
await AuthenticatorService.instance.init();
await BillingService.instance.init();
await NotificationService.instance.init();
await UpdateService.instance.init();
await IconUtils.instance.init();
}
Future<void> _setupPrivacyScreen() async {
if (!PlatformUtil.isMobile()) return;
final brightness =
SchedulerBinding.instance.platformDispatcher.platformBrightness;
bool isInDarkMode = brightness == Brightness.dark;
await PrivacyScreen.instance.enable(
iosOptions: const PrivacyIosOptions(
enablePrivacy: true,
privacyImageName: "LaunchImage",
lockTrigger: IosLockTrigger.didEnterBackground,
),
androidOptions: const PrivacyAndroidOptions(
enableSecure: true,
),
backgroundColor: isInDarkMode ? Colors.black : Colors.white,
blurEffect:
isInDarkMode ? PrivacyBlurEffect.dark : PrivacyBlurEffect.extraLight,
);
}
import 'dart:async';
import 'dart:io';
import 'package:adaptive_theme/adaptive_theme.dart';
import "package:ente_auth/app/view/app.dart";
import 'package:ente_auth/core/configuration.dart';
import 'package:ente_auth/core/constants.dart';
import 'package:ente_auth/core/logging/super_logging.dart';
import 'package:ente_auth/core/network.dart';
import 'package:ente_auth/ente_theme_data.dart';
import 'package:ente_auth/locale.dart';
import 'package:ente_auth/services/authenticator_service.dart';
import 'package:ente_auth/services/billing_service.dart';
import 'package:ente_auth/services/notification_service.dart';
import 'package:ente_auth/services/preference_service.dart';
import 'package:ente_auth/services/update_service.dart';
import 'package:ente_auth/services/user_remote_flag_service.dart';
import 'package:ente_auth/services/user_service.dart';
import 'package:ente_auth/services/window_listener_service.dart';
import 'package:ente_auth/store/code_store.dart';
import 'package:ente_auth/ui/tools/app_lock.dart';
import 'package:ente_auth/ui/tools/lock_screen.dart';
import 'package:ente_auth/ui/utils/icon_utils.dart';
import 'package:ente_auth/utils/platform_util.dart';
import 'package:ente_auth/utils/window_protocol_handler.dart';
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
import 'package:flutter/foundation.dart';
import "package:flutter/material.dart";
import 'package:flutter/scheduler.dart';
import 'package:flutter_displaymode/flutter_displaymode.dart';
import 'package:logging/logging.dart';
import 'package:path_provider/path_provider.dart';
import 'package:privacy_screen/privacy_screen.dart';
import 'package:tray_manager/tray_manager.dart';
import 'package:window_manager/window_manager.dart';
final _logger = Logger("main");
Future<void> initSystemTray() async {
String path = Platform.isWindows
? 'assets/icons/auth-icon.ico'
: 'assets/icons/auth-icon.png';
await trayManager.setIcon(path);
Menu menu = Menu(
items: [
MenuItem(
key: 'show_window',
label: 'Show Window',
),
MenuItem.separator(),
MenuItem(
key: 'exit_app',
label: 'Exit App',
),
],
);
await trayManager.setContextMenu(menu);
}
void main() async {
WidgetsFlutterBinding.ensureInitialized();
initSystemTray().ignore();
if (PlatformUtil.isDesktop()) {
await windowManager.ensureInitialized();
await WindowListenerService.instance.init();
WindowOptions windowOptions = WindowOptions(
size: WindowListenerService.instance.getWindowSize(),
);
await windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});
}
await _runInForeground();
await _setupPrivacyScreen();
if (Platform.isAndroid) {
FlutterDisplayMode.setHighRefreshRate().ignore();
}
}
Future<void> _runInForeground() async {
final savedThemeMode = _themeMode(await AdaptiveTheme.getThemeMode());
return await _runWithLogs(() async {
_logger.info("Starting app in foreground");
await _init(false, via: 'mainMethod');
final Locale locale = await getLocale();
unawaited(UpdateService.instance.showUpdateNotification());
runApp(
AppLock(
builder: (args) => App(locale: locale),
lockScreen: const LockScreen(),
enabled: Configuration.instance.shouldShowLockScreen(),
locale: locale,
lightTheme: lightThemeData,
darkTheme: darkThemeData,
savedThemeMode: savedThemeMode,
),
);
});
}
ThemeMode _themeMode(AdaptiveThemeMode? savedThemeMode) {
if (savedThemeMode == null) return ThemeMode.system;
if (savedThemeMode.isLight) return ThemeMode.light;
if (savedThemeMode.isDark) return ThemeMode.dark;
return ThemeMode.system;
}
Future _runWithLogs(Function() function, {String prefix = ""}) async {
String dir = "";
try {
dir = "${(await getApplicationSupportDirectory()).path}/logs";
} catch (_) {}
await SuperLogging.main(
LogConfig(
body: function,
logDirPath: dir,
maxLogFiles: 5,
sentryDsn: sentryDSN,
enableInDebugMode: true,
prefix: prefix,
),
);
}
void _registerWindowsProtocol() {
const kWindowsScheme = 'ente';
// Register our protocol only on Windows platform
if (!kIsWeb && Platform.isWindows) {
WindowsProtocolHandler()
.register(kWindowsScheme, executable: null, arguments: null);
}
}
Future<void> _init(bool bool, {String? via}) async {
_registerWindowsProtocol();
await initCryptoUtil();
await PreferenceService.instance.init();
await CodeStore.instance.init();
await Configuration.instance.init();
await Network.instance.init();
await UserService.instance.init();
await UserRemoteFlagService.instance.init();
await AuthenticatorService.instance.init();
await BillingService.instance.init();
await NotificationService.instance.init();
await UpdateService.instance.init();
await IconUtils.instance.init();
}
Future<void> _setupPrivacyScreen() async {
if (!PlatformUtil.isMobile()) return;
final brightness =
SchedulerBinding.instance.platformDispatcher.platformBrightness;
bool isInDarkMode = brightness == Brightness.dark;
await PrivacyScreen.instance.enable(
iosOptions: const PrivacyIosOptions(
enablePrivacy: true,
privacyImageName: "LaunchImage",
lockTrigger: IosLockTrigger.didEnterBackground,
),
androidOptions: const PrivacyAndroidOptions(
enableSecure: true,
),
backgroundColor: isInDarkMode ? Colors.black : Colors.white,
blurEffect:
isInDarkMode ? PrivacyBlurEffect.dark : PrivacyBlurEffect.extraLight,
);
}

View file

@ -16,7 +16,7 @@
#include <smart_auth/smart_auth_plugin.h>
#include <sodium_libs/sodium_libs_plugin.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
#include <system_tray/system_tray_plugin.h>
#include <tray_manager/tray_manager_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
#include <window_manager/window_manager_plugin.h>
@ -51,9 +51,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) system_tray_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "SystemTrayPlugin");
system_tray_plugin_register_with_registrar(system_tray_registrar);
g_autoptr(FlPluginRegistrar) tray_manager_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "TrayManagerPlugin");
tray_manager_plugin_register_with_registrar(tray_manager_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);

View file

@ -13,7 +13,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
smart_auth
sodium_libs
sqlite3_flutter_libs
system_tray
tray_manager
url_launcher_linux
window_manager
)

View file

@ -24,7 +24,7 @@ import smart_auth
import sodium_libs
import sqflite
import sqlite3_flutter_libs
import system_tray
import tray_manager
import url_launcher_macos
import window_manager
@ -48,7 +48,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
SodiumLibsPlugin.register(with: registry.registrar(forPlugin: "SodiumLibsPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin"))
SystemTrayPlugin.register(with: registry.registrar(forPlugin: "SystemTrayPlugin"))
TrayManagerPlugin.register(with: registry.registrar(forPlugin: "TrayManagerPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin"))
}

File diff suppressed because it is too large Load diff

View file

@ -1,158 +1,158 @@
name: ente_auth
description: ente two-factor authenticator
version: 2.0.46+246
publish_to: none
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
adaptive_theme: ^3.1.0 # done
app_links: ^3.5.0
archive: ^3.3.7
base32: ^2.1.3
bip39: ^1.0.6 #done
bloc: ^8.1.2
clipboard: ^0.1.3
collection: # dart
confetti: ^0.7.0
connectivity_plus: ^5.0.2
convert: ^3.1.1
desktop_webview_window:
git:
url: https://github.com/MixinNetwork/flutter-plugins
path: packages/desktop_webview_window
device_info_plus: ^9.1.1
dio: ^5.4.0
dotted_border: ^2.0.0+2
email_validator: ^2.0.1
ente_crypto_dart:
git:
url: https://github.com/ente-io/ente_crypto_dart.git
event_bus: ^2.0.0
expandable: ^5.0.1
expansion_tile_card: ^3.0.0
ffi: ^2.1.0
file_picker: ^6.1.1
# https://github.com/incrediblezayed/file_saver/issues/86
file_saver: ^0.2.11
fixnum: ^1.1.0
fk_user_agent: ^2.1.0
flutter:
sdk: flutter
flutter_bloc: ^8.0.1
flutter_displaymode: ^0.6.0
flutter_email_sender: ^6.0.2
flutter_inappwebview: ^6.0.0
flutter_launcher_icons: ^0.13.1
flutter_local_authentication:
git:
url: https://github.com/eaceto/flutter_local_authentication
ref: 1ac346a04592a05fd75acccf2e01fa3c7e955d96
flutter_local_notifications: ^16.3.1+1
flutter_localizations:
sdk: flutter
flutter_native_splash: ^2.2.13
flutter_secure_storage: ^9.0.0
flutter_slidable: ^3.0.1
flutter_speed_dial: ^7.0.0
flutter_staggered_grid_view: ^0.7.0
flutter_svg: ^2.0.5
fluttertoast: ^8.1.1
google_nav_bar: ^5.0.5 #supported
http: ^1.1.0
intl: ^0.18.0
json_annotation: ^4.5.0
local_auth: ^2.1.7
local_auth_android: ^1.0.31
local_auth_ios: ^1.1.3
logging: ^1.0.1
modal_bottom_sheet: ^3.0.0-pre
move_to_background: ^1.0.2
otp: ^3.1.1
package_info_plus: ^4.1.0
password_strength: ^0.2.0
path: ^1.8.3
path_provider: ^2.0.11
pinput: ^3.0.1
pointycastle: ^3.7.3
privacy_screen: ^0.0.6
protobuf: ^3.0.0
qr_code_scanner: ^1.0.1
qr_flutter: ^4.1.0
sentry: ^7.9.0
sentry_flutter: ^7.9.0
share_plus: ^7.2.1
shared_preferences: ^2.0.5
sqflite:
git:
url: https://github.com/tekartik/sqflite
path: sqflite
sqflite_common_ffi: ^2.3.0+4
sqlite3: ^2.1.0
sqlite3_flutter_libs: ^0.5.19+1
step_progress_indicator: ^1.0.2
styled_text: ^8.1.0
system_tray: ^0.1.1
tuple: ^2.0.0
url_launcher: ^6.1.5
uuid: ^4.2.2
win32: ^5.1.1
window_manager: ^0.3.8
dependency_overrides:
flutter_secure_storage_linux:
git:
url: https://github.com/prateekmedia/flutter_secure_storage.git
ref: patch-1
path: flutter_secure_storage_linux
dev_dependencies:
build_runner: ^2.1.11
flutter_test:
sdk: flutter
json_serializable: ^6.2.0
lints: ^3.0.0
mocktail: ^1.0.3
# The following section is specific to Flutter.
flutter:
uses-material-design: true
generate: true
# https://docs:flutter:dev/development/ui/assets-and-images:
assets:
- assets/
- assets/icon/
- assets/simple-icons/icons/
- assets/simple-icons/_data/
- assets/custom-icons/icons/
- assets/custom-icons/_data/
fonts:
- family: Inter
fonts:
- asset: fonts/Inter-Regular.ttf
- asset: fonts/Inter-Medium.ttf
- asset: fonts/Inter-Light.ttf
- asset: fonts/Inter-SemiBold.ttf
- asset: fonts/Inter-Bold.ttf
- family: Montserrat
fonts:
- asset: fonts/Montserrat-Bold.ttf
flutter_icons:
android: "launcher_icon"
adaptive_icon_foreground: "assets/generation-icons/icon-light-adaptive-fg.png"
adaptive_icon_background: "#ffffff"
ios: true
image_path: "assets/generation-icons/icon-light.png"
remove_alpha_ios: true
flutter_native_splash:
color: "#ffffff"
color_dark: "#000000"
image: assets/splash-screen-light.png
image_dark: assets/splash-screen-dark.png
android_fullscreen: true
android_gravity: center
ios_content_mode: center
name: ente_auth
description: ente two-factor authenticator
version: 2.0.46+246
publish_to: none
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
adaptive_theme: ^3.1.0 # done
app_links: ^3.5.0
archive: ^3.3.7
base32: ^2.1.3
bip39: ^1.0.6 #done
bloc: ^8.1.2
clipboard: ^0.1.3
collection: # dart
confetti: ^0.7.0
connectivity_plus: ^5.0.2
convert: ^3.1.1
desktop_webview_window:
git:
url: https://github.com/MixinNetwork/flutter-plugins
path: packages/desktop_webview_window
device_info_plus: ^9.1.1
dio: ^5.4.0
dotted_border: ^2.0.0+2
email_validator: ^2.0.1
ente_crypto_dart:
git:
url: https://github.com/ente-io/ente_crypto_dart.git
event_bus: ^2.0.0
expandable: ^5.0.1
expansion_tile_card: ^3.0.0
ffi: ^2.1.0
file_picker: ^6.1.1
# https://github.com/incrediblezayed/file_saver/issues/86
file_saver: ^0.2.11
fixnum: ^1.1.0
fk_user_agent: ^2.1.0
flutter:
sdk: flutter
flutter_bloc: ^8.0.1
flutter_displaymode: ^0.6.0
flutter_email_sender: ^6.0.2
flutter_inappwebview: ^6.0.0
flutter_launcher_icons: ^0.13.1
flutter_local_authentication:
git:
url: https://github.com/eaceto/flutter_local_authentication
ref: 1ac346a04592a05fd75acccf2e01fa3c7e955d96
flutter_local_notifications: ^16.3.1+1
flutter_localizations:
sdk: flutter
flutter_native_splash: ^2.2.13
flutter_secure_storage: ^9.0.0
flutter_slidable: ^3.0.1
flutter_speed_dial: ^7.0.0
flutter_staggered_grid_view: ^0.7.0
flutter_svg: ^2.0.5
fluttertoast: ^8.1.1
google_nav_bar: ^5.0.5 #supported
http: ^1.1.0
intl: ^0.18.0
json_annotation: ^4.5.0
local_auth: ^2.1.7
local_auth_android: ^1.0.31
local_auth_ios: ^1.1.3
logging: ^1.0.1
modal_bottom_sheet: ^3.0.0-pre
move_to_background: ^1.0.2
otp: ^3.1.1
package_info_plus: ^4.1.0
password_strength: ^0.2.0
path: ^1.8.3
path_provider: ^2.0.11
pinput: ^3.0.1
pointycastle: ^3.7.3
privacy_screen: ^0.0.6
protobuf: ^3.0.0
qr_code_scanner: ^1.0.1
qr_flutter: ^4.1.0
sentry: ^7.9.0
sentry_flutter: ^7.9.0
share_plus: ^7.2.1
shared_preferences: ^2.0.5
sqflite:
git:
url: https://github.com/tekartik/sqflite
path: sqflite
sqflite_common_ffi: ^2.3.0+4
sqlite3: ^2.1.0
sqlite3_flutter_libs: ^0.5.19+1
step_progress_indicator: ^1.0.2
styled_text: ^8.1.0
tray_manager: ^0.2.1
tuple: ^2.0.0
url_launcher: ^6.1.5
uuid: ^4.2.2
win32: ^5.1.1
window_manager: ^0.3.8
dependency_overrides:
flutter_secure_storage_linux:
git:
url: https://github.com/prateekmedia/flutter_secure_storage.git
ref: patch-1
path: flutter_secure_storage_linux
dev_dependencies:
build_runner: ^2.1.11
flutter_test:
sdk: flutter
json_serializable: ^6.2.0
lints: ^3.0.0
mocktail: ^1.0.3
# The following section is specific to Flutter.
flutter:
uses-material-design: true
generate: true
# https://docs:flutter:dev/development/ui/assets-and-images:
assets:
- assets/
- assets/icons/
- assets/simple-icons/icons/
- assets/simple-icons/_data/
- assets/custom-icons/icons/
- assets/custom-icons/_data/
fonts:
- family: Inter
fonts:
- asset: fonts/Inter-Regular.ttf
- asset: fonts/Inter-Medium.ttf
- asset: fonts/Inter-Light.ttf
- asset: fonts/Inter-SemiBold.ttf
- asset: fonts/Inter-Bold.ttf
- family: Montserrat
fonts:
- asset: fonts/Montserrat-Bold.ttf
flutter_icons:
android: "launcher_icon"
adaptive_icon_foreground: "assets/generation-icons/icon-light-adaptive-fg.png"
adaptive_icon_background: "#ffffff"
ios: true
image_path: "assets/generation-icons/icon-light.png"
remove_alpha_ios: true
flutter_native_splash:
color: "#ffffff"
color_dark: "#000000"
image: assets/splash-screen-light.png
image_dark: assets/splash-screen-dark.png
android_fullscreen: true
android_gravity: center
ios_content_mode: center

View file

@ -19,7 +19,7 @@
#include <smart_auth/smart_auth_plugin.h>
#include <sodium_libs/sodium_libs_plugin_c_api.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
#include <system_tray/system_tray_plugin.h>
#include <tray_manager/tray_manager_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
#include <window_manager/window_manager_plugin.h>
@ -50,8 +50,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("SodiumLibsPluginCApi"));
Sqlite3FlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin"));
SystemTrayPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("SystemTrayPlugin"));
TrayManagerPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("TrayManagerPlugin"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
WindowManagerPluginRegisterWithRegistrar(

View file

@ -16,7 +16,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
smart_auth
sodium_libs
sqlite3_flutter_libs
system_tray
tray_manager
url_launcher_windows
window_manager
)