Fix small bugs

This commit is contained in:
Thomas Fransolet 2024-03-04 16:12:21 +01:00
parent 1715893595
commit d82936ff29
5 changed files with 19 additions and 13 deletions

View File

@ -32,7 +32,7 @@ class _VideoViewerYoutube extends State<VideoViewerYoutube> {
params: iframe.YoutubePlayerParams( params: iframe.YoutubePlayerParams(
mute: false, mute: false,
showControls: false, showControls: false,
showFullscreenButton: true, showFullscreenButton: false,
loop: false, loop: false,
showVideoAnnotations: false, showVideoAnnotations: false,
strictRelatedVideos: false, strictRelatedVideos: false,

View File

@ -55,7 +55,8 @@ class EventListItem extends StatelessWidget {
eventAgenda.image != null ? ClipRRect( eventAgenda.image != null ? ClipRRect(
borderRadius: const BorderRadius.only(topLeft: Radius.circular(20.0), topRight: Radius.circular(20.0)), borderRadius: const BorderRadius.only(topLeft: Radius.circular(20.0), topRight: Radius.circular(20.0)),
child: Container( child: Container(
constraints: const BoxConstraints(maxHeight: 175, maxWidth: 250), //color: Colors.green,
//constraints: const BoxConstraints(maxHeight: 175),
child: CachedNetworkImage( child: CachedNetworkImage(
imageUrl: eventAgenda.image!, imageUrl: eventAgenda.image!,
width: size.width, width: size.width,

View File

@ -52,7 +52,7 @@ class _MonthFilterState extends State<MonthFilter> {
title: Text( title: Text(
'$monthName $annee (${nbrEvents})', '$monthName $annee (${nbrEvents})',
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 15.0,
fontWeight: _selectedMonth == monthYear ? FontWeight.bold : FontWeight.normal, fontWeight: _selectedMonth == monthYear ? FontWeight.bold : FontWeight.normal,
color: _selectedMonth == monthYear ? kTestSecondColor : null, color: _selectedMonth == monthYear ? kTestSecondColor : null,
), ),
@ -88,7 +88,7 @@ class _MonthFilterState extends State<MonthFilter> {
title: Text( title: Text(
'${TranslationHelper.getFromLocale("agenda.all", appContext.getContext())} ($totalEvents)', '${TranslationHelper.getFromLocale("agenda.all", appContext.getContext())} ($totalEvents)',
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 15.0,
fontWeight: _selectedMonth == null ? FontWeight.bold : FontWeight.normal, fontWeight: _selectedMonth == null ? FontWeight.bold : FontWeight.normal,
color: _selectedMonth == null ? kTestSecondColor : null, color: _selectedMonth == null ? kTestSecondColor : null,
), ),

View File

@ -6,6 +6,7 @@ import 'package:flutter/widgets.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:tablet_app/Helpers/translationHelper.dart'; import 'package:tablet_app/Helpers/translationHelper.dart';
import 'package:tablet_app/Models/WeatherData.dart'; import 'package:tablet_app/Models/WeatherData.dart';
import 'package:tablet_app/Models/tabletContext.dart';
import 'package:tablet_app/app_context.dart'; import 'package:tablet_app/app_context.dart';
import 'package:tablet_app/constants.dart'; import 'package:tablet_app/constants.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
@ -120,19 +121,19 @@ class WeatherView extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size; Size size = MediaQuery.of(context).size;
final appContext = Provider.of<AppContext>(context); final appContext = Provider.of<AppContext>(context);
TabletAppContext tabletAppContext = appContext.getContext();
return InkWell( return InkWell(
onTap: () { onTap: () {
print(weatherData.list!.first.weather!.first.main); /*print(weatherData.list!.first.weather!.first.main);
print(weatherData.list!.first.weather!.first.description); print(weatherData.list!.first.weather!.first.description);
print(weatherData.list!.first.weather!.first.icon!); print(weatherData.list!.first.weather!.first.icon!);
print(weatherData.list!.first.dtTxt); print(weatherData.list!.first.dtTxt);
print(weatherData.list!.first.dt); print(weatherData.list!.first.dt);*/
String formattedDate = formatTimestamp(weatherData.list!.first.dt!, appContext, false, false); //String formattedDate = formatTimestamp(weatherData.list!.first.dt!, appContext, false, false);
//getNextFiveDaysForecast(weatherData.list!);
getNextFiveDaysForecast(weatherData.list!);
showDialog( showDialog(
context: context, context: context,
@ -194,7 +195,7 @@ class WeatherView extends StatelessWidget {
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child: Center(child: Text(weatherData.city!.name!, style: TextStyle(fontSize: kSectionTitleDetailSize, fontWeight: FontWeight.w500, color: Colors.black54))), child: Center(child: Text(tabletAppContext.configuration!.weatherCity!, style: TextStyle(fontSize: kSectionTitleDetailSize, fontWeight: FontWeight.w500, color: Colors.black54))),
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,

View File

@ -106,7 +106,7 @@ class _GoogleMapViewState extends State<GoogleMapView> {
//print(mapTypeApp.toString()); //print(mapTypeApp.toString());
MapType type = MapType.hybrid; MapType type = MapType.hybrid;
if(kIsWeb) { //if(kIsWeb) {
if(widget.mapDTO!.mapType != null) { if(widget.mapDTO!.mapType != null) {
switch(widget.mapDTO!.mapType!.value) { switch(widget.mapDTO!.mapType!.value) {
case 0: case 0:
@ -126,9 +126,12 @@ class _GoogleMapViewState extends State<GoogleMapView> {
break; break;
} }
} }
} else {
/*} else {
print("is OTHEER");
type = EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString()) != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())! : MapType.hybrid; type = EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString()) != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())! : MapType.hybrid;
} }*/
//MapType type = EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString()) != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())! : MapType.hybrid; //MapType type = EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString()) != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())! : MapType.hybrid;
return Stack( return Stack(
@ -137,6 +140,7 @@ class _GoogleMapViewState extends State<GoogleMapView> {
child: GoogleMap( child: GoogleMap(
mapType: type, // widget.mapDTO!.mapType != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())!: MapType.hybrid, mapType: type, // widget.mapDTO!.mapType != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())!: MapType.hybrid,
mapToolbarEnabled: false, mapToolbarEnabled: false,
indoorViewEnabled: false,
initialCameraPosition: CameraPosition( initialCameraPosition: CameraPosition(
target: LatLng(50.465503, 4.865105), //TODO add element in manager // MDLF 50.416639, 4.879169 / Namur 50.465503, 4.865105 target: LatLng(50.465503, 4.865105), //TODO add element in manager // MDLF 50.416639, 4.879169 / Namur 50.465503, 4.865105
zoom: widget.mapDTO!.zoom != null ? widget.mapDTO!.zoom!.toDouble() : 18, zoom: widget.mapDTO!.zoom != null ? widget.mapDTO!.zoom!.toDouble() : 18,