getForm method

Future<GetFormResponse> getForm({
  1. required String appId,
  2. required String environmentName,
  3. required String id,
})

Returns an existing form for an Amplify app.

May throw InternalServerException. May throw InvalidParameterException. May throw ResourceNotFoundException.

Parameter appId : The unique ID of the Amplify app.

Parameter environmentName : The name of the backend environment that is part of the Amplify app.

Parameter id : The unique ID of the form.

Implementation

Future<GetFormResponse> getForm({
  required String appId,
  required String environmentName,
  required String id,
}) async {
  final response = await _protocol.sendRaw(
    payload: null,
    method: 'GET',
    requestUri:
        '/app/${Uri.encodeComponent(appId)}/environment/${Uri.encodeComponent(environmentName)}/forms/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return GetFormResponse(
    form: Form.fromJson($json),
  );
}