toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  // we need to check web first because `Platform.isX` fails on web
  if (kIsWeb) {
    return <String, dynamic>{};
  } else if (Platform.isAndroid) {
    return android.toJson();
  } else if (Platform.isIOS) {
    return iOS.toJson();
  } else {
    return <String, dynamic>{};
  }
}