loadSettings method

Future<void> loadSettings()

Loads the app origin from the shared preferences.

If the app origin is not present in the shared preferences, it sets the default value to 'wss://caesar-transfer-iu.shuttleapp.rs'.

Returns a Future that completes with no value.

Implementation

Future<void> loadSettings() async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  appOrigin = prefs.getString('app_origin') ??
      'wss://caesar-transfer-iu.shuttleapp.rs'; // Load the app origin
}