changed everything from filcnaplo to refilc finally
This commit is contained in:
36
refilc_mobile_ui/lib/common/action_button.dart
Normal file
36
refilc_mobile_ui/lib/common/action_button.dart
Normal file
@@ -0,0 +1,36 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ActionButton extends StatelessWidget {
|
||||
const ActionButton({super.key, required this.label, this.activeColor, this.onTap});
|
||||
|
||||
final Color? activeColor;
|
||||
final void Function()? onTap;
|
||||
final String label;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 6.0, bottom: 6.0, right: 3.0),
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
curve: Curves.easeInOut,
|
||||
height: 32.0,
|
||||
decoration: BoxDecoration(
|
||||
color: (activeColor ?? Theme.of(context).colorScheme.secondary).withOpacity(0.25),
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(vertical: 6.0, horizontal: 12.0),
|
||||
child: Center(
|
||||
child: Text(label,
|
||||
maxLines: 1,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.w600, color: activeColor ?? Theme.of(context).colorScheme.secondary))),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user