setAfibFundamentals method
void
setAfibFundamentals({
- List<
double> marginSizes = bootstrapStandardMargins, - List<
double> paddingSizes = bootstrapStandardPadding, - List<
double> borderRadiusSizes = bootstrapStandardBorderRadius, - IconData iconBack = Icons.arrow_back,
- Color colorTapableText = Colors.blue,
- AFConvertSizeToFormFactorDelegate convertFormFactor = AFAppFundamentalThemeAreaBuilder.convertFormFactor,
- Color? colorAlert,
- Color colorOnAlert = Colors.white,
The app must call this method to establish some fundamental theme values that both flutter and AFib expect.
Values which are not specified will be derived intelligently.
marginScale and paddingScale should each contain six values, starting with zero, which specify the various values returned AFFunctionalTheme.margin and AFFunctionalTheme.padding
Implementation
void setAfibFundamentals({
List<double> marginSizes = bootstrapStandardMargins,
List<double> paddingSizes = bootstrapStandardPadding,
List<double> borderRadiusSizes = bootstrapStandardBorderRadius,
IconData iconBack = Icons.arrow_back,
IconData iconNavDown = Icons.chevron_right,
Color colorTapableText = Colors.blue,
AFConvertSizeToFormFactorDelegate convertFormFactor = AFAppFundamentalThemeAreaBuilder.convertFormFactor,
Color? colorAlert,
Color colorOnAlert = Colors.white,
}) {
assert(marginSizes.length == bootstrapStandardMargins.length);
assert(paddingSizes.length == bootstrapStandardPadding.length);
assert(borderRadiusSizes.length == bootstrapStandardBorderRadius.length);
//assert(formFactorLimits.length == afFormFactorMinimums.length);
colorAlert ??= Colors.amber[900];
// icons
setValue(AFUIThemeID.marginSizes, marginSizes);
setValue(AFUIThemeID.paddingSizes, paddingSizes);
setValue(AFUIThemeID.borderRadiusSizes, borderRadiusSizes);
setValue(AFUIThemeID.iconBack, iconBack);
setValue(AFUIThemeID.iconNavDown, iconNavDown);
setValue(AFUIThemeID.colorTapableText, colorTapableText);
setValue(AFUIThemeID.formFactorDelegate, convertFormFactor);
setValue(AFUIThemeID.colorAlert, colorAlert);
setValue(AFUIThemeID.colorOnAlert, colorOnAlert);
}