fooder-app/lib/components/navigation_bar.dart

34 lines
935 B
Dart
Raw Normal View History

2024-03-30 14:07:10 +01:00
import 'package:flutter/material.dart';
2024-04-04 19:03:41 +02:00
import 'package:flutter/widgets.dart';
import 'package:fooder/components/blur_container.dart';
2024-03-30 14:07:10 +01:00
class FNavBar extends StatelessWidget {
static const maxWidth = 920.0;
final List<Widget> children;
final double height;
2024-04-04 19:03:41 +02:00
const FNavBar({super.key, required this.children, this.height = 78});
2024-03-30 14:07:10 +01:00
@override
Widget build(BuildContext context) {
var widthAvail = MediaQuery.of(context).size.width;
// var width = widthAvail > maxWidth ? maxWidth : widthAvail;
2024-04-04 19:03:41 +02:00
return SizedBox(
width: widthAvail,
height: height * children.length,
child: BlurContainer(
width: widthAvail,
height: height * children.length,
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
...children,
Container(
height: height / 3,
color: Colors.transparent,
2024-03-30 14:07:10 +01:00
),
2024-04-04 19:03:41 +02:00
]),
2024-03-30 14:07:10 +01:00
),
);
}
}