style: apply dart format across project
This commit is contained in:
@@ -39,7 +39,7 @@ class DangerButton extends StatefulWidget {
|
||||
|
||||
class _DangerButtonState extends State<DangerButton> {
|
||||
bool _isHovered = false;
|
||||
|
||||
|
||||
static const Color _dangerColor = AppColors.dangerColor;
|
||||
|
||||
Future<void> _handlePress() async {
|
||||
@@ -74,8 +74,7 @@ class _DangerButtonState extends State<DangerButton> {
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
widget.confirmationMessage ??
|
||||
'이 작업은 되돌릴 수 없습니다.\n계속하시겠습니까?',
|
||||
widget.confirmationMessage ?? '이 작업은 되돌릴 수 없습니다.\n계속하시겠습니까?',
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
@@ -171,4 +170,4 @@ class _DangerButtonState extends State<DangerButton> {
|
||||
|
||||
return button;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,8 +43,10 @@ class _PrimaryButtonState extends State<PrimaryButton> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final effectiveBackgroundColor = widget.backgroundColor ?? theme.primaryColor;
|
||||
final effectiveForegroundColor = widget.foregroundColor ?? AppColors.pureWhite;
|
||||
final effectiveBackgroundColor =
|
||||
widget.backgroundColor ?? theme.primaryColor;
|
||||
final effectiveForegroundColor =
|
||||
widget.foregroundColor ?? AppColors.pureWhite;
|
||||
|
||||
Widget button = AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
@@ -64,7 +66,8 @@ class _PrimaryButtonState extends State<PrimaryButton> {
|
||||
padding: widget.padding ?? const EdgeInsets.symmetric(vertical: 16),
|
||||
elevation: widget.enableHoverEffect && _isHovered ? 2 : 0,
|
||||
shadowColor: Colors.black.withValues(alpha: 0.08),
|
||||
disabledBackgroundColor: effectiveBackgroundColor.withValues(alpha: 0.6),
|
||||
disabledBackgroundColor:
|
||||
effectiveBackgroundColor.withValues(alpha: 0.6),
|
||||
),
|
||||
child: widget.isLoading
|
||||
? SizedBox(
|
||||
@@ -110,4 +113,4 @@ class _PrimaryButtonState extends State<PrimaryButton> {
|
||||
|
||||
return button;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,18 +61,18 @@ class _SecondaryButtonState extends State<SecondaryButton> {
|
||||
borderRadius: BorderRadius.circular(widget.borderRadius),
|
||||
),
|
||||
side: BorderSide(
|
||||
color: _isHovered
|
||||
color: _isHovered
|
||||
? effectiveBorderColor.withValues(alpha: 0.4)
|
||||
: effectiveBorderColor,
|
||||
width: widget.borderWidth,
|
||||
),
|
||||
padding: widget.padding ?? const EdgeInsets.symmetric(
|
||||
vertical: 12,
|
||||
horizontal: 24,
|
||||
),
|
||||
backgroundColor: _isHovered
|
||||
? AppColors.glassBackground
|
||||
: Colors.transparent,
|
||||
padding: widget.padding ??
|
||||
const EdgeInsets.symmetric(
|
||||
vertical: 12,
|
||||
horizontal: 24,
|
||||
),
|
||||
backgroundColor:
|
||||
_isHovered ? AppColors.glassBackground : Colors.transparent,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -146,7 +146,7 @@ class _TextLinkButtonState extends State<TextLinkButton> {
|
||||
Widget button = AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
decoration: BoxDecoration(
|
||||
color: _isHovered
|
||||
color: _isHovered
|
||||
? theme.colorScheme.onSurface.withValues(alpha: 0.05)
|
||||
: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
@@ -179,9 +179,8 @@ class _TextLinkButtonState extends State<TextLinkButton> {
|
||||
fontSize: widget.fontSize,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: effectiveColor,
|
||||
decoration: _isHovered
|
||||
? TextDecoration.underline
|
||||
: TextDecoration.none,
|
||||
decoration:
|
||||
_isHovered ? TextDecoration.underline : TextDecoration.none,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -199,4 +198,4 @@ class _TextLinkButtonState extends State<TextLinkButton> {
|
||||
|
||||
return button;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user