toJson method

Map<String, dynamic> toJson()

Flat JSON shape matching the Node CLI's --json profile fields exactly.

Implementation

Map<String, dynamic> toJson() => {
      'slug': slug,
      'type': type,
      'deepLink': deepLink,
      'forceRedirect': forceRedirect,
      'platforms': {
        'ios': ios.toJson(),
        'ipad': {'destination': ipad.destination, if (ipad.app != null) 'app': ipad.app},
        'android': {
          'destination': android.destination,
          if (android.app != null) 'app': android.app,
          if (android.minVersion != null) 'minVersion': android.minVersion,
        },
        'desktop': {'destination': desktop.destination},
      },
      'attribution': attribution,
    };