diff --git a/assets/degg.png b/assets/degg.png new file mode 100644 index 0000000000000000000000000000000000000000..8dc82e10184b23ab3d718a92469dc519bb575b6e Binary files /dev/null and b/assets/degg.png differ diff --git a/assets/deggwappen.png b/assets/deggwappen.png new file mode 100644 index 0000000000000000000000000000000000000000..ed259bd4cf5fe3745c094d6fd585a1ea2edb083a Binary files /dev/null and b/assets/deggwappen.png differ diff --git a/lib/bin/main.dart b/lib/bin/main.dart index 1ce43cb99a4d5e6cf0766a2cbfb40eb8ea68d55c..a83baa0902c5c35ae1ed1838fd2a52e6f4390756 100644 --- a/lib/bin/main.dart +++ b/lib/bin/main.dart @@ -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()); diff --git a/lib/bottom_navigation_bar_buttons/event/barwidget.dart b/lib/bottom_navigation_bar_buttons/event/barwidget.dart new file mode 100644 index 0000000000000000000000000000000000000000..4547b587a2bef2eef357bd4dbf6833e5cc042e43 --- /dev/null +++ b/lib/bottom_navigation_bar_buttons/event/barwidget.dart @@ -0,0 +1,42 @@ +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 diff --git a/lib/bottom_navigation_bar_buttons/event/imageslides.dart b/lib/bottom_navigation_bar_buttons/event/imageslides.dart new file mode 100644 index 0000000000000000000000000000000000000000..38a1f8b05ce8d19a75ce7c9aa88f14e0f24f2519 --- /dev/null +++ b/lib/bottom_navigation_bar_buttons/event/imageslides.dart @@ -0,0 +1,70 @@ + +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 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 0000000000000000000000000000000000000000..cb6e81a8e79266083c4bc4a943b0125755c4ecd3 --- /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/pubspec.lock b/pubspec.lock index 18aca1f4d51edc58ddab6e1b1f13615a0157b794..5e73cde2bccfe1cd0a777b50acf3e3da19948d61 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: diff --git a/pubspec.yaml b/pubspec.yaml index ce1d3b41245d631a69097bb45735ff65d1bfa7c0..cd53b3c76a5ce478f9e76e4a440a021afe2ce9d6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: