applyResponsiveStyle method
void
applyResponsiveStyle({
- required BuildContext context,
- required Function applier,
- required RapidPrefixType prefixType,
Implementation
void applyResponsiveStyle({
required BuildContext context,
required Function applier,
required RapidPrefixType prefixType,
}) {
final Size deviceSize = MediaQuery.of(context).size;
if (deviceSize.width < 600 && prefixType == RapidPrefixType.mobile) {
applier();
} else if (deviceSize.width > 600 && prefixType == RapidPrefixType.tab) {
applier();
} else if (deviceSize.width > 1200 &&
prefixType == RapidPrefixType.laptop) {
applier();
} else if (deviceSize.width > 1400 &&
prefixType == RapidPrefixType.desktop) {
applier();
}
}