loadSettings method

Future<void> loadSettings()

Loads the settings.

This function loads the settings from the shared preferences. It retrieves the app origin from the shared preferences and assigns it to the appOrigin variable.

Returns a Future that completes when the settings are loaded.

Implementation

Future<void> loadSettings() async {
  // Get the shared preferences instance.
  SharedPreferences prefs = await SharedPreferences.getInstance();

  // Get the app origin from the shared preferences.
  // If the app origin is not found, use the default value.
  appOrigin = prefs.getString('app_origin') ??
      'wss://caesar-transfer-iu.shuttleapp.rs';
}