Skip to content

Commit

Permalink
[#346] refactor: CircularStatusIndicator 컴포넌트 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sm-amoled committed Dec 23, 2024
1 parent 610875d commit c872a8f
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions lib/presentation/common_components/circular_status_indicator.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import 'package:awesome_extensions/awesome_extensions.dart';
import 'package:flutter/material.dart';
import 'package:wehavit/common/constants/constants.dart';
import 'package:wehavit/presentation/presentation.dart';

class CircularStatusIndicator extends StatelessWidget {
const CircularStatusIndicator({
required this.isDone,
this.innerLabel = '',
this.pointColor = CustomColors.pointYellow,
super.key,
});

final bool isDone;
final String innerLabel;
final Color pointColor;

@override
Widget build(BuildContext context) {
return Container(
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: isDone ? pointColor : Colors.transparent,
border: Border.all(
color: CustomColors.whBrightGrey,
width: isDone ? 0 : 1,
),
),
width: 25,
height: 25,
alignment: Alignment.center,
child: isDone
? WHIcon(
size: WHIconsize.small,
iconString: WHIcons.checkMark,
iconColor: isDone ? CustomColors.whGrey900 : CustomColors.whGrey600,
)
: Text(
innerLabel,
style: context.labelLarge?.copyWith(
color: isDone ? CustomColors.whGrey900 : CustomColors.whGrey600,
fontWeight: FontWeight.w400,
height: 0.8,
),
),
);
}
}

0 comments on commit c872a8f

Please sign in to comment.