findTranslation<T> method

T findTranslation<T>(
  1. T? finder(
    1. PackTranslation
    ),
  2. T fallback, [
  3. String? locale
])

Implementation

T findTranslation<T>(T? Function(PackTranslation) finder, T fallback,
        [String? locale]) =>
    finder(getTranslation(locale)) ?? finder(getTranslation()) ?? fallback;