defaultParameters method

Future<Map<String, String>> defaultParameters()

Default parameters sent to MBurger.

  • Returns a Future that completes with the map of default parameters.

Implementation

Future<Map<String, String>> defaultParameters() async {
  Map<String, String> defaultParameters = {
    'locale': localeForApi,
  };
  if (!kIsWeb) {
    defaultParameters['os'] = Platform.isIOS ? 'ios' : 'android';
  }
  String? deviceId = await _deviceId();
  if (deviceId != null) {
    defaultParameters['device_id'] = deviceId;
  }
  return defaultParameters;
}