mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 00:21:19 +00:00
Setup last things + enum fix + layout + readme
This commit is contained in:
parent
e728bdd315
commit
6266f79500
19
README.md
19
README.md
@ -14,3 +14,22 @@ A few resources to get you started if this is your first Flutter project:
|
||||
For help getting started with Flutter, view our
|
||||
[online documentation](https://flutter.dev/docs), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
|
||||
# OPENAPI Generation cmd
|
||||
|
||||
flutter pub run build_runner build --delete-conflicting-outputs
|
||||
|
||||
Le fichier est dans le projet.
|
||||
|
||||
# Publication sur docker - WEB DEMO
|
||||
|
||||
docker build -t demo-manager .
|
||||
|
||||
Pour tester en local :
|
||||
docker run -d -p 8080:80 –name demo-manager demo-manager
|
||||
|
||||
Image tag:
|
||||
docker image tag demo-manager registry.unov.be/mymuseum/demo:latest
|
||||
|
||||
Docker push:
|
||||
docker image push registry.unov.be/mymuseum/demo:latest
|
||||
@ -120,21 +120,22 @@ class _MainViewWidget extends State<MainViewWidget> {
|
||||
alignment: Alignment.centerLeft,
|
||||
child: AutoSizeText(
|
||||
sectionSelected!.title!.firstWhere((translation) => translation.language == appContext.getContext().language).value!,
|
||||
style: new TextStyle(fontSize: kSectionTitleDetailSize),
|
||||
style: new TextStyle(fontSize: kIsWeb ? kWebSectionTitleDetailSize : kSectionTitleDetailSize),
|
||||
maxLines: 1,
|
||||
),
|
||||
)
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: AutoSizeText(
|
||||
sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!,
|
||||
style: new TextStyle(fontSize: kIsWeb? kWebSectionDescriptionDetailSize : kSectionDescriptionDetailSize),
|
||||
maxLines: 2,
|
||||
),
|
||||
if(sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null && sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!.trim().isNotEmpty)
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: AutoSizeText(
|
||||
sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!,
|
||||
style: new TextStyle(fontSize: kIsWeb? kWebSectionDescriptionDetailSize : kSectionDescriptionDetailSize),
|
||||
maxLines: 2,
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
@ -306,7 +307,7 @@ boxDecoration(SectionDTO section, bool isSelected) {
|
||||
borderRadius: BorderRadius.circular(30.0),
|
||||
image: section.imageSource != null ? new DecorationImage(
|
||||
fit: !isSelected || kIsWeb ? BoxFit.cover : BoxFit.contain,
|
||||
colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(0.3), BlendMode.dstATop) : null,
|
||||
colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(kIsWeb ? 0.3 : 0.5), BlendMode.dstATop) : null,
|
||||
image: new NetworkImage(
|
||||
section.imageSource!,
|
||||
),
|
||||
|
||||
@ -96,31 +96,33 @@ class _GoogleMapViewState extends State<GoogleMapView> {
|
||||
//print(mapTypeApp.toString());
|
||||
|
||||
MapType type = MapType.hybrid;
|
||||
if(widget.mapDTO!.mapType != null) {
|
||||
switch(widget.mapDTO!.mapType!.value) {
|
||||
case 0:
|
||||
type = MapType.none;
|
||||
break;
|
||||
case 1:
|
||||
type = MapType.normal;
|
||||
break;
|
||||
case 2:
|
||||
type = MapType.satellite;
|
||||
break;
|
||||
case 3:
|
||||
type = MapType.terrain;
|
||||
break;
|
||||
case 4:
|
||||
type = MapType.hybrid;
|
||||
break;
|
||||
if(kIsWeb) {
|
||||
if(widget.mapDTO!.mapType != null) {
|
||||
switch(widget.mapDTO!.mapType!.value) {
|
||||
case 0:
|
||||
type = MapType.none;
|
||||
break;
|
||||
case 1:
|
||||
type = MapType.normal;
|
||||
break;
|
||||
case 2:
|
||||
type = MapType.satellite;
|
||||
break;
|
||||
case 3:
|
||||
type = MapType.terrain;
|
||||
break;
|
||||
case 4:
|
||||
type = MapType.hybrid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
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 GoogleMap(
|
||||
mapType: type,
|
||||
mapType: type, // widget.mapDTO!.mapType != null ? EnumToString.fromString(MapType.values, widget.mapDTO!.mapType.toString())!: MapType.hybrid,
|
||||
mapToolbarEnabled: false,
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: LatLng(50.465503, 4.865105), // MDLF 50.416639, 4.879169 / Namur 50.465503, 4.865105
|
||||
|
||||
@ -104,7 +104,7 @@ class _MenuViewWidget extends State<MenuViewWidget> {
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20, right: 20),
|
||||
padding: const EdgeInsets.only(bottom: kIsWeb ? 5: 20, right: kIsWeb ? 5: 20),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: InkWell(
|
||||
@ -156,11 +156,11 @@ class _MenuViewWidget extends State<MenuViewWidget> {
|
||||
child: Container(
|
||||
decoration: boxDecoration(menuDTO.sections![index], false),
|
||||
padding: const EdgeInsets.all(25),
|
||||
margin: EdgeInsets.symmetric(vertical: 25, horizontal: 25),
|
||||
margin: EdgeInsets.symmetric(vertical: kIsWeb ? 15 : 25, horizontal: kIsWeb ? 15 : 25),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: FractionallySizedBox(
|
||||
heightFactor: 0.4,
|
||||
heightFactor: kIsWeb ? 0.3 : 0.4,
|
||||
child: Column(
|
||||
children: [
|
||||
Align(
|
||||
@ -198,8 +198,8 @@ boxDecoration(SectionDTO section, bool isSelected) {
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(30.0),
|
||||
image: section.imageSource != null ? new DecorationImage(
|
||||
fit: BoxFit.contain,
|
||||
colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(0.5), BlendMode.dstATop) : null,
|
||||
fit: kIsWeb ? BoxFit.cover : BoxFit.contain,
|
||||
colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(kIsWeb ? 0.3 : 0.5), BlendMode.dstATop) : null,
|
||||
image: new NetworkImage(
|
||||
section.imageSource!,
|
||||
),
|
||||
|
||||
@ -77,9 +77,9 @@ class SectionTypeTypeTransformer {
|
||||
/// and users are still using an old app with the old code.
|
||||
SectionType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
print("data.toString()");
|
||||
/*print("data.toString()");
|
||||
print(data.toString());
|
||||
print(data.runtimeType);
|
||||
print(data.runtimeType);*/
|
||||
if(data.runtimeType == String) {
|
||||
switch (data.toString()) {
|
||||
case r'Map': return SectionType.map;
|
||||
@ -96,7 +96,7 @@ class SectionTypeTypeTransformer {
|
||||
}
|
||||
} else {
|
||||
if(data.runtimeType == int) {
|
||||
print("HELLOWWWWW INT");
|
||||
//print("HELLOWWWWW INT");
|
||||
switch (data) {
|
||||
case 0:
|
||||
print("RETURN MAP");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user