update max size title + fix map type change + category not showed
This commit is contained in:
parent
5fd5aa5c53
commit
afa9ca4fd5
@ -8,9 +8,9 @@ import 'package:manager_app/constants.dart';
|
||||
class CategoryInputContainer extends StatefulWidget {
|
||||
final Color color;
|
||||
final String label;
|
||||
final List<CategorieDTO> initialValue;
|
||||
List<CategorieDTO> initialValue;
|
||||
final ValueChanged<List<CategorieDTO>> onChanged;
|
||||
const CategoryInputContainer({
|
||||
CategoryInputContainer({
|
||||
Key? key,
|
||||
this.color = kSecond,
|
||||
required this.label,
|
||||
@ -50,6 +50,7 @@ class _CategoryInputContainerState extends State<CategoryInputContainer> {
|
||||
List<CategorieDTO> initials = widget.initialValue;
|
||||
showCreateOrUpdateCategories("Catégories", initials, newValues, (value) {
|
||||
widget.onChanged(value);
|
||||
widget.initialValue = value;
|
||||
}, context);
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@ -37,7 +37,7 @@ class _TranslationInputAndResourceContainerState extends State<TranslationInputA
|
||||
controllerQuill.onTextChanged((p0) async {
|
||||
var plainText = await controllerQuill.getPlainText();
|
||||
if(widget.isTitle) {
|
||||
if(plainText.length > 60) {
|
||||
if(plainText.length > 110) {
|
||||
print("to much text au dessus");
|
||||
controllerQuill.undo();
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ class _TranslationInputContainerState extends State<TranslationInputContainer> w
|
||||
controllerQuill.onTextChanged((p0) async {
|
||||
var plainText = await controllerQuill.getPlainText();
|
||||
if(widget.isTitle) {
|
||||
if(plainText.length > 60) {
|
||||
if(plainText.length > 110) {
|
||||
print("to much text au dessus");
|
||||
controllerQuill.undo();
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ Future<CategorieDTO?> showNewOrUpdateCategory(CategorieDTO? inputCategorieDTO, A
|
||||
isHTML: true,
|
||||
)
|
||||
),
|
||||
Container(
|
||||
/*Container(
|
||||
height: size.height * 0.2,
|
||||
constraints: BoxConstraints(minHeight: 50, maxHeight: 80),
|
||||
child: ResourceInputContainer(
|
||||
@ -95,7 +95,7 @@ Future<CategorieDTO?> showNewOrUpdateCategory(CategorieDTO? inputCategorieDTO, A
|
||||
},
|
||||
isSmall: true
|
||||
),
|
||||
),
|
||||
),*/
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -73,12 +73,12 @@ class MapTypeAppTypeTransformer {
|
||||
/// and users are still using an old app with the old code.
|
||||
MapTypeApp? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data.toString()) {
|
||||
case r'None': return MapTypeApp.none;
|
||||
case r'Normal': return MapTypeApp.normal;
|
||||
case r'Satellite': return MapTypeApp.satellite;
|
||||
case r'Terrain': return MapTypeApp.terrain;
|
||||
case r'Hybrid': return MapTypeApp.hybrid;
|
||||
switch (data.toString().toLowerCase()) {
|
||||
case r'none': return MapTypeApp.none;
|
||||
case r'normal': return MapTypeApp.normal;
|
||||
case r'satellite': return MapTypeApp.satellite;
|
||||
case r'terrain': return MapTypeApp.terrain;
|
||||
case r'hybrid': return MapTypeApp.hybrid;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
@ -87,12 +87,12 @@ class MapTypeAppTypeTransformer {
|
||||
}
|
||||
if (data != null) {
|
||||
if(data.runtimeType == String) {
|
||||
switch (data.toString()) {
|
||||
case r'None': return MapTypeApp.none;
|
||||
case r'Normal': return MapTypeApp.normal;
|
||||
case r'Satellite': return MapTypeApp.satellite;
|
||||
case r'Terrain': return MapTypeApp.terrain;
|
||||
case r'Hybrid': return MapTypeApp.hybrid;
|
||||
switch (data.toString().toLowerCase()) {
|
||||
case r'none': return MapTypeApp.none;
|
||||
case r'normal': return MapTypeApp.normal;
|
||||
case r'satellite': return MapTypeApp.satellite;
|
||||
case r'terrain': return MapTypeApp.terrain;
|
||||
case r'hybrid': return MapTypeApp.hybrid;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user