getTermReadingOverrideWidget method

Widget getTermReadingOverrideWidget(
  1. {required BuildContext context,
  2. required AppModel appModel,
  3. required DictionaryHeading heading,
  4. required dynamic onSearch(
    1. String
    )}
)

Some languages may want to display custom widgets rather than the built in word and reading text that is there by default. For example, Japanese may want to display a furigana widget instead.

Implementation

Widget getTermReadingOverrideWidget({
  required BuildContext context,
  required AppModel appModel,
  required DictionaryHeading heading,
  required Function(String) onSearch,
}) {
  return Column(
    crossAxisAlignment: CrossAxisAlignment.start,
    children: [
      Text(
        heading.term,
        style: Theme.of(context)
            .textTheme
            .titleLarge!
            .copyWith(fontWeight: FontWeight.bold),
      ),
      Text(
        heading.reading,
        style: Theme.of(context).textTheme.titleMedium,
      ),
    ],
  );
}