Skip to content
Snippets Groups Projects
Commit 001ea15f authored by Anager's avatar Anager
Browse files

added infobox

parent b08c2b80
No related branches found
No related tags found
No related merge requests found
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
......@@ -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)
),
......
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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment