updateComponentWithID method

  1. @override
void updateComponentWithID(
  1. AppModel app,
  2. BuildContext context,
  3. String id,
  4. EditorFeedback feedback,
)
override

Implementation

@override
void updateComponentWithID(AppModel app, BuildContext context, String id,
    EditorFeedback feedback) async {
  var policyPresentation =
      await policyPresentationRepository(appId: app.documentID)!.get(id);
  if (policyPresentation != null) {
    _openIt(app, context, false, policyPresentation, feedback);
  } else {
    openErrorDialog(app, context, '${app.documentID}/_error',
        title: 'Error', errorMessage: 'Cannot find policy with id $id');
  }
}