Smaller Changes
This commit is contained in:
parent
11d359db7a
commit
9998a90fc0
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:Emma_home/utils/class.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:Emma_home/screens/subheader_Datepicker.dart';
|
||||
//import 'package:learn_project/main.dart';
|
||||
|
|
@ -9,8 +10,9 @@ class Frame28 extends StatelessWidget {
|
|||
final List<Map<String, dynamic>> events;
|
||||
final Color color;
|
||||
final MediaQueryData screen_size;
|
||||
final Category category;
|
||||
|
||||
const Frame28({super.key, required this.events, required this.color, required this.screen_size});
|
||||
const Frame28({super.key, required this.events, required this.color, required this.screen_size, required this.category});
|
||||
|
||||
/* void initState() {
|
||||
super.initState();
|
||||
|
|
@ -108,7 +110,7 @@ class Frame28 extends StatelessWidget {
|
|||
),
|
||||
SizedBox(
|
||||
height: 35,
|
||||
child: MusikHeader(),
|
||||
child: MusikHeader(name:category.title , icon: category.iconUrl),
|
||||
),
|
||||
//Container(),
|
||||
Column(
|
||||
|
|
|
|||
|
|
@ -97,10 +97,13 @@ class _HomePage extends State<HomePage> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var size = MediaQuery.of(context).size;
|
||||
//var appBarHeight = Scaffold.of(context).appBarMaxHeight;
|
||||
|
||||
//var single_categories = Categories.instance;
|
||||
//single_categories.updateCategoryAmount('Ingolstadt');
|
||||
/*24 is for notification bar on Android*/
|
||||
final double itemHeight = (size.height - kToolbarHeight - 270) / 4;
|
||||
//final double itemHeight = (size.height - kToolbarHeight - 270) / 4; 290 for iOs 230 android
|
||||
final double itemHeight = (size.height - 230-90) / 4;
|
||||
final double itemWidth = (size.width-40)/ 2;
|
||||
MediaQueryData queryData;
|
||||
queryData = MediaQuery.of(context);
|
||||
|
|
@ -224,6 +227,7 @@ class _HomePage extends State<HomePage> {
|
|||
events: events2,
|
||||
color: singleCategories.categories[index].color,
|
||||
screen_size: queryData,
|
||||
category: singleCategories.categories[index],
|
||||
)));
|
||||
},
|
||||
child:
|
||||
|
|
|
|||
|
|
@ -273,12 +273,13 @@ class EventCard2Section extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
shortenText(title, 30),
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w400,
|
||||
fontWeight: FontWeight.w800,
|
||||
//fontWeight: FontWeight.w400,
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
|
|
@ -291,7 +292,8 @@ class EventCard2Section extends StatelessWidget {
|
|||
color: Color(0xFF0A0A0A),
|
||||
fontSize: 18,
|
||||
fontFamily: 'Inter',
|
||||
fontWeight: FontWeight.w800,
|
||||
fontWeight: FontWeight.w400,
|
||||
//fontWeight: FontWeight.w800,
|
||||
height: 1.2,
|
||||
),
|
||||
),),
|
||||
|
|
@ -857,15 +859,22 @@ class TagSlider extends StatelessWidget {
|
|||
}
|
||||
|
||||
class MusikHeader extends StatelessWidget {
|
||||
const MusikHeader({super.key});
|
||||
final String name; // First variable
|
||||
final String icon; // Second variable
|
||||
|
||||
const MusikHeader({
|
||||
super.key,
|
||||
required this.name,
|
||||
required this.icon,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 390,
|
||||
height: 32,
|
||||
//width: 390,
|
||||
height: 35,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
|
@ -888,10 +897,14 @@ class MusikHeader extends StatelessWidget {
|
|||
width: 32,
|
||||
height: 32,
|
||||
child: Image.asset(
|
||||
'assets/images/Icons/Icon_Musik.png',
|
||||
icon,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
print('Error loading image: $error');
|
||||
return const Icon(Icons.error);
|
||||
},
|
||||
), ),
|
||||
const Text(
|
||||
'Musik',
|
||||
Text(
|
||||
name,
|
||||
style: TextStyle(
|
||||
color: Color(0xFF171717),
|
||||
fontSize: 20,
|
||||
|
|
@ -905,7 +918,7 @@ class MusikHeader extends StatelessWidget {
|
|||
),
|
||||
const SizedBox(width: 89),
|
||||
|
||||
const SizedBox(width: 89),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ String shortenText(String text, int maxLength) {
|
|||
}
|
||||
|
||||
// Drei Punkte hinzufügen
|
||||
return '$shortened...';
|
||||
return '$shortened ...';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue