DimenInitializer constructor
DimenInitializer({
- DeviceConfig? deviceConfig,
- DeviceType? deviceType,
- Iterable<
DimenConfigData< dimens = const [],Dimen> > - DimenConfig<
ConstraintDimen> appbar = DefaultConfigs.appbar, - DimenConfig<
ConstraintDimen> bottom = DefaultConfigs.bottom, - DimenConfig<
ConstraintDimen> button = DefaultConfigs.button, - DimenConfig<
ConstraintDimen> image = DefaultConfigs.image, - DimenConfig<
ConstraintDimen> scaffold = DefaultConfigs.scaffold, - DimenConfig<
SizeDimen> avatar = DefaultConfigs.avatar, - DimenConfig<
SizeDimen> corner = DefaultConfigs.corner, - DimenConfig<
SizeDimen> divider = DefaultConfigs.divider, - DimenConfig<
SizeDimen> fontSize = DefaultConfigs.fontSize, - DimenConfig<
SizeDimen> icon = DefaultConfigs.icon, - DimenConfig<
SizeDimen> indicator = DefaultConfigs.indicator, - DimenConfig<
SizeDimen> logo = DefaultConfigs.logo, - DimenConfig<
SizeDimen> margin = DefaultConfigs.margin, - DimenConfig<
SizeDimen> padding = DefaultConfigs.padding, - DimenConfig<
SizeDimen> size = DefaultConfigs.size, - DimenConfig<
SizeDimen> spacing = DefaultConfigs.spacing, - DimenConfig<
SizeDimen> stroke = DefaultConfigs.stroke, - DimenConfig<
WeightDimen> fontWeight = DefaultConfigs.fontWeight,
Implementation
DimenInitializer({
// CONFIGS
DeviceConfig? deviceConfig,
DeviceType? deviceType,
Iterable<DimenConfigData> dimens = const [],
// CONSTRAINT DIMENS
DimenConfig<ConstraintDimen> appbar = DefaultConfigs.appbar,
DimenConfig<ConstraintDimen> bottom = DefaultConfigs.bottom,
DimenConfig<ConstraintDimen> button = DefaultConfigs.button,
DimenConfig<ConstraintDimen> image = DefaultConfigs.image,
DimenConfig<ConstraintDimen> scaffold = DefaultConfigs.scaffold,
// SIZE DIMENS
DimenConfig<SizeDimen> avatar = DefaultConfigs.avatar,
DimenConfig<SizeDimen> corner = DefaultConfigs.corner,
DimenConfig<SizeDimen> divider = DefaultConfigs.divider,
DimenConfig<SizeDimen> fontSize = DefaultConfigs.fontSize,
DimenConfig<SizeDimen> icon = DefaultConfigs.icon,
DimenConfig<SizeDimen> indicator = DefaultConfigs.indicator,
DimenConfig<SizeDimen> logo = DefaultConfigs.logo,
DimenConfig<SizeDimen> margin = DefaultConfigs.margin,
DimenConfig<SizeDimen> padding = DefaultConfigs.padding,
DimenConfig<SizeDimen> size = DefaultConfigs.size,
DimenConfig<SizeDimen> spacing = DefaultConfigs.spacing,
DimenConfig<SizeDimen> stroke = DefaultConfigs.stroke,
// WEIGHT DIMENS
DimenConfig<WeightDimen> fontWeight = DefaultConfigs.fontWeight,
}) : _config = deviceConfig,
_type = deviceType {
// CONSTRAINT DIMENS
_dimens[DefaultDimenKeys.appbar] = appbar;
_dimens[DefaultDimenKeys.bottom] = bottom;
_dimens[DefaultDimenKeys.button] = button;
_dimens[DefaultDimenKeys.image] = image;
_dimens[DefaultDimenKeys.scaffold] = scaffold;
// SIZE DIMENS
_dimens[DefaultDimenKeys.avatar] = avatar;
_dimens[DefaultDimenKeys.corner] = corner;
_dimens[DefaultDimenKeys.divider] = divider;
_dimens[DefaultDimenKeys.fontSize] = fontSize;
_dimens[DefaultDimenKeys.icon] = icon;
_dimens[DefaultDimenKeys.indicator] = indicator;
_dimens[DefaultDimenKeys.logo] = logo;
_dimens[DefaultDimenKeys.margin] = margin;
_dimens[DefaultDimenKeys.padding] = padding;
_dimens[DefaultDimenKeys.size] = size;
_dimens[DefaultDimenKeys.space] = spacing;
_dimens[DefaultDimenKeys.stroke] = stroke;
// WEIGHT DIMENS
_dimens[DefaultDimenKeys.fontWeight] = fontWeight;
// CONFIGS
if (dimens.isNotEmpty) {
_dimens.addEntries(dimens.map((e) => MapEntry(e.name, e.config)));
}
}