mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Add new grey color constant and new icons for settings in assets
Update CreateNewRoutineView to use const constructor Add SubSpaceModel class for device settings Add DefaultContainer widget for web layout Add events and states for device settings bloc Update API endpoints for device settings
This commit is contained in:
45
lib/web_layout/default_container.dart
Normal file
45
lib/web_layout/default_container.dart
Normal file
@ -0,0 +1,45 @@
|
||||
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,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user