defaultParameters method Null safety

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 = {
    'os': Platform.isIOS ? 'ios' : 'android',
    'locale': localeForApi,
  };
  String? deviceId = await _deviceId();
  if (deviceId != null) {
    defaultParameters['device_id'] = deviceId;
  }
  return defaultParameters;
}