Skip to content
Snippets Groups Projects
Commit 8f9ba552 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: implement persistent no-wifi snackabr

parent fe93f3b8
No related branches found
No related tags found
1 merge request!11Clhp map
......@@ -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,
......
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(),
);
}
......
......@@ -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"))
}
......@@ -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"));
}
......@@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
connectivity_plus
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment