toStandardMap method

  1. @override
Map<String, dynamic> toStandardMap(
  1. DeviceDefinition obj
)
override

Implementors should return a map with keys as Strings. If the value is a list, it should be a list, not an iterable. If you have an iterable, make sure to use .toList() on it.

This map is used by the channel's codec StandardMethodCodec.

Implementation

@override
Map<String, dynamic> toStandardMap(DeviceDefinition obj) => {
      'id': obj.id,
      'name': obj.name,
      'logicalResolution':
          LogicalResolutionMapper().toStandardMap(obj.logicalResolution),
      'devicePixelRatio': obj.devicePixelRatio,
      'targetPlatform': targetPlatformToString(obj.targetPlatform),
    };