mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 18:16:21 +00:00
Added onTap to DefaultContainer
This commit is contained in:
@ -10,6 +10,7 @@ class DefaultContainer extends StatelessWidget {
|
|||||||
this.boxConstraints,
|
this.boxConstraints,
|
||||||
this.margin,
|
this.margin,
|
||||||
this.padding,
|
this.padding,
|
||||||
|
this.onTap,
|
||||||
});
|
});
|
||||||
|
|
||||||
final double? height;
|
final double? height;
|
||||||
@ -19,13 +20,16 @@ class DefaultContainer extends StatelessWidget {
|
|||||||
final EdgeInsets? margin;
|
final EdgeInsets? margin;
|
||||||
final EdgeInsets? padding;
|
final EdgeInsets? padding;
|
||||||
final Color? color;
|
final Color? color;
|
||||||
|
final Function()? onTap;
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return InkWell(
|
||||||
|
onTap: onTap,
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
child: Container(
|
||||||
height: height,
|
height: height,
|
||||||
width: width,
|
width: width,
|
||||||
margin: margin,
|
margin: margin ?? const EdgeInsets.only(right: 3, bottom: 3),
|
||||||
constraints: boxConstraints,
|
constraints: boxConstraints,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: color ?? Colors.white,
|
color: color ?? Colors.white,
|
||||||
@ -33,6 +37,7 @@ class DefaultContainer extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
padding: padding ?? const EdgeInsets.all(10),
|
padding: padding ?? const EdgeInsets.all(10),
|
||||||
child: child,
|
child: child,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user