mergeFlutterTheme method
Method to get default flutter theme settings
Implementation
plugintestTheme mergeFlutterTheme(BuildContext context) {
final theme = Theme.of(context);
final mergedTheme = plugintestTheme(
width: width,
height: height,
padding: padding,
margin: margin,
decoration: decoration ?? BoxDecoration(color: theme.cardColor),
iconTheme: iconTheme ?? theme.iconTheme,
selectedIconTheme: selectedIconTheme ??
theme.iconTheme.copyWith(color: theme.primaryColor),
textStyle: textStyle ?? theme.textTheme.bodyMedium,
selectedTextStyle: selectedTextStyle ??
theme.textTheme.bodyMedium?.copyWith(color: theme.primaryColor),
itemDecoration: itemDecoration,
selectedItemDecoration: selectedItemDecoration,
itemMargin: itemMargin,
selectedItemMargin: selectedItemMargin,
itemPadding: itemPadding,
selectedItemPadding: selectedItemPadding,
itemTextPadding: itemTextPadding,
selectedItemTextPadding: selectedItemTextPadding,
hoverColor: hoverColor ?? theme.hoverColor,
hoverTextStyle: hoverTextStyle ??
theme.textTheme.bodyMedium?.copyWith(color: theme.primaryColor),
);
return mergedTheme;
}