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

Merge remote-tracking branch 'origin/barwidget_Haraldr' into Deggendorf_App_1.0

# Conflicts:
#	lib/bin/main.dart
#	pubspec.yaml
parents 2d2e08cb 001ea15f
No related branches found
No related tags found
No related merge requests found
assets/degg.png

158 KiB

assets/deggwappen.png

38.6 KiB

......@@ -4,8 +4,8 @@ import 'package:flutter/material.dart';
import '../bottom_navigation_bar_buttons/forum/forum.dart';
import '../bottom_navigation_bar_buttons/profile/profile.dart';
import '../bottom_navigation_bar_buttons/profile/profile.dart';
import '../bottom_navigation_bar_buttons/home_page/weather/current_weather.dart';
import '../bottom_navigation_bar_buttons/event/barwidget.dart';
void main() {
runApp(const MyApp());
......
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 {
const BarWidget({Key? key,
required this.barName}) : super(key: key);
final String barName;
@override
State<BarWidget> createState() => _BarWidgetState();
}
class _BarWidgetState extends State<BarWidget> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.green,
title: Text(
"Bar: ${widget.barName}", style: TextStyle(fontSize: 20, color: Colors.white),
),
),
body: Padding(
padding: EdgeInsets.all(20),
child: Column(
children: [
ImageSlides(),
InfoBox(),
],
)
),
floatingActionButton: FloatingActionButton(
onPressed: null,
backgroundColor: Colors.green,
child: Icon(Icons.qr_code_scanner),
)
);
}
}
\ No newline at end of file
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:carousel_slider/carousel_slider.dart';
class ImageSlides extends StatefulWidget {
const ImageSlides({Key? key}) : super(key: key);
@override
State<ImageSlides> createState() => _ImageSlidesState();
}
class _ImageSlidesState extends State<ImageSlides> {
final List<String> hrefList = [
"https://www.brunner-hof.de/wAssets/img/bayerischer-wald/staedtereisen/deggendorf/4-zu-3/DEG-Luitpoldplatz-neu.jpg",
"https://imgs.search.brave.com/UaQJQq8IFdqgaRMf9d3QfX_VLrVR2N3rpaXlbIPQKBE/rs:fit:1200:1175:1/g:ce/aHR0cHM6Ly9kZWdn/ZW5kb3JmLnRyYXZl/bC9tZWRpYS9kZWdn/ZW5kb3JmLXRyYXZl/bC1zdGFkdGZ1ZWhy/dW5nLW1pdC1tdXNl/dW0uanBn",
"https://imgs.search.brave.com/PtWgLI_rVxR-TrRrX5UnK7YsxRblWOCmTg1t1AulsqU/rs:fit:1200:908:1/g:ce/aHR0cHM6Ly9kZWdn/ZW5kb3JmLnRyYXZl/bC9tZWRpYS9kZWdn/ZW5kb3JmLXRyYXZl/bC1zdGFkdGZ1ZWhy/dW5nLXBhbm9yYW1h/LXJ1bmRmYWhydC5q/cGVn",
"https://imgs.search.brave.com/XrtSLROJB85b4abN9IGzVRSbt2fk1UaTWu92yKBEA0M/rs:fit:1200:1127:1/g:ce/aHR0cHM6Ly93d3cu/ZGVnZ2VuZG9yZi5k/ZS9tZWRpYS9kZWdn/ZW5kb3JmLXJpZXNl/bnJhZC1nZXdpbm5z/cGllbC1nZXdpbm5l/cmZvdG9zLTEuanBn",
];
final List<String> assetsImages = [
"assets/defaultProfilePicture.png",
"assets/degg.png",
"assets/deggwappen.png"
];
@override
Widget build(BuildContext context) {
return
CarouselSlider(
options: CarouselOptions(
height: 180.0,
enlargeCenterPage: true,
autoPlay: true,
aspectRatio: 16 / 9,
autoPlayCurve: Curves.fastOutSlowIn,
enableInfiniteScroll: true,
autoPlayAnimationDuration: Duration(seconds: 5),
viewportFraction: 0.8,
),
items: assetsImages.map((item) =>
Container(
decoration: BoxDecoration(
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)
),
//child: Image.network(item, fit: BoxFit.cover, width: 1000,)
child: Container(
decoration: BoxDecoration(
image: DecorationImage(image: AssetImage(item), fit: BoxFit.contain, alignment: Alignment.center)
),
)
)
).toList()
);
}
}
// options: CarouselOptions(
// height: 180.0,
// enlargeCenterPage: true,
// autoPlay: true,
// aspectRatio: 16 / 9,
// autoPlayCurve: Curves.fastOutSlowIn,
// enableInfiniteScroll: true,
// autoPlayAnimationDuration: Duration(milliseconds: 8000),
// viewportFraction: 0.8,
\ No newline at end of file
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
......@@ -15,6 +15,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
carousel_slider:
dependency: "direct main"
description:
name: carousel_slider
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
characters:
dependency: transitive
description:
......
......@@ -32,14 +32,13 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.4
http: ^0.13.4
flutter_settings_screens: ^0.2.2+1
shared_preferences: ^2.0.13
flutter_speed_dial: ^4.3.0
carousel_slider: ^4.0.0
dev_dependencies:
flutter_test:
......
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