Fix Menu + misc
This commit is contained in:
parent
c7396012b3
commit
d47dc15688
@ -9,6 +9,28 @@ import 'package:quill_html_editor/quill_html_editor.dart';
|
|||||||
|
|
||||||
import 'flag_decoration.dart';
|
import 'flag_decoration.dart';
|
||||||
|
|
||||||
|
class TranslationInputAndResourceContainer extends StatefulWidget {
|
||||||
|
TranslationInputAndResourceContainer({
|
||||||
|
Key? key,
|
||||||
|
required this.isTitle,
|
||||||
|
required this.values,
|
||||||
|
required this.newValues,
|
||||||
|
required this.onGetResult,
|
||||||
|
required this.maxLines,
|
||||||
|
required this.resourceTypes,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
bool isTitle;
|
||||||
|
List<TranslationAndResourceDTO> values;
|
||||||
|
List<TranslationAndResourceDTO> newValues;
|
||||||
|
Function onGetResult;
|
||||||
|
int maxLines;
|
||||||
|
List<ResourceType>? resourceTypes;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<TranslationInputAndResourceContainer> createState() => _TranslationInputAndResourceContainerState();
|
||||||
|
}
|
||||||
|
|
||||||
class _TranslationInputAndResourceContainerState extends State<TranslationInputAndResourceContainer> with TickerProviderStateMixin {
|
class _TranslationInputAndResourceContainerState extends State<TranslationInputAndResourceContainer> with TickerProviderStateMixin {
|
||||||
TabController? _tabController;
|
TabController? _tabController;
|
||||||
QuillEditorController controllerQuill = QuillEditorController();
|
QuillEditorController controllerQuill = QuillEditorController();
|
||||||
@ -228,25 +250,3 @@ class _TranslationInputAndResourceContainerState extends State<TranslationInputA
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TranslationInputAndResourceContainer extends StatefulWidget {
|
|
||||||
TranslationInputAndResourceContainer({
|
|
||||||
Key? key,
|
|
||||||
required this.isTitle,
|
|
||||||
required this.values,
|
|
||||||
required this.newValues,
|
|
||||||
required this.onGetResult,
|
|
||||||
required this.maxLines,
|
|
||||||
required this.resourceTypes,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
bool isTitle;
|
|
||||||
List<TranslationAndResourceDTO> values;
|
|
||||||
List<TranslationAndResourceDTO> newValues;
|
|
||||||
Function onGetResult;
|
|
||||||
int maxLines;
|
|
||||||
List<ResourceType>? resourceTypes;
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<TranslationInputAndResourceContainer> createState() => _TranslationInputAndResourceContainerState();
|
|
||||||
}
|
|
||||||
|
|||||||
@ -119,7 +119,7 @@ class _MenuConfigState extends State<MenuConfig> {
|
|||||||
List<SectionDTO> sectionList = rawSubsections.whereType<SectionDTO>().toList();
|
List<SectionDTO> sectionList = rawSubsections.whereType<SectionDTO>().toList();
|
||||||
|
|
||||||
menuDTO.sections = sectionList;
|
menuDTO.sections = sectionList;
|
||||||
menuDTO.sections!.sort((a, b) => a.order!.compareTo(b.order!));
|
//menuDTO.sections!.sort((a, b) => a.order!.compareTo(b.order!));
|
||||||
|
|
||||||
return ReorderableListView(
|
return ReorderableListView(
|
||||||
onReorder: _onReorder,
|
onReorder: _onReorder,
|
||||||
|
|||||||
@ -75,7 +75,7 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
|
|||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
initialValue: puzzleDTO.messageDebut != null ? puzzleDTO.messageDebut! : [],
|
initialValue: puzzleDTO.messageDebut != null ? puzzleDTO.messageDebut! : [],
|
||||||
resourceTypes: [ResourceType.Image, ResourceType.ImageUrl],
|
resourceTypes: [ResourceType.Image, ResourceType.ImageUrl, ResourceType.VideoUrl, ResourceType.Video, ResourceType.Audio],
|
||||||
onGetResult: (value) {
|
onGetResult: (value) {
|
||||||
if (puzzleDTO.messageDebut != value) {
|
if (puzzleDTO.messageDebut != value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -96,7 +96,7 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
|
|||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
initialValue: puzzleDTO.messageFin != null ? puzzleDTO.messageFin! : [],
|
initialValue: puzzleDTO.messageFin != null ? puzzleDTO.messageFin! : [],
|
||||||
resourceTypes: [ResourceType.Image, ResourceType.ImageUrl],
|
resourceTypes: [ResourceType.Image, ResourceType.ImageUrl, ResourceType.VideoUrl, ResourceType.Video, ResourceType.Audio],
|
||||||
onGetResult: (value) {
|
onGetResult: (value) {
|
||||||
if (puzzleDTO.messageFin != value) {
|
if (puzzleDTO.messageFin != value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@ -198,7 +198,7 @@ boxDecoration(dynamic resourceDetailDTO, appContext) {
|
|||||||
borderRadius: BorderRadius.circular(30.0),
|
borderRadius: BorderRadius.circular(30.0),
|
||||||
image: resourceDetailDTO.id != null && (resourceDetailDTO.type == ResourceType.Image || resourceDetailDTO.type == ResourceType.ImageUrl) && resourceDetailDTO.url != null ? new DecorationImage(
|
image: resourceDetailDTO.id != null && (resourceDetailDTO.type == ResourceType.Image || resourceDetailDTO.type == ResourceType.ImageUrl) && resourceDetailDTO.url != null ? new DecorationImage(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
colorFilter: new ColorFilter.mode(Colors.black.withOpacity(0.3), BlendMode.dstATop),
|
colorFilter: new ColorFilter.mode(Colors.black.withValues(alpha: 0.3), BlendMode.dstATop),
|
||||||
image: new NetworkImage(
|
image: new NetworkImage(
|
||||||
resourceDetailDTO.url!,
|
resourceDetailDTO.url!,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// Openapi Generator last run: : 2025-05-15T14:44:57.478150
|
// Openapi Generator last run: : 2025-05-27T14:44:29.936214
|
||||||
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
|
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
|
||||||
|
|
||||||
@Openapi(
|
@Openapi(
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"info": {
|
"info": {
|
||||||
"title": "Manager Service",
|
"title": "Manager Service",
|
||||||
"description": "API Manager Service",
|
"description": "API Manager Service",
|
||||||
"version": "Version Alpha 3"
|
"version": "Version Alpha"
|
||||||
},
|
},
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
@ -4300,9 +4300,7 @@
|
|||||||
"sections": {
|
"sections": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"nullable": true,
|
"nullable": true,
|
||||||
"items": {
|
"items": {}
|
||||||
"$ref": "#/components/schemas/SectionDTO"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ Name | Type | Description | Notes
|
|||||||
**meterZoneGPS** | **int** | | [optional]
|
**meterZoneGPS** | **int** | | [optional]
|
||||||
**isBeacon** | **bool** | | [optional]
|
**isBeacon** | **bool** | | [optional]
|
||||||
**beaconId** | **int** | | [optional]
|
**beaconId** | **int** | | [optional]
|
||||||
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []]
|
**sections** | [**List<Object>**](Object.md) | | [optional] [default to const []]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -94,7 +94,7 @@ class MenuDTO {
|
|||||||
|
|
||||||
int? beaconId;
|
int? beaconId;
|
||||||
|
|
||||||
List<SectionDTO>? sections;
|
dynamic? sections;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
@ -286,7 +286,7 @@ class MenuDTO {
|
|||||||
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
|
meterZoneGPS: mapValueOfType<int>(json, r'meterZoneGPS'),
|
||||||
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
|
isBeacon: mapValueOfType<bool>(json, r'isBeacon'),
|
||||||
beaconId: mapValueOfType<int>(json, r'beaconId'),
|
beaconId: mapValueOfType<int>(json, r'beaconId'),
|
||||||
sections: SectionDTO.listFromJson(json[r'sections']),
|
sections: json[r'sections'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user