Commit before anti gravity ! :)

This commit is contained in:
Thomas Fransolet 2026-02-27 13:52:54 +01:00
parent d212f9f31c
commit 9e06afb29e
20 changed files with 67 additions and 38 deletions

View File

@ -15,7 +15,7 @@ class CheckInputContainer extends StatefulWidget {
this.icon,
required this.label,
required this.onChanged,
this.fontSize = 20
this.fontSize = 18
}) : super(key: key);
@override
@ -51,12 +51,9 @@ class _CheckInputContainerState extends State<CheckInputContainer> {
size: 25.0,
),
),
AutoSizeText(
Text(
widget.label,
style: new TextStyle(fontSize: widget.fontSize, fontWeight: FontWeight.w300),
maxLines: 2,
maxFontSize: widget.fontSize,
textAlign: TextAlign.center,
style: new TextStyle(fontSize: widget.fontSize, fontWeight: FontWeight.w300)
),
],
)

View File

@ -6,6 +6,7 @@ class DropDownInputContainer extends StatefulWidget {
final List<String> values;
final String? initialValue;
final ValueChanged<String>? onChange;
final double fontSize;
const DropDownInputContainer({
Key? key,
@ -13,6 +14,7 @@ class DropDownInputContainer extends StatefulWidget {
required this.values,
this.initialValue,
this.onChange,
this.fontSize = 18,
}) : super(key: key);
@override
@ -36,7 +38,7 @@ class _DropDownInputContainerState extends State<DropDownInputContainer> {
alignment: AlignmentDirectional.centerStart,
child: Text(
widget.label,
style: TextStyle(fontSize: 25, fontWeight: FontWeight.w300),
style: TextStyle(fontSize: widget.fontSize, fontWeight: FontWeight.w300),
),
),
Padding(

View File

@ -22,7 +22,7 @@ class GeolocInputContainer extends StatefulWidget {
required this.initialValue,
required this.onChanged,
this.isSmall = false,
this.fontSize = 25,
this.fontSize = 18,
this.fontSizeText = 20,
}) : super(key: key);
@ -43,12 +43,9 @@ class _GeolocInputContainerState extends State<GeolocInputContainer> {
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: AutoSizeText(
child: Text(
widget.label,
style: TextStyle(fontSize: widget.fontSize, fontWeight: FontWeight.w300),
maxLines: 2,
maxFontSize: widget.fontSize,
textAlign: TextAlign.center,
),
),
Padding(

View File

@ -50,9 +50,9 @@ class MultiStringInputContainer extends StatelessWidget {
alignment: AlignmentDirectional.centerStart,
child: Text(
label,
style: const TextStyle(
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 16,
fontSize: fontSize,
),
),
),

View File

@ -22,7 +22,7 @@ class NumberInputContainer extends StatelessWidget {
this.isUrl = false,
this.isSmall = false,
this.maxLength = 50,
this.fontSize = 25,
this.fontSize = 18.0,
this.fontSizeText = 20,
}) : super(key: key);
@ -34,12 +34,9 @@ class NumberInputContainer extends StatelessWidget {
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: AutoSizeText(
child: Text(
label,
style: TextStyle(fontSize: fontSize, fontWeight: FontWeight.w300),
maxLines: 2,
maxFontSize: fontSize,
textAlign: TextAlign.center,
),
),
Padding(

View File

@ -11,12 +11,14 @@ class PDFFileInputContainer extends StatefulWidget {
final String label;
List<OrderedTranslationAndResourceDTO> initialValue;
final ValueChanged<List<OrderedTranslationAndResourceDTO>> onChanged;
final double fontSize;
PDFFileInputContainer({
Key? key,
this.color = kSecond,
required this.label,
required this.initialValue,
required this.onChanged,
this.fontSize = 18.0,
}) : super(key: key);
@override
@ -39,12 +41,12 @@ class _PDFFileInputContainerState extends State<PDFFileInputContainer> {
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: Text(widget.label, style: TextStyle(fontSize: 25, fontWeight: FontWeight.w300))
child: Text(widget.label, style: TextStyle(fontSize: widget.fontSize, fontWeight: FontWeight.w300))
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: size.width *0.15,
width: size.width *0.16,
child: InkWell(
onTap: () {
List<OrderedTranslationAndResourceDTO> newValues = <OrderedTranslationAndResourceDTO>[];

View File

@ -58,9 +58,9 @@ class _ResourceInputContainerState extends State<ResourceInputContainer> {
alignment: AlignmentDirectional.centerStart,
child: Text(
widget.label,
style: const TextStyle(
style: TextStyle(
fontWeight: FontWeight.w400,
fontSize: 16,
fontSize: widget.fontSize,
),
),
),

View File

@ -17,7 +17,7 @@ class SingleSelectContainer extends StatefulWidget {
this.initialValue = "",
required this.inputValues,
this.onChanged,
this.fontSize = 25,
this.fontSize = 18,
this.fontSizeText = 20,
}) : super(key: key);
@ -43,12 +43,9 @@ class _SingleSelectContainerState extends State<SingleSelectContainer> {
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: AutoSizeText(
child: Text(
widget.label,
style: TextStyle(fontSize: widget.fontSize, fontWeight: FontWeight.w300),
maxLines: 2,
maxFontSize: widget.fontSize,
textAlign: TextAlign.center,
),
),
Padding(

View File

@ -8,6 +8,7 @@ class SliderInputContainer extends StatefulWidget {
final int min;
final int max;
final ValueChanged<double> onChanged;
final double fontSize;
const SliderInputContainer({
Key? key,
this.color = kSecond,
@ -16,6 +17,7 @@ class SliderInputContainer extends StatefulWidget {
required this.min,
required this.max,
required this.onChanged,
this.fontSize = 18.0,
}) : super(key: key);
@override
@ -38,7 +40,7 @@ class _SliderInputContainerState extends State<SliderInputContainer> {
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: Text(widget.label, style: TextStyle(fontSize: 25, fontWeight: FontWeight.w300))
child: Text(widget.label, style: TextStyle(fontSize: widget.fontSize, fontWeight: FontWeight.w300))
),
Padding(
padding: const EdgeInsets.all(10.0),

View File

@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/check_input_container.dart';
import 'package:manager_app/Components/multi_string_input_container.dart';
import 'package:manager_app/Components/resource_input_container.dart';
import 'package:manager_api_new/api.dart';
@ -60,6 +61,16 @@ class _AgendaConfigState extends State<AgendaConfig> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
CheckInputContainer(
label: "En ligne :",
isChecked: agendaDTO.isOnlineAgenda!,
onChanged: (value) {
setState(() {
agendaDTO.isOnlineAgenda = value;
widget.onChanged(agendaDTO);
});
},
),
SingleSelectContainer(
label: "Service carte :",
color: Colors.black,

View File

@ -10,12 +10,14 @@ class CategoryInputContainer extends StatefulWidget {
final String label;
List<CategorieDTO> initialValue;
final ValueChanged<List<CategorieDTO>> onChanged;
final double fontSize;
CategoryInputContainer({
Key? key,
this.color = kSecond,
required this.label,
required this.initialValue,
required this.onChanged,
this.fontSize = 18,
}) : super(key: key);
@override
@ -40,7 +42,7 @@ class _CategoryInputContainerState extends State<CategoryInputContainer> {
children: [
Align(
alignment: AlignmentDirectional.centerStart,
child: Text(widget.label, style: TextStyle(fontSize: 25, fontWeight: FontWeight.w300))
child: Text(widget.label, style: TextStyle(fontSize: widget.fontSize, fontWeight: FontWeight.w300))
),
Padding(
padding: const EdgeInsets.all(8.0),

View File

@ -131,9 +131,10 @@ class _MapConfigState extends State<MapConfig> {
child: Column(
children: [
Container(
height: size.height * 0.3,
height: size.height * 0.25,
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,

View File

@ -108,7 +108,7 @@ class _MenuConfigState extends State<MenuConfig> {
} else {
if (snapshot.connectionState == ConnectionState.done) {
var rawList = snapshot.data;
rawSubsections = jsonDecode(jsonEncode(snapshot.data));
rawSubsections = snapshot.data != null ? jsonDecode(jsonEncode(snapshot.data)) : [];
rawSubsections = rawSubsections.map((json) => SectionDTO.fromJson(json)).toList();
List<SectionDTO> sectionList = rawSubsections.whereType<SectionDTO>().toList();
@ -166,6 +166,7 @@ class _MenuConfigState extends State<MenuConfig> {
{
newSubsection.instanceId = (appContext.getContext() as ManagerAppContext).instanceId;
newSubsection.isBeacon = false;
newSubsection.isActive = true;
await (appContext.getContext() as ManagerAppContext).clientAPI!.sectionApi!.sectionCreate(newSubsection);
showNotification(kSuccess, kWhite, 'La sous section a été créée avec succès', context, null);
setState(() {

View File

@ -39,7 +39,7 @@ class _PDFConfigState extends State<PDFConfig> {
return Center(
child: Container(
height: 70,
width: 425,
width: 440,
child: PDFFileInputContainer(
label: "Fichiers PDF :",
initialValue: pdfDTO.pdfs != null ? pdfDTO.pdfs! : [],

View File

@ -214,7 +214,6 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
CheckInputContainer(
label: "Beacon :",
isChecked: sectionDTO.isBeacon!,
fontSize: 25,
onChanged: (value) {
setState(() {
sectionDTO.isBeacon = value;

View File

@ -1,4 +1,4 @@
// Openapi Generator last run: : 2025-11-27T16:46:46.408321
// Openapi Generator last run: : 2026-02-27T13:23:36.794687
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
@Openapi(

View File

@ -4,7 +4,7 @@
"info": {
"title": "Manager Service",
"description": "API Manager Service",
"version": "Version Alpha 0.0"
"version": "Version Alpha"
},
"servers": [
{
@ -8275,6 +8275,9 @@
"type": "object",
"additionalProperties": false,
"properties": {
"isOnlineAgenda": {
"type": "boolean"
},
"resourceIds": {
"type": "array",
"nullable": true,

View File

@ -3,7 +3,7 @@ API Manager Service
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: Version Alpha 0.0
- API version: Version Alpha
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen

View File

@ -27,6 +27,7 @@ Name | Type | Description | Notes
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**isOnlineAgenda** | **bool** | | [optional]
**resourceIds** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**agendaMapProvider** | [**AgendaDTOAllOfAgendaMapProvider**](AgendaDTOAllOfAgendaMapProvider.md) | | [optional]
**events** | [**List<EventAgendaDTO>**](EventAgendaDTO.md) | | [optional] [default to const []]

View File

@ -32,6 +32,7 @@ class AgendaDTO {
this.meterZoneGPS,
this.isBeacon,
this.beaconId,
this.isOnlineAgenda,
this.resourceIds = const [],
this.agendaMapProvider,
this.events = const [],
@ -99,6 +100,14 @@ class AgendaDTO {
int? beaconId;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isOnlineAgenda;
List<TranslationDTO>? resourceIds;
MapProvider? agendaMapProvider;
@ -128,6 +137,7 @@ class AgendaDTO {
other.meterZoneGPS == meterZoneGPS &&
other.isBeacon == isBeacon &&
other.beaconId == beaconId &&
other.isOnlineAgenda == isOnlineAgenda &&
_deepEquality.equals(other.resourceIds, resourceIds) &&
other.agendaMapProvider == agendaMapProvider &&
_deepEquality.equals(other.events, events);
@ -154,13 +164,14 @@ class AgendaDTO {
(meterZoneGPS == null ? 0 : meterZoneGPS!.hashCode) +
(isBeacon == null ? 0 : isBeacon!.hashCode) +
(beaconId == null ? 0 : beaconId!.hashCode) +
(isOnlineAgenda == null ? 0 : isOnlineAgenda!.hashCode) +
(resourceIds == null ? 0 : resourceIds!.hashCode) +
(agendaMapProvider == null ? 0 : agendaMapProvider!.hashCode) +
(events == null ? 0 : events!.hashCode);
@override
String toString() =>
'AgendaDTO[id=$id, label=$label, title=$title, description=$description, isActive=$isActive, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, resourceIds=$resourceIds, agendaMapProvider=$agendaMapProvider, events=$events]';
'AgendaDTO[id=$id, label=$label, title=$title, description=$description, isActive=$isActive, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId, isOnlineAgenda=$isOnlineAgenda, resourceIds=$resourceIds, agendaMapProvider=$agendaMapProvider, events=$events]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -259,6 +270,11 @@ class AgendaDTO {
} else {
json[r'beaconId'] = null;
}
if (this.isOnlineAgenda != null) {
json[r'isOnlineAgenda'] = this.isOnlineAgenda;
} else {
json[r'isOnlineAgenda'] = null;
}
if (this.resourceIds != null) {
json[r'resourceIds'] = this.resourceIds;
} else {
@ -317,6 +333,7 @@ class AgendaDTO {
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
beaconId: mapValueOfType<int>(json, r'beaconId'),
isOnlineAgenda: mapValueOfType<bool>(json, r'isOnlineAgenda'),
resourceIds: TranslationDTO.listFromJson(json[r'resourceIds']),
agendaMapProvider: MapProvider.fromJson(json[r'agendaMapProvider']),
events: EventAgendaDTO.listFromJson(json[r'events']),