of static method
Implementation
static SizeConfig of(ButtonSize size) {
return switch (size) {
ButtonSize.small => const SizeConfig(
height: 36,
fontSize: 14,
iconSize: 16,
spacing: 6,
padding: EdgeInsets.symmetric(horizontal: 12),
),
ButtonSize.medium => const SizeConfig(
height: 48,
fontSize: 16,
iconSize: 20,
spacing: 8,
padding: EdgeInsets.symmetric(horizontal: 16),
),
ButtonSize.large => const SizeConfig(
height: 56,
fontSize: 18,
iconSize: 24,
spacing: 10,
padding: EdgeInsets.symmetric(horizontal: 20),
),
ButtonSize.icon => const SizeConfig(
height: 48,
fontSize: 0,
iconSize: 24,
spacing: 0,
padding: EdgeInsets.zero,
),
};
}