File tree Expand file tree Collapse file tree 5 files changed +33
-3
lines changed Expand file tree Collapse file tree 5 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 1+ import 'package:flutter/material.dart' ;
2+
3+ class SnackBarNotification extends StatelessWidget {
4+ final String message;
5+
6+ const SnackBarNotification ({
7+ super .key,
8+ required this .message,
9+ });
10+
11+ @override
12+ Widget build (BuildContext context) {
13+ return SnackBar (
14+ content: Text (message),
15+ );
16+ }
17+
18+ static void show (BuildContext context, {required String message}) {
19+ ScaffoldMessenger .of (context).showSnackBar (
20+ SnackBar (
21+ content: Text (message),
22+ ),
23+ );
24+ }
25+ }
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import 'package:saber/components/canvas/canvas_preview.dart';
2121import 'package:saber/components/canvas/image/editor_image.dart' ;
2222import 'package:saber/components/canvas/save_indicator.dart' ;
2323import 'package:saber/components/navbar/responsive_navbar.dart' ;
24+ import 'package:saber/components/notifs/snackbar.dart' ;
2425import 'package:saber/components/theming/adaptive_alert_dialog.dart' ;
2526import 'package:saber/components/theming/adaptive_icon.dart' ;
2627import 'package:saber/components/theming/dynamic_material_app.dart' ;
@@ -1731,9 +1732,7 @@ class EditorState extends State<Editor> {
17311732
17321733 void snackBarNeedsToSaveBeforeExiting () {
17331734 if (! mounted) return ;
1734- ScaffoldMessenger .of (context).showSnackBar (SnackBar (
1735- content: Text (t.editor.needsToSaveBeforeExiting),
1736- ));
1735+ SnackBarNotification .show (context, message: t.editor.needsToSaveBeforeExiting);
17371736 }
17381737
17391738 Widget bottomSheet (BuildContext context) {
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import FlutterMacOS
66import Foundation
77
88import audioplayers_darwin
9+ import connectivity_plus
910import desktop_webview_window
1011import device_info_plus
1112import dynamic_color
@@ -24,6 +25,7 @@ import window_to_front
2425
2526func RegisterGeneratedPlugins( registry: FlutterPluginRegistry ) {
2627 AudioplayersDarwinPlugin . register ( with: registry. registrar ( forPlugin: " AudioplayersDarwinPlugin " ) )
28+ ConnectivityPlusPlugin . register ( with: registry. registrar ( forPlugin: " ConnectivityPlusPlugin " ) )
2729 DesktopWebviewWindowPlugin . register ( with: registry. registrar ( forPlugin: " DesktopWebviewWindowPlugin " ) )
2830 DeviceInfoPlusMacosPlugin . register ( with: registry. registrar ( forPlugin: " DeviceInfoPlusMacosPlugin " ) )
2931 DynamicColorPlugin . register ( with: registry. registrar ( forPlugin: " DynamicColorPlugin " ) )
Original file line number Diff line number Diff line change 77#include " generated_plugin_registrant.h"
88
99#include < audioplayers_windows/audioplayers_windows_plugin.h>
10+ #include < connectivity_plus/connectivity_plus_windows_plugin.h>
1011#include < desktop_webview_window/desktop_webview_window_plugin.h>
1112#include < dynamic_color/dynamic_color_plugin_c_api.h>
1213#include < flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
2324void RegisterPlugins (flutter::PluginRegistry* registry) {
2425 AudioplayersWindowsPluginRegisterWithRegistrar (
2526 registry->GetRegistrarForPlugin (" AudioplayersWindowsPlugin" ));
27+ ConnectivityPlusWindowsPluginRegisterWithRegistrar (
28+ registry->GetRegistrarForPlugin (" ConnectivityPlusWindowsPlugin" ));
2629 DesktopWebviewWindowPluginRegisterWithRegistrar (
2730 registry->GetRegistrarForPlugin (" DesktopWebviewWindowPlugin" ));
2831 DynamicColorPluginCApiRegisterWithRegistrar (
Original file line number Diff line number Diff line change 44
55list (APPEND FLUTTER_PLUGIN_LIST
66 audioplayers_windows
7+ connectivity_plus
78 desktop_webview_window
89 dynamic_color
910 flutter_secure_storage_windows
You can’t perform that action at this time.
0 commit comments