diff --git a/app/lib/controller/network_controller.dart b/app/lib/controller/network_controller.dart index 37afe15c164c086a642c03cb8587a7683c944d4f..e0992f06d1f3c622eb4e7d681a11a9ad167a257e 100644 --- a/app/lib/controller/network_controller.dart +++ b/app/lib/controller/network_controller.dart @@ -20,7 +20,7 @@ class NetworkController extends GetxController { if (connectivityResult == ConnectivityResult.none) { Get.rawSnackbar( messageText: Text( - 'You are not connected to the internet. The displayed information may be inaccurate.', + 'No internet connection. The displayed information may be outdated!', style: regTextStyle, ), isDismissible: false, diff --git a/app/lib/main.dart b/app/lib/main.dart index b6384264455e6fbc32bea4a9dfd61e77c9a88b69..3fa16618b7b5ea5f70ce7e61fec12d956451a5fd 100644 --- a/app/lib/main.dart +++ b/app/lib/main.dart @@ -1,9 +1,12 @@ +import 'package:get/get.dart'; import 'package:flutter/material.dart'; import 'pages/loading_page.dart'; +import 'package:app/controller/dependency_injection.dart'; void main() { runApp(const MyApp()); + DependencyInjection.init(); } class MyApp extends StatelessWidget { @@ -11,7 +14,7 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return const MaterialApp( + return const GetMaterialApp( // GetMaterialApp for snack-bar support home: LoadingPage(), ); } diff --git a/app/macos/Flutter/GeneratedPluginRegistrant.swift b/app/macos/Flutter/GeneratedPluginRegistrant.swift index b8e2b22f76117bd244aa074a3298db850fb02ef1..37769918364446aa1f43f8b67f5daefcd48374aa 100644 --- a/app/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/app/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,10 +5,12 @@ import FlutterMacOS import Foundation +import connectivity_plus import path_provider_foundation import shared_preferences_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) } diff --git a/app/windows/flutter/generated_plugin_registrant.cc b/app/windows/flutter/generated_plugin_registrant.cc index 8b6d4680af388f28db8742ef7fb8246e2bb1fffb..8777c93d985871e9830122b808f7cf84bf118fb6 100644 --- a/app/windows/flutter/generated_plugin_registrant.cc +++ b/app/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include <connectivity_plus/connectivity_plus_windows_plugin.h> void RegisterPlugins(flutter::PluginRegistry* registry) { + ConnectivityPlusWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); } diff --git a/app/windows/flutter/generated_plugins.cmake b/app/windows/flutter/generated_plugins.cmake index b93c4c30c16703f640bc38523e56204ade09399e..cc1361d8d899e7b84030221abc04b40f4b859842 100644 --- a/app/windows/flutter/generated_plugins.cmake +++ b/app/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + connectivity_plus ) list(APPEND FLUTTER_FFI_PLUGIN_LIST