Small demo changes

This commit is contained in:
Thomas Fransolet 2021-03-05 08:31:40 +01:00
parent 16ac760b96
commit 79fd9b2a27
3 changed files with 29 additions and 11 deletions

View File

@ -50,7 +50,10 @@ class _MainViewWidget extends State<MainViewWidget> {
elementToShow = WebViewWidget(url: 'Test'); elementToShow = WebViewWidget(url: 'Test');
break; break;
case 2 : case 2 :
elementToShow = Text('Hellow in'); elementToShow = Padding(
padding: const EdgeInsets.all(15.0),
child: Text('Hellow in')
);
break; break;
default: default:
elementToShow = Text('Hellow default'); elementToShow = Text('Hellow default');
@ -61,7 +64,7 @@ class _MainViewWidget extends State<MainViewWidget> {
children: [ children: [
Container( Container(
width: size.width, width: size.width,
height: size.height * 0.10, height: size.height * 0.12,
child: Row( child: Row(
children: [ children: [
Padding( Padding(
@ -81,13 +84,17 @@ class _MainViewWidget extends State<MainViewWidget> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Align( Expanded(
child: Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text(sectionSelected.title, style: new TextStyle(fontSize: 50)) child: Text(sectionSelected.title, style: new TextStyle(fontSize: 40))
)
), ),
Align( Expanded(
child: Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text(sectionSelected.description, style: new TextStyle(fontSize: 35))) child: Text(sectionSelected.description, style: new TextStyle(fontSize: 30)))
)
], ],
), ),
) )
@ -98,7 +105,7 @@ class _MainViewWidget extends State<MainViewWidget> {
padding: const EdgeInsets.only(left: 15.0, right: 15.0, top: 15.0), padding: const EdgeInsets.only(left: 15.0, right: 15.0, top: 15.0),
child: Container( child: Container(
width: size.width, width: size.width,
height: size.height * 0.87, height: size.height * 0.85,
decoration: BoxDecoration( decoration: BoxDecoration(
color: kBackgroundLight, color: kBackgroundLight,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
@ -113,7 +120,7 @@ class _MainViewWidget extends State<MainViewWidget> {
], ],
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(0.0),
child: elementToShow), child: elementToShow),
), ),
) )

View File

@ -72,6 +72,14 @@ class _MapViewWidget extends State<MapViewWidget> {
latitude: "36.7456", latitude: "36.7456",
longitude: "3.0698" longitude: "3.0698"
)); ));
markersList.add(MapMarker(
id: 4,
title: "Musée de la fraise",
description: "Musée de la fraise wépion",
image: "https://www.airfrance.co.uk/GB/common/common/img/tbaf/news/ALG/la-mosquee-ketchaoua-l-histoire-avec-un-grand-h/ALG-la-mosquee-ketchaoua-l-histoire-avec-un-grand-h-2_1-1024x512.jpg",
latitude: "50.416639",
longitude: "4.879169"
));
markersList.forEach((element) { markersList.forEach((element) {
if (element.latitude != null && element.longitude != null) { if (element.latitude != null && element.longitude != null) {
@ -117,8 +125,8 @@ class _MapViewWidget extends State<MapViewWidget> {
} }
static final CameraPosition _kGooglePlex = CameraPosition( static final CameraPosition _kGooglePlex = CameraPosition(
target: LatLng(50.4167344, 4.879165), target: LatLng(50.416639, 4.879169),
zoom: 0.4746, zoom: 25.55,
); );
/*static final CameraPosition _kLake = CameraPosition( /*static final CameraPosition _kLake = CameraPosition(

View File

@ -85,7 +85,10 @@ class _MarkerInfoWidget extends State<MarkerViewWidget> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
Text(mapContext.getSelectedMarker().title, style: TextStyle(fontSize: 15)), Text(mapContext.getSelectedMarker().title, style: TextStyle(fontSize: 15)),
Text(mapContext.getSelectedMarker().description, style: TextStyle(fontSize: 15)), Padding(
padding: const EdgeInsets.all(15.0),
child: Text(mapContext.getSelectedMarker().description, style: TextStyle(fontSize: 15)),
),
Text(mapContext.getSelectedMarker().text, style: TextStyle(fontSize: 15)), Text(mapContext.getSelectedMarker().text, style: TextStyle(fontSize: 15)),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,