mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
46 lines
1.1 KiB
Dart
46 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class DefaultContainer extends StatelessWidget {
|
|
const DefaultContainer({
|
|
super.key,
|
|
required this.child,
|
|
this.height,
|
|
this.width,
|
|
this.color,
|
|
this.boxConstraints,
|
|
this.margin,
|
|
this.padding,
|
|
this.onTap,
|
|
this.borderRadius,
|
|
});
|
|
|
|
final double? height;
|
|
final double? width;
|
|
final Widget child;
|
|
final BoxConstraints? boxConstraints;
|
|
final EdgeInsets? margin;
|
|
final EdgeInsets? padding;
|
|
final Color? color;
|
|
final Function()? onTap;
|
|
final BorderRadius? borderRadius;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
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 ?? BorderRadius.circular(20),
|
|
),
|
|
padding: padding ?? const EdgeInsets.all(10),
|
|
child: child,
|
|
),
|
|
);
|
|
}
|
|
}
|