mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 08:31:19 +00:00
switch view map + web
This commit is contained in:
parent
9e457b5d02
commit
16ac760b96
@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:tablet_app/Components/Map/map_context.dart';
|
import 'package:tablet_app/Components/Map/map_context.dart';
|
||||||
import 'package:tablet_app/Components/Map/map_view.dart';
|
import 'package:tablet_app/Components/Map/map_view.dart';
|
||||||
|
import 'package:tablet_app/Components/webView.dart';
|
||||||
import 'package:tablet_app/Models/map-marker.dart';
|
import 'package:tablet_app/Models/map-marker.dart';
|
||||||
import 'package:tablet_app/Models/section.dart';
|
import 'package:tablet_app/Models/section.dart';
|
||||||
import 'package:tablet_app/constants.dart';
|
import 'package:tablet_app/constants.dart';
|
||||||
@ -46,8 +47,13 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 1 : // WEB
|
case 1 : // WEB
|
||||||
|
elementToShow = WebViewWidget(url: 'Test');
|
||||||
break;
|
break;
|
||||||
case 0 :
|
case 2 :
|
||||||
|
elementToShow = Text('Hellow in');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
elementToShow = Text('Hellow default');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -55,14 +61,14 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: size.width,
|
width: size.width,
|
||||||
height: size.height * 0.15,
|
height: size.height * 0.10,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 15.0, top: 10.0),
|
padding: const EdgeInsets.only(left: 15.0, top: 10.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 150,
|
width: 125,
|
||||||
height: 150,
|
height: 125,
|
||||||
decoration: boxDecoration(sectionSelected),
|
decoration: boxDecoration(sectionSelected),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -77,11 +83,11 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(sectionSelected.title, style: new TextStyle(fontSize: 35))
|
child: Text(sectionSelected.title, style: new TextStyle(fontSize: 50))
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(sectionSelected.description, style: new TextStyle(fontSize: 25)))
|
child: Text(sectionSelected.description, style: new TextStyle(fontSize: 35)))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -89,10 +95,10 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 15.0, right: 15.0, top: 10.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.822,
|
height: size.height * 0.87,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: kBackgroundLight,
|
color: kBackgroundLight,
|
||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
@ -106,14 +112,17 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: elementToShow),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
|
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
||||||
floatingActionButton: Container(
|
floatingActionButton: Container(
|
||||||
height: 125.0,
|
height: 130.0,
|
||||||
width: 125.0,
|
width: 130.0,
|
||||||
child: FittedBox(
|
child: FittedBox(
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@ -122,7 +131,7 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
icon: Icon(Icons.arrow_back),
|
icon: Icon(Icons.arrow_back),
|
||||||
label: Text("Menu"),
|
label: Text("Menu")
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -204,7 +213,7 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
return [
|
return [
|
||||||
new Section(id: 0, title: "TEST Map", description: "Ceci est l'essai d'une carte", image: "https://www.novo-monde.com/app/uploads/2017/11/novo-map-banner-3.jpg", category: 0),
|
new Section(id: 0, title: "TEST Map", description: "Ceci est l'essai d'une carte", image: "https://www.novo-monde.com/app/uploads/2017/11/novo-map-banner-3.jpg", category: 0),
|
||||||
new Section(id: 0, title: "TEST Site web", description: "Ceci est l'essai d'un site web", image: "https://static.wixstatic.com/media/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.jpg/v1/fill/w_892,h_564,al_c,q_85,usm_0.66_1.00_0.01/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.webp", category: 1),
|
new Section(id: 0, title: "TEST Site web", description: "Ceci est l'essai d'un site web", image: "https://static.wixstatic.com/media/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.jpg/v1/fill/w_892,h_564,al_c,q_85,usm_0.66_1.00_0.01/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.webp", category: 1),
|
||||||
new Section(id: 0, title: "TEST 2", description: "fsfsdf", image: "https://static.wixstatic.com/media/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.jpg/v1/fill/w_892,h_564,al_c,q_85,usm_0.66_1.00_0.01/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.webp", category: 0),
|
new Section(id: 0, title: "TEST 2", description: "fsfsdf", image: "https://static.wixstatic.com/media/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.jpg/v1/fill/w_892,h_564,al_c,q_85,usm_0.66_1.00_0.01/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.webp", category: 2),
|
||||||
new Section(id: 0, title: "TEST 3", description: "fsfsdf", image: "https://static.wixstatic.com/media/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.jpg/v1/fill/w_892,h_564,al_c,q_85,usm_0.66_1.00_0.01/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.webp", category: 0),
|
new Section(id: 0, title: "TEST 3", description: "fsfsdf", image: "https://static.wixstatic.com/media/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.jpg/v1/fill/w_892,h_564,al_c,q_85,usm_0.66_1.00_0.01/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.webp", category: 0),
|
||||||
new Section(id: 0, title: "TEST 4", description: "fsfsdf", image: "https://static.wixstatic.com/media/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.jpg/v1/fill/w_892,h_564,al_c,q_85,usm_0.66_1.00_0.01/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.webp", category: 0),
|
new Section(id: 0, title: "TEST 4", description: "fsfsdf", image: "https://static.wixstatic.com/media/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.jpg/v1/fill/w_892,h_564,al_c,q_85,usm_0.66_1.00_0.01/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.webp", category: 0),
|
||||||
new Section(id: 0, title: "TEST 5", description: "fsfsdf", image: "https://static.wixstatic.com/media/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.jpg/v1/fill/w_892,h_564,al_c,q_85,usm_0.66_1.00_0.01/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.webp", category: 0),
|
new Section(id: 0, title: "TEST 5", description: "fsfsdf", image: "https://static.wixstatic.com/media/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.jpg/v1/fill/w_892,h_564,al_c,q_85,usm_0.66_1.00_0.01/38e2f4_4c1714f38942446e99c1e736726e4465~mv2.webp", category: 0),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user