From 79fd9b2a27e9c0789b500114fcd74cdb6d3a1756 Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Fri, 5 Mar 2021 08:31:40 +0100 Subject: [PATCH] Small demo changes --- lib/Components/MainView/main_view.dart | 23 +++++++++++++++-------- lib/Components/Map/map_view.dart | 12 ++++++++++-- lib/Components/Map/marker_view.dart | 5 ++++- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/lib/Components/MainView/main_view.dart b/lib/Components/MainView/main_view.dart index 0732592..c87228e 100644 --- a/lib/Components/MainView/main_view.dart +++ b/lib/Components/MainView/main_view.dart @@ -50,7 +50,10 @@ class _MainViewWidget extends State { elementToShow = WebViewWidget(url: 'Test'); break; case 2 : - elementToShow = Text('Hellow in'); + elementToShow = Padding( + padding: const EdgeInsets.all(15.0), + child: Text('Hellow in') + ); break; default: elementToShow = Text('Hellow default'); @@ -61,7 +64,7 @@ class _MainViewWidget extends State { children: [ Container( width: size.width, - height: size.height * 0.10, + height: size.height * 0.12, child: Row( children: [ Padding( @@ -81,13 +84,17 @@ class _MainViewWidget extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Align( + Expanded( + child: Align( 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, - 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 { padding: const EdgeInsets.only(left: 15.0, right: 15.0, top: 15.0), child: Container( width: size.width, - height: size.height * 0.87, + height: size.height * 0.85, decoration: BoxDecoration( color: kBackgroundLight, shape: BoxShape.rectangle, @@ -113,7 +120,7 @@ class _MainViewWidget extends State { ], ), child: Padding( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.all(0.0), child: elementToShow), ), ) diff --git a/lib/Components/Map/map_view.dart b/lib/Components/Map/map_view.dart index e9e22d5..c9297e9 100644 --- a/lib/Components/Map/map_view.dart +++ b/lib/Components/Map/map_view.dart @@ -72,6 +72,14 @@ class _MapViewWidget extends State { latitude: "36.7456", 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) { if (element.latitude != null && element.longitude != null) { @@ -117,8 +125,8 @@ class _MapViewWidget extends State { } static final CameraPosition _kGooglePlex = CameraPosition( - target: LatLng(50.4167344, 4.879165), - zoom: 0.4746, + target: LatLng(50.416639, 4.879169), + zoom: 25.55, ); /*static final CameraPosition _kLake = CameraPosition( diff --git a/lib/Components/Map/marker_view.dart b/lib/Components/Map/marker_view.dart index 5a93603..a7aca9c 100644 --- a/lib/Components/Map/marker_view.dart +++ b/lib/Components/Map/marker_view.dart @@ -85,7 +85,10 @@ class _MarkerInfoWidget extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ 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)), Column( crossAxisAlignment: CrossAxisAlignment.center,