changing ac bloc

This commit is contained in:
ashrafzarkanisala
2024-08-26 00:48:29 +03:00
parent d7e3c1e1d0
commit d94ec25003
23 changed files with 780 additions and 185 deletions

View File

@ -6,6 +6,7 @@ class IncrementDecrementWidget extends StatelessWidget {
final String description;
final VoidCallback onIncrement;
final VoidCallback onDecrement;
final Color? descriptionColor;
const IncrementDecrementWidget({
super.key,
@ -13,6 +14,7 @@ class IncrementDecrementWidget extends StatelessWidget {
required this.description,
required this.onIncrement,
required this.onDecrement,
this.descriptionColor,
});
@override
@ -22,18 +24,20 @@ class IncrementDecrementWidget extends StatelessWidget {
children: [
Material(
type: MaterialType.transparency,
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: InkWell(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: onDecrement,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.remove,
color: ColorsManager.greyColor,
size: 32,
child: Flexible(
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: InkWell(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: onDecrement,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.remove,
color: ColorsManager.greyColor,
size: 28,
),
),
),
),
@ -53,9 +57,9 @@ class IncrementDecrementWidget extends StatelessWidget {
),
TextSpan(
text: description,
style: const TextStyle(
style: TextStyle(
fontSize: 12,
color: ColorsManager.blackColor,
color: descriptionColor ?? ColorsManager.blackColor,
fontWeight: FontWeight.bold,
),
),
@ -64,18 +68,20 @@ class IncrementDecrementWidget extends StatelessWidget {
),
Material(
type: MaterialType.transparency,
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: InkWell(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: onIncrement,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.add,
color: ColorsManager.greyColor,
size: 32,
child: Flexible(
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: InkWell(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: onIncrement,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.add,
color: ColorsManager.greyColor,
size: 28,
),
),
),
),