36 lines
918 B
Dart
36 lines
918 B
Dart
|
import 'package:ernaehrung/web/component/header_button_component.dart';
|
||
|
import 'package:flutter/cupertino.dart';
|
||
|
|
||
|
class HeaderComponentWeb extends StatelessWidget {
|
||
|
HeaderComponentWeb({Key? key}) : super(key: key);
|
||
|
|
||
|
final List<HeaderData> headerButtons = [
|
||
|
HeaderData("Heute", const Placeholder()),
|
||
|
HeaderData("Fortschritt", const Placeholder()),
|
||
|
HeaderData("Mahlzeitplan", const Placeholder())
|
||
|
];
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Row(
|
||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
|
children: List.generate(headerButtons.length, (index) =>
|
||
|
HeaderButton(headerButtons[index].buttonText, headerButtons[index].page))
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class HeaderData{
|
||
|
final String buttonText;
|
||
|
final Widget page;
|
||
|
|
||
|
HeaderData(this.buttonText, this.page);
|
||
|
|
||
|
@override
|
||
|
String toString() {
|
||
|
return 'HeaderData{route: $page, buttonText: $buttonText}';
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|