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