AmplifyAPI constructor

AmplifyAPI({
  1. List<APIAuthProvider> authProviders = const [],
  2. ModelProviderInterface? modelProvider,
})

The AWS implementation of the Amplify API category.

Implementation

factory AmplifyAPI({
  List<APIAuthProvider> authProviders = const [],
  ModelProviderInterface? modelProvider,
}) {
  if (zIsWeb || Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
    throw UnsupportedError('This platform is not supported yet');
  }
  return AmplifyAPIMethodChannel(
    authProviders: authProviders,
    modelProvider: modelProvider,
  );
}