theme method

NikuSelectableText theme(
  1. BuildContext context,
  2. TextStyle? callback(
    1. TextTheme theme
    )
)

Apply text theme to Text

Example Usage: NikuSelectableText("Theme") ..theme( context, (theme) => theme.headline1, )

Equivalent:

Text(style: input)

Implementation

NikuSelectableText theme(
  BuildContext context,
  TextStyle? Function(TextTheme theme) callback,
) {
  return style(callback(Theme.of(context).textTheme));
}