aurcache/frontend/lib/components/wrapper.dart
lukas-heiligenbrunner 600c2057fe add endpoint for general stats
load build data to graph
redesign top info tiles
place add button on header
folder restructure
2023-12-30 00:45:33 +01:00

35 lines
852 B
Dart

import 'package:flutter/material.dart';
import '../constants/color_constants.dart';
class Wrapper extends StatelessWidget {
final Widget? title;
final Widget child;
const Wrapper({Key? key, this.title, required this.child}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(defaultPadding),
decoration: BoxDecoration(
color: Palette.wrapperBg,
borderRadius: BorderRadius.circular(defaultBorderRadius),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (title != null)
Column(
children: [
title!,
const SizedBox(height: defaultPadding),
],
),
child
],
),
);
}
}