From 001ea15f9dc06afd34462563de4cd5ccc18a7f97 Mon Sep 17 00:00:00 2001
From: Anager <fridrich1900@gmail.com>
Date: Sun, 17 Apr 2022 18:54:41 +0200
Subject: [PATCH] added infobox

---
 .../event/barwidget.dart                      | 13 ++--
 .../event/imageslides.dart                    |  2 +-
 .../event/infobox_text.dart                   | 72 +++++++++++++++++++
 lib/main.dart                                 |  2 +-
 4 files changed, 83 insertions(+), 6 deletions(-)
 create mode 100644 lib/bottom_navigation_bar_buttons/event/infobox_text.dart

diff --git a/lib/bottom_navigation_bar_buttons/event/barwidget.dart b/lib/bottom_navigation_bar_buttons/event/barwidget.dart
index e239fd2..4547b58 100644
--- a/lib/bottom_navigation_bar_buttons/event/barwidget.dart
+++ b/lib/bottom_navigation_bar_buttons/event/barwidget.dart
@@ -1,5 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:deggendorf_app/bottom_navigation_bar_buttons/event/imageslides.dart';
+import 'package:deggendorf_app/bottom_navigation_bar_buttons/event/infobox_text.dart';
 
 
 class BarWidget extends StatefulWidget {
@@ -17,6 +18,7 @@ class _BarWidgetState extends State<BarWidget> {
   Widget build(BuildContext context) {
     return Scaffold(
       appBar: AppBar(
+        backgroundColor: Colors.green,
         title: Text(
           "Bar: ${widget.barName}", style: TextStyle(fontSize: 20, color: Colors.white),
         ),
@@ -26,12 +28,15 @@ class _BarWidgetState extends State<BarWidget> {
         child: Column(
           children: [
             ImageSlides(),
+            InfoBox(),
           ],
         )
       ),
+      floatingActionButton: FloatingActionButton(
+        onPressed: null,
+        backgroundColor: Colors.green,
+        child: Icon(Icons.qr_code_scanner),
+      )
     );
   }
-}
-
-
-
+}
\ No newline at end of file
diff --git a/lib/bottom_navigation_bar_buttons/event/imageslides.dart b/lib/bottom_navigation_bar_buttons/event/imageslides.dart
index 70ed4e1..38a1f8b 100644
--- a/lib/bottom_navigation_bar_buttons/event/imageslides.dart
+++ b/lib/bottom_navigation_bar_buttons/event/imageslides.dart
@@ -42,7 +42,7 @@ class _ImageSlidesState extends State<ImageSlides> {
         items: assetsImages.map((item) =>
           Container(
             decoration: BoxDecoration(
-              border: Border.all(color: Colors.black26, width: 10,),
+              border: Border.all(color: Colors.lightGreen, width: 10,),
               borderRadius: BorderRadius.all(Radius.circular(20.0)),
               //image: DecorationImage(image: AssetImage(item), fit: BoxFit.contain, alignment: Alignment.center)
             ),
diff --git a/lib/bottom_navigation_bar_buttons/event/infobox_text.dart b/lib/bottom_navigation_bar_buttons/event/infobox_text.dart
new file mode 100644
index 0000000..cb6e81a
--- /dev/null
+++ b/lib/bottom_navigation_bar_buttons/event/infobox_text.dart
@@ -0,0 +1,72 @@
+import 'package:flutter/material.dart';
+
+
+class InfoBox extends StatefulWidget {
+  const InfoBox({Key? key}) : super(key: key);
+
+  @override
+  State<InfoBox> createState() => _InfoBoxState();
+}
+
+class _InfoBoxState extends State<InfoBox> {
+  final List<BoxShadow> boxShadowsList = [
+    BoxShadow(color: Colors.black38,blurRadius: 3, spreadRadius: 3)
+  ];
+
+  @override
+  Widget build(BuildContext context) {
+    return Padding(
+      padding: EdgeInsetsDirectional.fromSTEB(5, 15, 5, 10),
+      child: Container(
+          margin: EdgeInsetsDirectional.fromSTEB(0, 5, 0, 5),
+          width: MediaQuery.of(context).size.width,
+          decoration: BoxDecoration(
+            color: Colors.white,
+            border: Border.all(
+              color: Colors.lightGreen,
+              width: 5,
+            ),
+            borderRadius: BorderRadius.all(Radius.circular(20)),
+            boxShadow: boxShadowsList,
+          ),
+          child: Padding(
+            padding: EdgeInsetsDirectional.all(5),
+            child: Column(
+              crossAxisAlignment: CrossAxisAlignment.start,
+              children: [
+                LabelWithInfo(label: "Adersse"),
+                LabelWithInfo(label: "Musikthemen"),
+                LabelWithInfo(label: "Eintrittstregeln"),
+                LabelWithInfo(label: "Beschreibung"),
+              ],
+            ),
+          )
+      ),
+    );
+  }
+}
+
+class LabelWithInfo extends StatefulWidget {
+  const LabelWithInfo({Key? key, required this.label}) : super(key: key);
+
+  final String label;
+
+  @override
+  State<LabelWithInfo> createState() => _LabelWithInfoState();
+}
+
+class _LabelWithInfoState extends State<LabelWithInfo> {
+  @override
+  Widget build(BuildContext context) {
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      children: [
+        Text("${widget.label}: ", style: TextStyle(fontSize: 20),),
+        Padding(
+          padding: EdgeInsetsDirectional.fromSTEB(30, 3, 0, 0),
+          child: Text("some information\nnoch etwas", style: TextStyle(fontSize: 14),),
+        )
+      ],
+    );
+  }
+}
\ No newline at end of file
diff --git a/lib/main.dart b/lib/main.dart
index 4e04947..f6e86dd 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -49,7 +49,7 @@ class _MyHomePageState extends State<MyHomePage> {
     //Index: 0
     HomePage(),
     //Index: 1,
-    BarWidget(barName: "Erster International"),
+    BarWidget(barName: "Internationale Abreiterassoziation"),
     //Index: 2,
     Forum(),
     //Index: 3
-- 
GitLab