Implement tender workflows and dashboard integration
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/push Build encountered an error
This commit is contained in:
@@ -8,6 +8,7 @@ class AnimatedFeedbackButton extends StatefulWidget {
|
||||
final Color activeColor;
|
||||
final Color inactiveColor;
|
||||
final bool isActive;
|
||||
final bool isLoading;
|
||||
final VoidCallback onTap;
|
||||
final String tooltip;
|
||||
|
||||
@@ -18,6 +19,7 @@ class AnimatedFeedbackButton extends StatefulWidget {
|
||||
required this.isActive,
|
||||
required this.onTap,
|
||||
required this.tooltip,
|
||||
this.isLoading = false,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@@ -63,6 +65,9 @@ class _AnimatedFeedbackButtonState extends State<AnimatedFeedbackButton>
|
||||
}
|
||||
|
||||
void _handleTap() {
|
||||
if (widget.isLoading) {
|
||||
return;
|
||||
}
|
||||
_clickController.forward().then((_) {
|
||||
_clickController.reverse();
|
||||
});
|
||||
@@ -75,7 +80,7 @@ class _AnimatedFeedbackButtonState extends State<AnimatedFeedbackButton>
|
||||
message: widget.tooltip,
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
onTap: _handleTap,
|
||||
onTap: widget.isLoading ? null : _handleTap,
|
||||
child: AnimatedBuilder(
|
||||
animation: _clickController,
|
||||
builder: (context, child) {
|
||||
@@ -94,15 +99,23 @@ class _AnimatedFeedbackButtonState extends State<AnimatedFeedbackButton>
|
||||
duration: const Duration(milliseconds: 100),
|
||||
curve: Curves.easeInOut,
|
||||
builder: (context, color, child) {
|
||||
return SvgPicture.asset(
|
||||
return SizedBox(
|
||||
width: 24.0.w(),
|
||||
height: 24.0.w(),
|
||||
fit: BoxFit.cover,
|
||||
widget.iconPath,
|
||||
colorFilter: ColorFilter.mode(
|
||||
color ?? widget.inactiveColor,
|
||||
BlendMode.srcATop,
|
||||
),
|
||||
child:
|
||||
widget.isLoading
|
||||
? CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
color: color ?? widget.inactiveColor,
|
||||
)
|
||||
: SvgPicture.asset(
|
||||
fit: BoxFit.cover,
|
||||
widget.iconPath,
|
||||
colorFilter: ColorFilter.mode(
|
||||
color ?? widget.inactiveColor,
|
||||
BlendMode.srcATop,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user