openImmersionKitSentenceDialog method

Future<void> openImmersionKitSentenceDialog(
  1. {required List<ImmersionKitResult> exampleSentences,
  2. required dynamic onSelect(
    1. List<ImmersionKitResult>
    ),
  3. required dynamic onAppend(
    1. List<ImmersionKitResult>
    )}
)

A helper function for opening an example sentence dialog for sentences returned from ImmersionKitEnhancement.

Implementation

Future<void> openImmersionKitSentenceDialog({
  required List<ImmersionKitResult> exampleSentences,
  required Function(List<ImmersionKitResult>) onSelect,
  required Function(List<ImmersionKitResult>) onAppend,
}) async {
  await showDialog(
    context: _navigatorKey.currentContext!,
    builder: (context) => ImmersionKitSentencesDialogPage(
      exampleSentences: exampleSentences,
      onSelect: onSelect,
      onAppend: onAppend,
    ),
  );
}