useTextStyle method
void
useTextStyle({
- NikuTextStyle base()?,
- NikuTextStyle disabled()?,
- NikuTextStyle dragged()?,
- NikuTextStyle error()?,
- NikuTextStyle focused()?,
- NikuTextStyle hovered()?,
- NikuTextStyle pressed()?,
- NikuTextStyle scrolledUnder()?,
- NikuTextStyle selected()?,
Implementation
void useTextStyle({
NikuTextStyle Function(NikuTextStyle)? base,
NikuTextStyle Function(NikuTextStyle)? disabled,
NikuTextStyle Function(NikuTextStyle)? dragged,
NikuTextStyle Function(NikuTextStyle)? error,
NikuTextStyle Function(NikuTextStyle)? focused,
NikuTextStyle Function(NikuTextStyle)? hovered,
NikuTextStyle Function(NikuTextStyle)? pressed,
NikuTextStyle Function(NikuTextStyle)? scrolledUnder,
NikuTextStyle Function(NikuTextStyle)? selected,
}) =>
textStyleState = NikuState(
disabled: disabled != null
? disabled(textStyleState?.disabled ?? NikuTextStyle())
: null,
dragged: dragged != null
? dragged(textStyleState?.dragged ?? NikuTextStyle())
: null,
error: error != null
? error(textStyleState?.error ?? NikuTextStyle())
: null,
focused: focused != null
? focused(textStyleState?.focused ?? NikuTextStyle())
: null,
hovered: hovered != null
? hovered(textStyleState?.hovered ?? NikuTextStyle())
: null,
pressed: pressed != null
? pressed(textStyleState?.pressed ?? NikuTextStyle())
: null,
scrolledUnder: scrolledUnder != null
? scrolledUnder(textStyleState?.scrolledUnder ?? NikuTextStyle())
: null,
selected: selected != null
? selected(textStyleState?.selected ?? NikuTextStyle())
: null,
base:
base != null ? base(textStyleState?.base ?? NikuTextStyle()) : null,
);