diff --git a/assets/fonts b/assets/fonts new file mode 120000 index 0000000..35bed8b --- /dev/null +++ b/assets/fonts @@ -0,0 +1 @@ +../fonts \ No newline at end of file diff --git a/fonts/OpenSans-Bold.ttf b/fonts/OpenSans-Bold.ttf new file mode 100644 index 0000000..98c74e0 Binary files /dev/null and b/fonts/OpenSans-Bold.ttf differ diff --git a/fonts/OpenSans-BoldItalic.ttf b/fonts/OpenSans-BoldItalic.ttf new file mode 100644 index 0000000..8558928 Binary files /dev/null and b/fonts/OpenSans-BoldItalic.ttf differ diff --git a/fonts/OpenSans-ExtraBold.ttf b/fonts/OpenSans-ExtraBold.ttf new file mode 100644 index 0000000..4eb3393 Binary files /dev/null and b/fonts/OpenSans-ExtraBold.ttf differ diff --git a/fonts/OpenSans-ExtraBoldItalic.ttf b/fonts/OpenSans-ExtraBoldItalic.ttf new file mode 100644 index 0000000..75789b4 Binary files /dev/null and b/fonts/OpenSans-ExtraBoldItalic.ttf differ diff --git a/fonts/OpenSans-Italic.ttf b/fonts/OpenSans-Italic.ttf new file mode 100644 index 0000000..29ff693 Binary files /dev/null and b/fonts/OpenSans-Italic.ttf differ diff --git a/fonts/OpenSans-Light.ttf b/fonts/OpenSans-Light.ttf new file mode 100644 index 0000000..ea175cc Binary files /dev/null and b/fonts/OpenSans-Light.ttf differ diff --git a/fonts/OpenSans-LightItalic.ttf b/fonts/OpenSans-LightItalic.ttf new file mode 100644 index 0000000..edbfe0b Binary files /dev/null and b/fonts/OpenSans-LightItalic.ttf differ diff --git a/fonts/OpenSans-Medium.ttf b/fonts/OpenSans-Medium.ttf new file mode 100644 index 0000000..ae71693 Binary files /dev/null and b/fonts/OpenSans-Medium.ttf differ diff --git a/fonts/OpenSans-MediumItalic.ttf b/fonts/OpenSans-MediumItalic.ttf new file mode 100644 index 0000000..6d1e09b Binary files /dev/null and b/fonts/OpenSans-MediumItalic.ttf differ diff --git a/fonts/OpenSans-Regular.ttf b/fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..67803bb Binary files /dev/null and b/fonts/OpenSans-Regular.ttf differ diff --git a/fonts/OpenSans-SemiBold.ttf b/fonts/OpenSans-SemiBold.ttf new file mode 100644 index 0000000..e5ab464 Binary files /dev/null and b/fonts/OpenSans-SemiBold.ttf differ diff --git a/fonts/OpenSans-SemiBoldItalic.ttf b/fonts/OpenSans-SemiBoldItalic.ttf new file mode 100644 index 0000000..cd23e15 Binary files /dev/null and b/fonts/OpenSans-SemiBoldItalic.ttf differ diff --git a/fonts/OpenSans_Condensed-Bold.ttf b/fonts/OpenSans_Condensed-Bold.ttf new file mode 100644 index 0000000..525397d Binary files /dev/null and b/fonts/OpenSans_Condensed-Bold.ttf differ diff --git a/fonts/OpenSans_Condensed-BoldItalic.ttf b/fonts/OpenSans_Condensed-BoldItalic.ttf new file mode 100644 index 0000000..d6c9bc0 Binary files /dev/null and b/fonts/OpenSans_Condensed-BoldItalic.ttf differ diff --git a/fonts/OpenSans_Condensed-ExtraBold.ttf b/fonts/OpenSans_Condensed-ExtraBold.ttf new file mode 100644 index 0000000..3e600b9 Binary files /dev/null and b/fonts/OpenSans_Condensed-ExtraBold.ttf differ diff --git a/fonts/OpenSans_Condensed-ExtraBoldItalic.ttf b/fonts/OpenSans_Condensed-ExtraBoldItalic.ttf new file mode 100644 index 0000000..0393650 Binary files /dev/null and b/fonts/OpenSans_Condensed-ExtraBoldItalic.ttf differ diff --git a/fonts/OpenSans_Condensed-Italic.ttf b/fonts/OpenSans_Condensed-Italic.ttf new file mode 100644 index 0000000..fdf0a52 Binary files /dev/null and b/fonts/OpenSans_Condensed-Italic.ttf differ diff --git a/fonts/OpenSans_Condensed-Light.ttf b/fonts/OpenSans_Condensed-Light.ttf new file mode 100644 index 0000000..459be7b Binary files /dev/null and b/fonts/OpenSans_Condensed-Light.ttf differ diff --git a/fonts/OpenSans_Condensed-LightItalic.ttf b/fonts/OpenSans_Condensed-LightItalic.ttf new file mode 100644 index 0000000..5f05d08 Binary files /dev/null and b/fonts/OpenSans_Condensed-LightItalic.ttf differ diff --git a/fonts/OpenSans_Condensed-Medium.ttf b/fonts/OpenSans_Condensed-Medium.ttf new file mode 100644 index 0000000..802200d Binary files /dev/null and b/fonts/OpenSans_Condensed-Medium.ttf differ diff --git a/fonts/OpenSans_Condensed-MediumItalic.ttf b/fonts/OpenSans_Condensed-MediumItalic.ttf new file mode 100644 index 0000000..b43786b Binary files /dev/null and b/fonts/OpenSans_Condensed-MediumItalic.ttf differ diff --git a/fonts/OpenSans_Condensed-Regular.ttf b/fonts/OpenSans_Condensed-Regular.ttf new file mode 100644 index 0000000..a2a83ac Binary files /dev/null and b/fonts/OpenSans_Condensed-Regular.ttf differ diff --git a/fonts/OpenSans_Condensed-SemiBold.ttf b/fonts/OpenSans_Condensed-SemiBold.ttf new file mode 100644 index 0000000..75bcd43 Binary files /dev/null and b/fonts/OpenSans_Condensed-SemiBold.ttf differ diff --git a/fonts/OpenSans_Condensed-SemiBoldItalic.ttf b/fonts/OpenSans_Condensed-SemiBoldItalic.ttf new file mode 100644 index 0000000..9fcaa52 Binary files /dev/null and b/fonts/OpenSans_Condensed-SemiBoldItalic.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-Bold.ttf b/fonts/OpenSans_SemiCondensed-Bold.ttf new file mode 100644 index 0000000..dc927fc Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-Bold.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-BoldItalic.ttf b/fonts/OpenSans_SemiCondensed-BoldItalic.ttf new file mode 100644 index 0000000..7601048 Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-BoldItalic.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-ExtraBold.ttf b/fonts/OpenSans_SemiCondensed-ExtraBold.ttf new file mode 100644 index 0000000..d6864b1 Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-ExtraBold.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-ExtraBoldItalic.ttf b/fonts/OpenSans_SemiCondensed-ExtraBoldItalic.ttf new file mode 100644 index 0000000..ec7ade5 Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-ExtraBoldItalic.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-Italic.ttf b/fonts/OpenSans_SemiCondensed-Italic.ttf new file mode 100644 index 0000000..7fc00c8 Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-Italic.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-Light.ttf b/fonts/OpenSans_SemiCondensed-Light.ttf new file mode 100644 index 0000000..5936496 Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-Light.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-LightItalic.ttf b/fonts/OpenSans_SemiCondensed-LightItalic.ttf new file mode 100644 index 0000000..7ced21a Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-LightItalic.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-Medium.ttf b/fonts/OpenSans_SemiCondensed-Medium.ttf new file mode 100644 index 0000000..25b1aad Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-Medium.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-MediumItalic.ttf b/fonts/OpenSans_SemiCondensed-MediumItalic.ttf new file mode 100644 index 0000000..fd87f78 Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-MediumItalic.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-Regular.ttf b/fonts/OpenSans_SemiCondensed-Regular.ttf new file mode 100644 index 0000000..5b09b35 Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-Regular.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-SemiBold.ttf b/fonts/OpenSans_SemiCondensed-SemiBold.ttf new file mode 100644 index 0000000..fff3a37 Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-SemiBold.ttf differ diff --git a/fonts/OpenSans_SemiCondensed-SemiBoldItalic.ttf b/fonts/OpenSans_SemiCondensed-SemiBoldItalic.ttf new file mode 100644 index 0000000..3874205 Binary files /dev/null and b/fonts/OpenSans_SemiCondensed-SemiBoldItalic.ttf differ diff --git a/i18n/de.json b/i18n/de.json index 8afe471..753cb33 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -14,7 +14,9 @@ "buttons": { "delete": "Löschen", "cancel": "Abbrechen", - "save": "Speichern" + "save": "Speichern", + "print_all": "Alles drucken", + "print": "Drucken" }, "spacer": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." }, @@ -110,7 +112,7 @@ }, "material": { "title": "Material", - "suggested_price": "Preis ca. ", + "suggested_price": "Richtpreis ca. ", "add_to_basket": "in den Warenkorb" } } diff --git a/lib/main.dart b/lib/main.dart index fd32d56..4e77377 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,8 @@ import 'package:ambito/src/config/config.dart'; import 'package:ambito/src/consts/consts.dart'; -import 'package:ambito/src/entity/enums/enum_details_type.dart'; +import 'package:ambito/src/entity/cart/cart.dart'; +import 'package:ambito/src/entity/cart/cart_element.dart'; +import 'package:ambito/src/entity/cart/cart_repository.dart'; import 'package:ambito/src/entity/lists/list_measure.dart'; import 'package:ambito/src/entity/lists/list_repository.dart'; import 'package:ambito/src/packages/ambito_api/base_api.dart'; @@ -9,6 +11,7 @@ import 'package:ambito/src/packages/ambito_notifier/notifier/theme_manager.dart' import 'package:ambito/src/packages/ambito_sharedprefs/ambito_sharedprefs.dart'; import 'package:ambito/src/pages/calendar/calendar_page.dart'; import 'package:ambito/src/pages/calendar/calendar_page_year.dart'; +import 'package:ambito/src/pages/cart/cart_page.dart'; import 'package:ambito/src/pages/dashboard/areas/dashboard_areas_page.dart'; import 'package:ambito/src/pages/dashboard/dashboard_page.dart'; import 'package:ambito/src/pages/error/error_page.dart'; @@ -33,28 +36,48 @@ void main() async { await AmbitoSharedPrefs.start(); await AmbitoIsarDB.init(); await Future.wait([ - //BaseApi().getContent('tree_type'), BaseApi().getContent('measure_types'), BaseApi().getContent('measure_types_details'), BaseApi().getContent('measure_general'), BaseApi().getContent('measure_details'), - //BaseApi().getContent('measure_combination'), - //BaseApi().getContent('organism'), BaseApi().getContent('funding_program'), - //BaseApi().getContent('location_requirements'), - //BaseApi().getContent('reference_implementation'), BaseApi().getContent('business'), BaseApi().getContent('area'), - //BaseApi().getContent('service_provider'), - //BaseApi().getContent('service_provider_contact_person'), - //BaseApi().getContent('material'), - //BaseApi().getContent('source'), ]); + List myCartIds = []; + + var carts = await BaseApi().getContent('cart', false); + for (final cart in carts) { + CartRepository().put(Cart.fromJson(cart)); + } + var cart_elements = await BaseApi().getContent('cart_element', false); + for (final element in cart_elements) { + CartRepository().putElement(CartElement.fromJson(element)); + } + /*for (final cart in carts) { + if (cart['field_3106997'].first['id'] == + (prefs.getInt('currentUser') ?? 100)) { + logger.i('Found my cart!'); + Cart cartToSave = Cart.fromJson(cart); + myCartIds.add(cartToSave.id); + CartRepository().put(cartToSave); + } + }*/ + + /*BaseApi().getContent('cart', false).then((carts) { + logger.i(carts); + for (final cart in carts) { + logger.e(cart); + if (cart['field_3106997'].first['id'] == + (prefs.getInt('currentUser') ?? 100)) { + logger.i('Found my cart!'); + CartRepository().put(Cart.fromJson(cart)); + } + } + logger.e(CartRepository().getAll().length); + });*/ ListRepository().buildTypeGroupCategoryList(); ListRepository().buildListMeasureSingle(); - //await MeasureRepository().getCategoriesAndTypes(); - //await MeasureRepository().buildMeasureFilters(); - //await MeasureRepository().downloadImages(); ListRepository().putListMeasure(listMeasures); await MeasureRepository().getCategoriesGroupsAndTypes(); @@ -104,6 +127,12 @@ class Ambito extends StatelessWidget { name: '/', page: () => const MeasureCategoriesPage(), ), + GetPage( + name: '/warenkorb', + page: () => const CartPage( + measure: null, + ), + ), GetPage( name: '/kalender', page: () => const CalendarPage(), @@ -179,9 +208,8 @@ class Ambito extends StatelessWidget { page: () => const MeasureCreatePage(), ), GetPage( - name: '/massnahme/', - page: () => const MeasureDetailPage( - id: 0, type: EnumDetailsType.measure), + name: '/massnahme/:id', + page: () => const MeasureDetailPage(), ), GetPage( name: '/error', diff --git a/lib/src/config/config.dart b/lib/src/config/config.dart index d69af11..eb3ef4b 100644 --- a/lib/src/config/config.dart +++ b/lib/src/config/config.dart @@ -68,4 +68,6 @@ const baserowIds = { "contact_person": 330832, "material": 330836, "source": 334231, + "cart": 406916, + "cart_element": 407428, }; diff --git a/lib/src/entity/_general/id_value/id_value.dart b/lib/src/entity/_general/id_value/id_value.dart index 52e1c29..7626667 100644 --- a/lib/src/entity/_general/id_value/id_value.dart +++ b/lib/src/entity/_general/id_value/id_value.dart @@ -1,6 +1,8 @@ import 'package:isar/isar.dart'; import 'package:json_annotation/json_annotation.dart'; +import '../../../consts/consts.dart'; + part 'id_value.g.dart'; @JsonSerializable(explicitToJson: true) @@ -14,5 +16,6 @@ class IdValue { factory IdValue.fromJson(Map json) => _$IdValueFromJson(json); - int? toJson() => id; + toJson() => + (prefs.getBool('extended_json') == true) ? _$IdValueToJson(this) : id; } diff --git a/lib/src/entity/_general/id_value_color/id_value_color.dart b/lib/src/entity/_general/id_value_color/id_value_color.dart index 1e832ff..d0edc2b 100644 --- a/lib/src/entity/_general/id_value_color/id_value_color.dart +++ b/lib/src/entity/_general/id_value_color/id_value_color.dart @@ -1,6 +1,8 @@ import 'package:isar/isar.dart'; import 'package:json_annotation/json_annotation.dart'; +import '../../../consts/consts.dart'; + part 'id_value_color.g.dart'; @JsonSerializable(explicitToJson: true) @@ -15,5 +17,7 @@ class IdValueColor { factory IdValueColor.fromJson(Map json) => _$IdValueColorFromJson(json); - int? toJson() => id; + toJson() => (prefs.getBool('extended_json') == true) + ? _$IdValueColorToJson(this) + : id; } diff --git a/lib/src/entity/area/area_datasource.dart b/lib/src/entity/area/area_datasource.dart index f576132..734fbb7 100644 --- a/lib/src/entity/area/area_datasource.dart +++ b/lib/src/entity/area/area_datasource.dart @@ -10,8 +10,7 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; import '../../packages/ambito_theme/ambito_theme.dart'; class AreaDataSource extends DataGridSource { - AreaDataSource( - {required List areas, required BuildContext this.context}) { + AreaDataSource({required List areas, required this.context}) { dataGridRows = areas .map( (dataGridRow) => DataGridRow( diff --git a/lib/src/entity/cart/cart.dart b/lib/src/entity/cart/cart.dart new file mode 100644 index 0000000..e1a3fa4 --- /dev/null +++ b/lib/src/entity/cart/cart.dart @@ -0,0 +1,24 @@ +import 'package:ambito/src/entity/base_entity.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +import '../_general/id_value/id_value.dart'; + +part 'cart.g.dart'; + +@JsonSerializable(explicitToJson: true) +@collection +class Cart extends BaseEntity with EntityWithId { + Cart(); + + @JsonKey(name: 'field_3106992') + String? name; + @JsonKey(name: 'field_3106997') + List? business; + @JsonKey(includeFromJson: false, includeToJson: false) + double? price; + + factory Cart.fromJson(Map json) => _$CartFromJson(json); + + Map toJson() => _$CartToJson(this); +} diff --git a/lib/src/entity/cart/cart.g.dart b/lib/src/entity/cart/cart.g.dart new file mode 100644 index 0000000..ce8a85a --- /dev/null +++ b/lib/src/entity/cart/cart.g.dart @@ -0,0 +1,881 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'cart.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetCartCollection on Isar { + IsarCollection get carts => this.collection(); +} + +const CartSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'Cart', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'name', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'business', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'price', + type: IsarType.double, + ), + ], + indexes: [], + ), + converter: IsarObjectConverter( + serialize: serializeCart, + deserialize: deserializeCart, + deserializeProperty: deserializeCartProp, + ), + embeddedSchemas: [IdValueSchema], +); + +@isarProtected +int serializeCart(IsarWriter writer, Cart object) { + { + final value = object.name; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final list = object.business; + if (list == null) { + IsarCore.writeNull(writer, 2); + } else { + final listWriter = IsarCore.beginList(writer, 2, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + IsarCore.writeDouble(writer, 3, object.price ?? double.nan); + return object.id; +} + +@isarProtected +Cart deserializeCart(IsarReader reader) { + final object = Cart(); + object.name = IsarCore.readString(reader, 1); + { + final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.business = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.business = list; + } + } + } + { + final value = IsarCore.readDouble(reader, 3); + if (value.isNaN) { + object.price = null; + } else { + object.price = value; + } + } + object.id = IsarCore.readId(reader); + return object; +} + +@isarProtected +dynamic deserializeCartProp(IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + { + final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 3: + { + final value = IsarCore.readDouble(reader, 3); + if (value.isNaN) { + return null; + } else { + return value; + } + } + case 0: + return IsarCore.readId(reader); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _CartUpdate { + bool call({ + required int id, + String? name, + double? price, + }); +} + +class _CartUpdateImpl implements _CartUpdate { + const _CartUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? name = ignore, + Object? price = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (name != ignore) 1: name as String?, + if (price != ignore) 3: price as double?, + }) > + 0; + } +} + +sealed class _CartUpdateAll { + int call({ + required List id, + String? name, + double? price, + }); +} + +class _CartUpdateAllImpl implements _CartUpdateAll { + const _CartUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? name = ignore, + Object? price = ignore, + }) { + return collection.updateProperties(id, { + if (name != ignore) 1: name as String?, + if (price != ignore) 3: price as double?, + }); + } +} + +extension CartUpdate on IsarCollection { + _CartUpdate get update => _CartUpdateImpl(this); + + _CartUpdateAll get updateAll => _CartUpdateAllImpl(this); +} + +sealed class _CartQueryUpdate { + int call({ + String? name, + double? price, + }); +} + +class _CartQueryUpdateImpl implements _CartQueryUpdate { + const _CartQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? price = ignore, + }) { + return query.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (price != ignore) 3: price as double?, + }); + } +} + +extension CartQueryUpdate on IsarQuery { + _CartQueryUpdate get updateFirst => _CartQueryUpdateImpl(this, limit: 1); + + _CartQueryUpdate get updateAll => _CartQueryUpdateImpl(this); +} + +class _CartQueryBuilderUpdateImpl implements _CartQueryUpdate { + const _CartQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? price = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (price != ignore) 3: price as double?, + }); + } finally { + q.close(); + } + } +} + +extension CartQueryBuilderUpdate on QueryBuilder { + _CartQueryUpdate get updateFirst => + _CartQueryBuilderUpdateImpl(this, limit: 1); + + _CartQueryUpdate get updateAll => _CartQueryBuilderUpdateImpl(this); +} + +extension CartQueryFilter on QueryBuilder { + QueryBuilder nameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder nameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder nameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder nameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder businessIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder businessIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder businessIsEmpty() { + return not().group( + (q) => q.businessIsNull().or().businessIsNotEmpty(), + ); + } + + QueryBuilder businessIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 2, value: null), + ); + }); + } + + QueryBuilder priceIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder priceIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder priceEqualTo( + double? value, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 3, + value: value, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder priceGreaterThan( + double? value, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 3, + value: value, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder priceGreaterThanOrEqualTo( + double? value, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 3, + value: value, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder priceLessThan( + double? value, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 3, + value: value, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder priceLessThanOrEqualTo( + double? value, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 3, + value: value, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder priceBetween( + double? lower, + double? upper, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 3, + lower: lower, + upper: upper, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } +} + +extension CartQueryObject on QueryBuilder {} + +extension CartQuerySortBy on QueryBuilder { + QueryBuilder sortByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPrice() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3); + }); + } + + QueryBuilder sortByPriceDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, sort: Sort.desc); + }); + } + + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension CartQuerySortThenBy on QueryBuilder { + QueryBuilder thenByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPrice() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3); + }); + } + + QueryBuilder thenByPriceDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, sort: Sort.desc); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension CartQueryWhereDistinct on QueryBuilder { + QueryBuilder distinctByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByPrice() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(3); + }); + } +} + +extension CartQueryProperty1 on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?, QAfterProperty> businessProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder priceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension CartQueryProperty2 on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?), QAfterProperty> businessProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder priceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension CartQueryProperty3 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?), QOperations> businessProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder priceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Cart _$CartFromJson(Map json) => Cart() + ..id = (json['id'] as num).toInt() + ..name = json['field_3106992'] as String? + ..business = (json['field_3106997'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList(); + +Map _$CartToJson(Cart instance) => { + 'id': instance.id, + 'field_3106992': instance.name, + 'field_3106997': instance.business?.map((e) => e.toJson()).toList(), + }; diff --git a/lib/src/entity/cart/cart_datasource.dart b/lib/src/entity/cart/cart_datasource.dart new file mode 100644 index 0000000..c3b02a6 --- /dev/null +++ b/lib/src/entity/cart/cart_datasource.dart @@ -0,0 +1,157 @@ +import 'package:ambito/src/entity/cart/cart_element.dart'; +import 'package:ambito/src/entity/entities.dart'; +import 'package:flutter/material.dart'; +import 'package:syncfusion_flutter_datagrid/datagrid.dart'; + +import '../../packages/ambito_theme/ambito_theme.dart'; + +class CartDataSource extends DataGridSource { + CartDataSource( + {required List cartElements, required this.context}) { + dataGridRows = cartElements + .map( + (dataGridRow) => DataGridRow( + cells: [ + DataGridCell( + columnName: 'name', + value: dataGridRow.name, + ), + DataGridCell( + columnName: 'amount', + value: dataGridRow.amount, + ), + DataGridCell>( + columnName: 'provider', + value: dataGridRow.provider, + ), + DataGridCell( + columnName: 'price', + value: dataGridRow.price.toString(), + ), + ], + ), + ) + .toList(); + } + + final BuildContext context; + + List dataGridRows = []; + + @override + List get rows => dataGridRows; + + @override + DataGridRowAdapter? buildRow(DataGridRow row) { + final AmbitoTheme theme = getTheme(context); + + double completePrice = double.tryParse(row + .getCells() + .where((cell) => cell.columnName == 'price') + .first + .value + .toString() ?? + '0.0') ?? + 0; + + int amount = int.tryParse(row + .getCells() + .where((cell) => cell.columnName == 'amount') + .first + .value + .toString() ?? + '0') ?? + 0; + + if (amount > 1) { + completePrice = completePrice * amount; + } + + return DataGridRowAdapter( + cells: row.getCells().map( + (dataGridCell) { + if (dataGridCell.columnName == 'provider') { + final providerString = + dataGridCell.value.map((ele) => ele.value).toList().join(', '); + return Container( + alignment: Alignment.centerLeft, + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Text( + providerString, + overflow: TextOverflow.ellipsis, + style: theme.bodyMedium.copyWith( + color: theme.currentColorScheme.primary, + ), + ), + ); + } + + if (dataGridCell.columnName == 'price') { + final priceString = amount == 1 + ? '${dataGridCell.value ?? '0'}€' + : '${completePrice.toStringAsFixed(2)}€ (${dataGridCell.value ?? '0'}€ pro Stk.)'; + return Container( + alignment: Alignment.centerLeft, + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Text( + priceString, + overflow: TextOverflow.ellipsis, + style: theme.bodyMedium.copyWith( + color: theme.currentColorScheme.primary, + ), + ), + ); + } + if (dataGridCell.columnName == 'amount') { + return Container( + alignment: Alignment.centerLeft, + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + IconButton( + icon: Icon( + Icons.remove, + color: Theme.of(context).colorScheme.secondary, + ), + padding: + EdgeInsets.symmetric(vertical: 4.0, horizontal: 18.0), + iconSize: 16.0, + color: Theme.of(context).primaryColor, + onPressed: () {}, + ), + Text( + dataGridCell.value, + textAlign: TextAlign.center, + style: theme.bodyMedium, + ), + IconButton( + icon: Icon( + Icons.add, + color: Theme.of(context).colorScheme.secondary, + ), + padding: + EdgeInsets.symmetric(vertical: 4.0, horizontal: 18.0), + iconSize: 16.0, + color: Theme.of(context).primaryColor, + onPressed: () {}, + ), + ], + ), + ); + } + return Container( + alignment: Alignment.centerLeft, + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Text( + dataGridCell.value.toString(), + overflow: TextOverflow.ellipsis, + style: theme.bodyMedium.copyWith( + color: theme.currentColorScheme.primary, + ), + ), + ); + }, + ).toList()); + } +} diff --git a/lib/src/entity/cart/cart_element.dart b/lib/src/entity/cart/cart_element.dart new file mode 100644 index 0000000..d1b4c37 --- /dev/null +++ b/lib/src/entity/cart/cart_element.dart @@ -0,0 +1,30 @@ +import 'package:ambito/src/entity/_general/id_value/id_value.dart'; +import 'package:ambito/src/entity/base_entity.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'cart_element.g.dart'; + +@collection +@JsonSerializable(explicitToJson: true) +class CartElement extends BaseEntity with EntityWithId { + CartElement(); + + @JsonKey(name: 'field_3110710') + String? name; + @JsonKey(name: 'field_3110713') + List? cart; + @JsonKey(name: 'field_3110714') + String? amount; + @JsonKey(name: 'field_3110715') + List? provider; + @JsonKey(name: 'field_3110716') + String? priceType; + @JsonKey(name: 'field_3110717') + String? price; + + factory CartElement.fromJson(Map json) => + _$CartElementFromJson(json); + + Map toJson() => _$CartElementToJson(this); +} diff --git a/lib/src/entity/cart/cart_element.g.dart b/lib/src/entity/cart/cart_element.g.dart new file mode 100644 index 0000000..b70747b --- /dev/null +++ b/lib/src/entity/cart/cart_element.g.dart @@ -0,0 +1,1686 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'cart_element.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetCartElementCollection on Isar { + IsarCollection get cartElements => this.collection(); +} + +const CartElementSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'CartElement', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'name', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'cart', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'amount', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'provider', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'priceType', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'price', + type: IsarType.string, + ), + ], + indexes: [], + ), + converter: IsarObjectConverter( + serialize: serializeCartElement, + deserialize: deserializeCartElement, + deserializeProperty: deserializeCartElementProp, + ), + embeddedSchemas: [IdValueSchema], +); + +@isarProtected +int serializeCartElement(IsarWriter writer, CartElement object) { + { + final value = object.name; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final list = object.cart; + if (list == null) { + IsarCore.writeNull(writer, 2); + } else { + final listWriter = IsarCore.beginList(writer, 2, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.amount; + if (value == null) { + IsarCore.writeNull(writer, 3); + } else { + IsarCore.writeString(writer, 3, value); + } + } + { + final list = object.provider; + if (list == null) { + IsarCore.writeNull(writer, 4); + } else { + final listWriter = IsarCore.beginList(writer, 4, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.priceType; + if (value == null) { + IsarCore.writeNull(writer, 5); + } else { + IsarCore.writeString(writer, 5, value); + } + } + { + final value = object.price; + if (value == null) { + IsarCore.writeNull(writer, 6); + } else { + IsarCore.writeString(writer, 6, value); + } + } + return object.id; +} + +@isarProtected +CartElement deserializeCartElement(IsarReader reader) { + final object = CartElement(); + object.name = IsarCore.readString(reader, 1); + { + final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.cart = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.cart = list; + } + } + } + object.amount = IsarCore.readString(reader, 3); + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.provider = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.provider = list; + } + } + } + object.priceType = IsarCore.readString(reader, 5); + object.price = IsarCore.readString(reader, 6); + object.id = IsarCore.readId(reader); + return object; +} + +@isarProtected +dynamic deserializeCartElementProp(IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + { + final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 3: + return IsarCore.readString(reader, 3); + case 4: + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 5: + return IsarCore.readString(reader, 5); + case 6: + return IsarCore.readString(reader, 6); + case 0: + return IsarCore.readId(reader); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _CartElementUpdate { + bool call({ + required int id, + String? name, + String? amount, + String? priceType, + String? price, + }); +} + +class _CartElementUpdateImpl implements _CartElementUpdate { + const _CartElementUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? name = ignore, + Object? amount = ignore, + Object? priceType = ignore, + Object? price = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (name != ignore) 1: name as String?, + if (amount != ignore) 3: amount as String?, + if (priceType != ignore) 5: priceType as String?, + if (price != ignore) 6: price as String?, + }) > + 0; + } +} + +sealed class _CartElementUpdateAll { + int call({ + required List id, + String? name, + String? amount, + String? priceType, + String? price, + }); +} + +class _CartElementUpdateAllImpl implements _CartElementUpdateAll { + const _CartElementUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? name = ignore, + Object? amount = ignore, + Object? priceType = ignore, + Object? price = ignore, + }) { + return collection.updateProperties(id, { + if (name != ignore) 1: name as String?, + if (amount != ignore) 3: amount as String?, + if (priceType != ignore) 5: priceType as String?, + if (price != ignore) 6: price as String?, + }); + } +} + +extension CartElementUpdate on IsarCollection { + _CartElementUpdate get update => _CartElementUpdateImpl(this); + + _CartElementUpdateAll get updateAll => _CartElementUpdateAllImpl(this); +} + +sealed class _CartElementQueryUpdate { + int call({ + String? name, + String? amount, + String? priceType, + String? price, + }); +} + +class _CartElementQueryUpdateImpl implements _CartElementQueryUpdate { + const _CartElementQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? amount = ignore, + Object? priceType = ignore, + Object? price = ignore, + }) { + return query.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (amount != ignore) 3: amount as String?, + if (priceType != ignore) 5: priceType as String?, + if (price != ignore) 6: price as String?, + }); + } +} + +extension CartElementQueryUpdate on IsarQuery { + _CartElementQueryUpdate get updateFirst => + _CartElementQueryUpdateImpl(this, limit: 1); + + _CartElementQueryUpdate get updateAll => _CartElementQueryUpdateImpl(this); +} + +class _CartElementQueryBuilderUpdateImpl implements _CartElementQueryUpdate { + const _CartElementQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? amount = ignore, + Object? priceType = ignore, + Object? price = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (amount != ignore) 3: amount as String?, + if (priceType != ignore) 5: priceType as String?, + if (price != ignore) 6: price as String?, + }); + } finally { + q.close(); + } + } +} + +extension CartElementQueryBuilderUpdate + on QueryBuilder { + _CartElementQueryUpdate get updateFirst => + _CartElementQueryBuilderUpdateImpl(this, limit: 1); + + _CartElementQueryUpdate get updateAll => + _CartElementQueryBuilderUpdateImpl(this); +} + +extension CartElementQueryFilter + on QueryBuilder { + QueryBuilder nameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder + nameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder nameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + nameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder cartIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + cartIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder cartIsEmpty() { + return not().group( + (q) => q.cartIsNull().or().cartIsNotEmpty(), + ); + } + + QueryBuilder + cartIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 2, value: null), + ); + }); + } + + QueryBuilder amountIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + amountIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder amountEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + amountGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + amountGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder amountLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + amountLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder amountBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 3, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + amountStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder amountEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder amountContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder amountMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 3, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + amountIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder + amountIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder + providerIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + providerIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + providerIsEmpty() { + return not().group( + (q) => q.providerIsNull().or().providerIsNotEmpty(), + ); + } + + QueryBuilder + providerIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 4, value: null), + ); + }); + } + + QueryBuilder + priceTypeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + priceTypeIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + priceTypeEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceTypeGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceTypeGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceTypeLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceTypeLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceTypeBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 5, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceTypeStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceTypeEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceTypeContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceTypeMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 5, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceTypeIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder + priceTypeIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder priceIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder + priceIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder priceEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder priceLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priceLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder priceBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 6, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder priceStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder priceEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder priceContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder priceMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 6, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder priceIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder + priceIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } +} + +extension CartElementQueryObject + on QueryBuilder {} + +extension CartElementQuerySortBy + on QueryBuilder { + QueryBuilder sortByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAmount( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAmountDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPriceType( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 5, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPriceTypeDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 5, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPrice( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPriceDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension CartElementQuerySortThenBy + on QueryBuilder { + QueryBuilder thenByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAmount( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAmountDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPriceType( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPriceTypeDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPrice( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPriceDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension CartElementQueryWhereDistinct + on QueryBuilder { + QueryBuilder distinctByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByAmount( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByPriceType( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(5, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByPrice( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(6, caseSensitive: caseSensitive); + }); + } +} + +extension CartElementQueryProperty1 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?, QAfterProperty> cartProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder amountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?, QAfterProperty> providerProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder priceTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder priceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension CartElementQueryProperty2 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?), QAfterProperty> + cartProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder amountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), QAfterProperty> + providerProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder priceTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder priceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension CartElementQueryProperty3 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?), QOperations> + cartProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder amountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), QOperations> + providerProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder + priceTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder priceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CartElement _$CartElementFromJson(Map json) => CartElement() + ..id = (json['id'] as num).toInt() + ..name = json['field_3110710'] as String? + ..cart = (json['field_3110713'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..amount = json['field_3110714'] as String? + ..provider = (json['field_3110715'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..priceType = json['field_3110716'] as String? + ..price = json['field_3110717'] as String?; + +Map _$CartElementToJson(CartElement instance) => + { + 'id': instance.id, + 'field_3110710': instance.name, + 'field_3110713': instance.cart?.map((e) => e.toJson()).toList(), + 'field_3110714': instance.amount, + 'field_3110715': instance.provider?.map((e) => e.toJson()).toList(), + 'field_3110716': instance.priceType, + 'field_3110717': instance.price, + }; diff --git a/lib/src/entity/cart/cart_repository.dart b/lib/src/entity/cart/cart_repository.dart new file mode 100644 index 0000000..0fa910b --- /dev/null +++ b/lib/src/entity/cart/cart_repository.dart @@ -0,0 +1,52 @@ +import 'package:ambito/src/entity/cart/cart.dart'; +import 'package:ambito/src/entity/cart/cart_element.dart'; +import 'package:ambito/src/packages/ambito_notifier/notifier/cart_notifier.dart'; +import 'package:isar/isar.dart'; + +import '../../consts/consts.dart'; +import '../../packages/ambito_db/base_db.dart'; + +class CartRepository extends BaseDB { + @override + IsarCollection collection = isar.carts; + + void upsert(Cart cart) { + Cart? existing = isar.carts.where().nameEqualTo(cart.name!).findFirst(); + + if (existing == null) { + ambitoCartNotifier.addCart(); + existing = cart; + } + isar.write((isar) { + isar.carts.put(existing!); + }); + } + + void putElement(CartElement cartElement) { + isar.write((isar) { + isar.cartElements.put(cartElement); + }); + } + + List getMyCarts() { + List myCarts = []; + final all = isar.carts.where().findAll(); + for (final cart in all) { + if (cart.business?.first.id == (prefs.getInt('currentUser') ?? 100)) { + myCarts.add(cart); + } + } + return myCarts; + } + + List getElementsByCartId(int cartId) { + List myElements = []; + final all = isar.cartElements.where().findAll(); + for (final element in all) { + if (element.cart!.first.id == cartId) { + myElements.add(element); + } + } + return myElements; + } +} diff --git a/lib/src/entity/lists/list_measure.dart b/lib/src/entity/lists/list_measure.dart index fbf4541..745f3fe 100644 --- a/lib/src/entity/lists/list_measure.dart +++ b/lib/src/entity/lists/list_measure.dart @@ -12,9 +12,15 @@ part 'list_measure.g.dart'; @collection @JsonSerializable() -class ListMeasure extends BaseEntity with EntityWithId { +class ListMeasure extends BaseEntity { ListMeasure(); + @JsonKey(includeToJson: false, includeFromJson: false) + @Id() + late int isarId; + @Index() + int? id; + @Index() String? name; String? description; diff --git a/lib/src/entity/lists/list_measure.g.dart b/lib/src/entity/lists/list_measure.g.dart index 62dc438..16f963a 100644 --- a/lib/src/entity/lists/list_measure.g.dart +++ b/lib/src/entity/lists/list_measure.g.dart @@ -17,9 +17,13 @@ extension GetListMeasureCollection on Isar { const ListMeasureSchema = IsarGeneratedSchema( schema: IsarSchema( name: 'ListMeasure', - idName: 'id', + idName: 'isarId', embedded: false, properties: [ + IsarPropertySchema( + name: 'id', + type: IsarType.long, + ), IsarPropertySchema( name: 'name', type: IsarType.string, @@ -47,6 +51,14 @@ const ListMeasureSchema = IsarGeneratedSchema( ), ], indexes: [ + IsarIndexSchema( + name: 'id', + properties: [ + "id", + ], + unique: false, + hash: false, + ), IsarIndexSchema( name: 'name', properties: [ @@ -67,16 +79,9 @@ const ListMeasureSchema = IsarGeneratedSchema( @isarProtected int serializeListMeasure(IsarWriter writer, ListMeasure object) { + IsarCore.writeLong(writer, 1, object.id ?? -9223372036854775808); { final value = object.name; - if (value == null) { - IsarCore.writeNull(writer, 1); - } else { - IsarCore.writeString(writer, 1, value); - } - } - { - final value = object.description; if (value == null) { IsarCore.writeNull(writer, 2); } else { @@ -84,19 +89,15 @@ int serializeListMeasure(IsarWriter writer, ListMeasure object) { } } { - final list = object.measureCategories; - if (list == null) { + final value = object.description; + if (value == null) { IsarCore.writeNull(writer, 3); } else { - final listWriter = IsarCore.beginList(writer, 3, list.length); - for (var i = 0; i < list.length; i++) { - IsarCore.writeString(listWriter, i, list[i]); - } - IsarCore.endList(writer, listWriter); + IsarCore.writeString(writer, 3, value); } } { - final list = object.measureGroups; + final list = object.measureCategories; if (list == null) { IsarCore.writeNull(writer, 4); } else { @@ -108,7 +109,7 @@ int serializeListMeasure(IsarWriter writer, ListMeasure object) { } } { - final list = object.measureTypes; + final list = object.measureGroups; if (list == null) { IsarCore.writeNull(writer, 5); } else { @@ -120,11 +121,23 @@ int serializeListMeasure(IsarWriter writer, ListMeasure object) { } } { - final list = object.files; + final list = object.measureTypes; if (list == null) { IsarCore.writeNull(writer, 6); } else { final listWriter = IsarCore.beginList(writer, 6, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.files; + if (list == null) { + IsarCore.writeNull(writer, 7); + } else { + final listWriter = IsarCore.beginList(writer, 7, list.length); for (var i = 0; i < list.length; i++) { { final value = list[i]; @@ -136,16 +149,25 @@ int serializeListMeasure(IsarWriter writer, ListMeasure object) { IsarCore.endList(writer, listWriter); } } - return object.id; + return object.isarId; } @isarProtected ListMeasure deserializeListMeasure(IsarReader reader) { final object = ListMeasure(); - object.name = IsarCore.readString(reader, 1); - object.description = IsarCore.readString(reader, 2); + object.isarId = IsarCore.readId(reader); { - final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + final value = IsarCore.readLong(reader, 1); + if (value == -9223372036854775808) { + object.id = null; + } else { + object.id = value; + } + } + object.name = IsarCore.readString(reader, 2); + object.description = IsarCore.readString(reader, 3); + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); { final reader = IsarCore.readerPtr; if (reader.isNull) { @@ -161,7 +183,7 @@ ListMeasure deserializeListMeasure(IsarReader reader) { } } { - final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr); { final reader = IsarCore.readerPtr; if (reader.isNull) { @@ -177,7 +199,7 @@ ListMeasure deserializeListMeasure(IsarReader reader) { } } { - final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr); + final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr); { final reader = IsarCore.readerPtr; if (reader.isNull) { @@ -193,7 +215,7 @@ ListMeasure deserializeListMeasure(IsarReader reader) { } } { - final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr); + final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr); { final reader = IsarCore.readerPtr; if (reader.isNull) { @@ -217,34 +239,27 @@ ListMeasure deserializeListMeasure(IsarReader reader) { } } } - object.id = IsarCore.readId(reader); return object; } @isarProtected dynamic deserializeListMeasureProp(IsarReader reader, int property) { switch (property) { + case 0: + return IsarCore.readId(reader); case 1: - return IsarCore.readString(reader, 1); + { + final value = IsarCore.readLong(reader, 1); + if (value == -9223372036854775808) { + return null; + } else { + return value; + } + } case 2: return IsarCore.readString(reader, 2); case 3: - { - final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); - { - final reader = IsarCore.readerPtr; - if (reader.isNull) { - return null; - } else { - final list = List.filled(length, '', growable: true); - for (var i = 0; i < length; i++) { - list[i] = IsarCore.readString(reader, i) ?? ''; - } - IsarCore.freeReader(reader); - return list; - } - } - } + return IsarCore.readString(reader, 3); case 4: { final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); @@ -282,6 +297,23 @@ dynamic deserializeListMeasureProp(IsarReader reader, int property) { case 6: { final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 7: + { + final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr); { final reader = IsarCore.readerPtr; if (reader.isNull) { @@ -306,8 +338,6 @@ dynamic deserializeListMeasureProp(IsarReader reader, int property) { } } } - case 0: - return IsarCore.readId(reader); default: throw ArgumentError('Unknown property: $property'); } @@ -315,7 +345,8 @@ dynamic deserializeListMeasureProp(IsarReader reader, int property) { sealed class _ListMeasureUpdate { bool call({ - required int id, + required int isarId, + int? id, String? name, String? description, }); @@ -328,15 +359,17 @@ class _ListMeasureUpdateImpl implements _ListMeasureUpdate { @override bool call({ - required int id, + required int isarId, + Object? id = ignore, Object? name = ignore, Object? description = ignore, }) { return collection.updateProperties([ - id + isarId ], { - if (name != ignore) 1: name as String?, - if (description != ignore) 2: description as String?, + if (id != ignore) 1: id as int?, + if (name != ignore) 2: name as String?, + if (description != ignore) 3: description as String?, }) > 0; } @@ -344,7 +377,8 @@ class _ListMeasureUpdateImpl implements _ListMeasureUpdate { sealed class _ListMeasureUpdateAll { int call({ - required List id, + required List isarId, + int? id, String? name, String? description, }); @@ -357,13 +391,15 @@ class _ListMeasureUpdateAllImpl implements _ListMeasureUpdateAll { @override int call({ - required List id, + required List isarId, + Object? id = ignore, Object? name = ignore, Object? description = ignore, }) { - return collection.updateProperties(id, { - if (name != ignore) 1: name as String?, - if (description != ignore) 2: description as String?, + return collection.updateProperties(isarId, { + if (id != ignore) 1: id as int?, + if (name != ignore) 2: name as String?, + if (description != ignore) 3: description as String?, }); } } @@ -376,6 +412,7 @@ extension ListMeasureUpdate on IsarCollection { sealed class _ListMeasureQueryUpdate { int call({ + int? id, String? name, String? description, }); @@ -389,12 +426,14 @@ class _ListMeasureQueryUpdateImpl implements _ListMeasureQueryUpdate { @override int call({ + Object? id = ignore, Object? name = ignore, Object? description = ignore, }) { return query.updateProperties(limit: limit, { - if (name != ignore) 1: name as String?, - if (description != ignore) 2: description as String?, + if (id != ignore) 1: id as int?, + if (name != ignore) 2: name as String?, + if (description != ignore) 3: description as String?, }); } } @@ -414,14 +453,16 @@ class _ListMeasureQueryBuilderUpdateImpl implements _ListMeasureQueryUpdate { @override int call({ + Object? id = ignore, Object? name = ignore, Object? description = ignore, }) { final q = query.build(); try { return q.updateProperties(limit: limit, { - if (name != ignore) 1: name as String?, - if (description != ignore) 2: description as String?, + if (id != ignore) 1: id as int?, + if (name != ignore) 2: name as String?, + if (description != ignore) 3: description as String?, }); } finally { q.close(); @@ -440,16 +481,193 @@ extension ListMeasureQueryBuilderUpdate extension ListMeasureQueryFilter on QueryBuilder { - QueryBuilder nameIsNull() { + QueryBuilder isarIdEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + isarIdGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + isarIdGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder isarIdLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + isarIdLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder isarIdBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } + + QueryBuilder idIsNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const IsNullCondition(property: 1)); }); } + QueryBuilder idIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder idEqualTo( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThan( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThanOrEqualTo( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThan( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThanOrEqualTo( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + ), + ); + }); + } + + QueryBuilder idBetween( + int? lower, + int? upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + ), + ); + }); + } + + QueryBuilder nameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + QueryBuilder nameIsNotNull() { return QueryBuilder.apply(not(), (query) { - return query.addFilterCondition(const IsNullCondition(property: 1)); + return query.addFilterCondition(const IsNullCondition(property: 2)); }); } @@ -460,7 +678,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( EqualCondition( - property: 1, + property: 2, value: value, caseSensitive: caseSensitive, ), @@ -475,7 +693,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( GreaterCondition( - property: 1, + property: 2, value: value, caseSensitive: caseSensitive, ), @@ -491,7 +709,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( GreaterOrEqualCondition( - property: 1, + property: 2, value: value, caseSensitive: caseSensitive, ), @@ -506,7 +724,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( LessCondition( - property: 1, + property: 2, value: value, caseSensitive: caseSensitive, ), @@ -522,7 +740,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( LessOrEqualCondition( - property: 1, + property: 2, value: value, caseSensitive: caseSensitive, ), @@ -538,7 +756,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( BetweenCondition( - property: 1, + property: 2, lower: lower, upper: upper, caseSensitive: caseSensitive, @@ -554,7 +772,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( StartsWithCondition( - property: 1, + property: 2, value: value, caseSensitive: caseSensitive, ), @@ -569,7 +787,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( EndsWithCondition( - property: 1, + property: 2, value: value, caseSensitive: caseSensitive, ), @@ -583,7 +801,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( ContainsCondition( - property: 1, + property: 2, value: value, caseSensitive: caseSensitive, ), @@ -597,7 +815,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( MatchesCondition( - property: 1, + property: 2, wildcard: pattern, caseSensitive: caseSensitive, ), @@ -609,7 +827,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( const EqualCondition( - property: 1, + property: 2, value: '', ), ); @@ -621,7 +839,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( const GreaterCondition( - property: 1, + property: 2, value: '', ), ); @@ -631,14 +849,14 @@ extension ListMeasureQueryFilter QueryBuilder descriptionIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const IsNullCondition(property: 2)); + return query.addFilterCondition(const IsNullCondition(property: 3)); }); } QueryBuilder descriptionIsNotNull() { return QueryBuilder.apply(not(), (query) { - return query.addFilterCondition(const IsNullCondition(property: 2)); + return query.addFilterCondition(const IsNullCondition(property: 3)); }); } @@ -650,7 +868,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( EqualCondition( - property: 2, + property: 3, value: value, caseSensitive: caseSensitive, ), @@ -666,7 +884,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( GreaterCondition( - property: 2, + property: 3, value: value, caseSensitive: caseSensitive, ), @@ -682,7 +900,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( GreaterOrEqualCondition( - property: 2, + property: 3, value: value, caseSensitive: caseSensitive, ), @@ -698,7 +916,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( LessCondition( - property: 2, + property: 3, value: value, caseSensitive: caseSensitive, ), @@ -714,7 +932,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( LessOrEqualCondition( - property: 2, + property: 3, value: value, caseSensitive: caseSensitive, ), @@ -731,7 +949,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( BetweenCondition( - property: 2, + property: 3, lower: lower, upper: upper, caseSensitive: caseSensitive, @@ -748,7 +966,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( StartsWithCondition( - property: 2, + property: 3, value: value, caseSensitive: caseSensitive, ), @@ -764,7 +982,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( EndsWithCondition( - property: 2, + property: 3, value: value, caseSensitive: caseSensitive, ), @@ -777,7 +995,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( ContainsCondition( - property: 2, + property: 3, value: value, caseSensitive: caseSensitive, ), @@ -790,7 +1008,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( MatchesCondition( - property: 2, + property: 3, wildcard: pattern, caseSensitive: caseSensitive, ), @@ -803,7 +1021,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( const EqualCondition( - property: 2, + property: 3, value: '', ), ); @@ -815,7 +1033,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( const GreaterCondition( - property: 2, + property: 3, value: '', ), ); @@ -825,14 +1043,14 @@ extension ListMeasureQueryFilter QueryBuilder measureCategoriesIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const IsNullCondition(property: 3)); + return query.addFilterCondition(const IsNullCondition(property: 4)); }); } QueryBuilder measureCategoriesIsNotNull() { return QueryBuilder.apply(not(), (query) { - return query.addFilterCondition(const IsNullCondition(property: 3)); + return query.addFilterCondition(const IsNullCondition(property: 4)); }); } @@ -844,7 +1062,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( EqualCondition( - property: 3, + property: 4, value: value, caseSensitive: caseSensitive, ), @@ -860,7 +1078,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( GreaterCondition( - property: 3, + property: 4, value: value, caseSensitive: caseSensitive, ), @@ -876,7 +1094,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( GreaterOrEqualCondition( - property: 3, + property: 4, value: value, caseSensitive: caseSensitive, ), @@ -892,7 +1110,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( LessCondition( - property: 3, + property: 4, value: value, caseSensitive: caseSensitive, ), @@ -908,7 +1126,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( LessOrEqualCondition( - property: 3, + property: 4, value: value, caseSensitive: caseSensitive, ), @@ -925,7 +1143,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( BetweenCondition( - property: 3, + property: 4, lower: lower, upper: upper, caseSensitive: caseSensitive, @@ -942,7 +1160,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( StartsWithCondition( - property: 3, + property: 4, value: value, caseSensitive: caseSensitive, ), @@ -958,7 +1176,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( EndsWithCondition( - property: 3, + property: 4, value: value, caseSensitive: caseSensitive, ), @@ -972,7 +1190,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( ContainsCondition( - property: 3, + property: 4, value: value, caseSensitive: caseSensitive, ), @@ -986,7 +1204,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( MatchesCondition( - property: 3, + property: 4, wildcard: pattern, caseSensitive: caseSensitive, ), @@ -999,7 +1217,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( const EqualCondition( - property: 3, + property: 4, value: '', ), ); @@ -1011,7 +1229,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( const GreaterCondition( - property: 3, + property: 4, value: '', ), ); @@ -1029,7 +1247,7 @@ extension ListMeasureQueryFilter measureCategoriesIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition( - const GreaterOrEqualCondition(property: 3, value: null), + const GreaterOrEqualCondition(property: 4, value: null), ); }); } @@ -1037,14 +1255,14 @@ extension ListMeasureQueryFilter QueryBuilder measureGroupsIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const IsNullCondition(property: 4)); + return query.addFilterCondition(const IsNullCondition(property: 5)); }); } QueryBuilder measureGroupsIsNotNull() { return QueryBuilder.apply(not(), (query) { - return query.addFilterCondition(const IsNullCondition(property: 4)); + return query.addFilterCondition(const IsNullCondition(property: 5)); }); } @@ -1056,7 +1274,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( EqualCondition( - property: 4, + property: 5, value: value, caseSensitive: caseSensitive, ), @@ -1072,7 +1290,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( GreaterCondition( - property: 4, + property: 5, value: value, caseSensitive: caseSensitive, ), @@ -1088,7 +1306,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( GreaterOrEqualCondition( - property: 4, + property: 5, value: value, caseSensitive: caseSensitive, ), @@ -1104,7 +1322,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( LessCondition( - property: 4, + property: 5, value: value, caseSensitive: caseSensitive, ), @@ -1120,7 +1338,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( LessOrEqualCondition( - property: 4, + property: 5, value: value, caseSensitive: caseSensitive, ), @@ -1137,7 +1355,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( BetweenCondition( - property: 4, + property: 5, lower: lower, upper: upper, caseSensitive: caseSensitive, @@ -1154,7 +1372,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( StartsWithCondition( - property: 4, + property: 5, value: value, caseSensitive: caseSensitive, ), @@ -1170,7 +1388,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( EndsWithCondition( - property: 4, + property: 5, value: value, caseSensitive: caseSensitive, ), @@ -1183,7 +1401,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( ContainsCondition( - property: 4, + property: 5, value: value, caseSensitive: caseSensitive, ), @@ -1196,7 +1414,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( MatchesCondition( - property: 4, + property: 5, wildcard: pattern, caseSensitive: caseSensitive, ), @@ -1209,7 +1427,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( const EqualCondition( - property: 4, + property: 5, value: '', ), ); @@ -1221,7 +1439,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( const GreaterCondition( - property: 4, + property: 5, value: '', ), ); @@ -1239,7 +1457,7 @@ extension ListMeasureQueryFilter measureGroupsIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition( - const GreaterOrEqualCondition(property: 4, value: null), + const GreaterOrEqualCondition(property: 5, value: null), ); }); } @@ -1247,14 +1465,14 @@ extension ListMeasureQueryFilter QueryBuilder measureTypesIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const IsNullCondition(property: 5)); + return query.addFilterCondition(const IsNullCondition(property: 6)); }); } QueryBuilder measureTypesIsNotNull() { return QueryBuilder.apply(not(), (query) { - return query.addFilterCondition(const IsNullCondition(property: 5)); + return query.addFilterCondition(const IsNullCondition(property: 6)); }); } @@ -1266,7 +1484,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( EqualCondition( - property: 5, + property: 6, value: value, caseSensitive: caseSensitive, ), @@ -1282,7 +1500,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( GreaterCondition( - property: 5, + property: 6, value: value, caseSensitive: caseSensitive, ), @@ -1298,7 +1516,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( GreaterOrEqualCondition( - property: 5, + property: 6, value: value, caseSensitive: caseSensitive, ), @@ -1314,7 +1532,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( LessCondition( - property: 5, + property: 6, value: value, caseSensitive: caseSensitive, ), @@ -1330,7 +1548,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( LessOrEqualCondition( - property: 5, + property: 6, value: value, caseSensitive: caseSensitive, ), @@ -1347,7 +1565,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( BetweenCondition( - property: 5, + property: 6, lower: lower, upper: upper, caseSensitive: caseSensitive, @@ -1364,7 +1582,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( StartsWithCondition( - property: 5, + property: 6, value: value, caseSensitive: caseSensitive, ), @@ -1380,7 +1598,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( EndsWithCondition( - property: 5, + property: 6, value: value, caseSensitive: caseSensitive, ), @@ -1393,7 +1611,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( ContainsCondition( - property: 5, + property: 6, value: value, caseSensitive: caseSensitive, ), @@ -1406,7 +1624,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( MatchesCondition( - property: 5, + property: 6, wildcard: pattern, caseSensitive: caseSensitive, ), @@ -1419,7 +1637,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( const EqualCondition( - property: 5, + property: 6, value: '', ), ); @@ -1431,7 +1649,7 @@ extension ListMeasureQueryFilter return QueryBuilder.apply(this, (query) { return query.addFilterCondition( const GreaterCondition( - property: 5, + property: 6, value: '', ), ); @@ -1449,21 +1667,21 @@ extension ListMeasureQueryFilter measureTypesIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition( - const GreaterOrEqualCondition(property: 5, value: null), + const GreaterOrEqualCondition(property: 6, value: null), ); }); } QueryBuilder filesIsNull() { return QueryBuilder.apply(this, (query) { - return query.addFilterCondition(const IsNullCondition(property: 6)); + return query.addFilterCondition(const IsNullCondition(property: 7)); }); } QueryBuilder filesIsNotNull() { return QueryBuilder.apply(not(), (query) { - return query.addFilterCondition(const IsNullCondition(property: 6)); + return query.addFilterCondition(const IsNullCondition(property: 7)); }); } @@ -1477,89 +1695,7 @@ extension ListMeasureQueryFilter filesIsNotEmpty() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition( - const GreaterOrEqualCondition(property: 6, value: null), - ); - }); - } - - QueryBuilder idEqualTo( - int value, - ) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition( - EqualCondition( - property: 0, - value: value, - ), - ); - }); - } - - QueryBuilder idGreaterThan( - int value, - ) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition( - GreaterCondition( - property: 0, - value: value, - ), - ); - }); - } - - QueryBuilder - idGreaterThanOrEqualTo( - int value, - ) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition( - GreaterOrEqualCondition( - property: 0, - value: value, - ), - ); - }); - } - - QueryBuilder idLessThan( - int value, - ) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition( - LessCondition( - property: 0, - value: value, - ), - ); - }); - } - - QueryBuilder - idLessThanOrEqualTo( - int value, - ) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition( - LessOrEqualCondition( - property: 0, - value: value, - ), - ); - }); - } - - QueryBuilder idBetween( - int lower, - int upper, - ) { - return QueryBuilder.apply(this, (query) { - return query.addFilterCondition( - BetweenCondition( - property: 0, - lower: lower, - upper: upper, - ), + const GreaterOrEqualCondition(property: 7, value: null), ); }); } @@ -1570,11 +1706,35 @@ extension ListMeasureQueryObject extension ListMeasureQuerySortBy on QueryBuilder { + QueryBuilder sortByIsarId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder sortByIsarIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } + + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1); + }); + } + + QueryBuilder sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc); + }); + } + QueryBuilder sortByName( {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addSortBy( - 1, + 2, caseSensitive: caseSensitive, ); }); @@ -1584,7 +1744,7 @@ extension ListMeasureQuerySortBy {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addSortBy( - 1, + 2, sort: Sort.desc, caseSensitive: caseSensitive, ); @@ -1595,7 +1755,7 @@ extension ListMeasureQuerySortBy {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addSortBy( - 2, + 3, caseSensitive: caseSensitive, ); }); @@ -1605,251 +1765,275 @@ extension ListMeasureQuerySortBy {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addSortBy( - 2, + 3, sort: Sort.desc, caseSensitive: caseSensitive, ); }); } - - QueryBuilder sortById() { - return QueryBuilder.apply(this, (query) { - return query.addSortBy(0); - }); - } - - QueryBuilder sortByIdDesc() { - return QueryBuilder.apply(this, (query) { - return query.addSortBy(0, sort: Sort.desc); - }); - } } extension ListMeasureQuerySortThenBy on QueryBuilder { + QueryBuilder thenByIsarId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder thenByIsarIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc); + }); + } + QueryBuilder thenByName( {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addSortBy(1, caseSensitive: caseSensitive); - }); - } - - QueryBuilder thenByNameDesc( - {bool caseSensitive = true}) { - return QueryBuilder.apply(this, (query) { - return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); - }); - } - - QueryBuilder thenByDescription( - {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addSortBy(2, caseSensitive: caseSensitive); }); } - QueryBuilder thenByDescriptionDesc( + QueryBuilder thenByNameDesc( {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addSortBy(2, sort: Sort.desc, caseSensitive: caseSensitive); }); } - QueryBuilder thenById() { + QueryBuilder thenByDescription( + {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addSortBy(0); + return query.addSortBy(3, caseSensitive: caseSensitive); }); } - QueryBuilder thenByIdDesc() { + QueryBuilder thenByDescriptionDesc( + {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addSortBy(0, sort: Sort.desc); + return query.addSortBy(3, sort: Sort.desc, caseSensitive: caseSensitive); }); } } extension ListMeasureQueryWhereDistinct on QueryBuilder { - QueryBuilder distinctByName( - {bool caseSensitive = true}) { + QueryBuilder distinctById() { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(1, caseSensitive: caseSensitive); + return query.addDistinctBy(1); }); } - QueryBuilder distinctByDescription( + QueryBuilder distinctByName( {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(2, caseSensitive: caseSensitive); }); } - QueryBuilder - distinctByMeasureCategories() { + QueryBuilder distinctByDescription( + {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { - return query.addDistinctBy(3); + return query.addDistinctBy(3, caseSensitive: caseSensitive); }); } QueryBuilder - distinctByMeasureGroups() { + distinctByMeasureCategories() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(4); }); } QueryBuilder - distinctByMeasureTypes() { + distinctByMeasureGroups() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(5); }); } + + QueryBuilder + distinctByMeasureTypes() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(6); + }); + } } extension ListMeasureQueryProperty1 on QueryBuilder { - QueryBuilder nameProperty() { + QueryBuilder isarIdProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder idProperty() { return QueryBuilder.apply(this, (query) { return query.addProperty(1); }); } - QueryBuilder descriptionProperty() { + QueryBuilder nameProperty() { return QueryBuilder.apply(this, (query) { return query.addProperty(2); }); } - QueryBuilder?, QAfterProperty> - measureCategoriesProperty() { + QueryBuilder descriptionProperty() { return QueryBuilder.apply(this, (query) { return query.addProperty(3); }); } QueryBuilder?, QAfterProperty> - measureGroupsProperty() { + measureCategoriesProperty() { return QueryBuilder.apply(this, (query) { return query.addProperty(4); }); } QueryBuilder?, QAfterProperty> - measureTypesProperty() { + measureGroupsProperty() { return QueryBuilder.apply(this, (query) { return query.addProperty(5); }); } - QueryBuilder?, QAfterProperty> filesProperty() { + QueryBuilder?, QAfterProperty> + measureTypesProperty() { return QueryBuilder.apply(this, (query) { return query.addProperty(6); }); } - QueryBuilder idProperty() { + QueryBuilder?, QAfterProperty> filesProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(0); + return query.addProperty(7); }); } } extension ListMeasureQueryProperty2 on QueryBuilder { - QueryBuilder nameProperty() { + QueryBuilder isarIdProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder idProperty() { return QueryBuilder.apply(this, (query) { return query.addProperty(1); }); } + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + QueryBuilder descriptionProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(2); + return query.addProperty(3); }); } QueryBuilder?), QAfterProperty> measureCategoriesProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(3); + return query.addProperty(4); }); } QueryBuilder?), QAfterProperty> measureGroupsProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(4); + return query.addProperty(5); }); } QueryBuilder?), QAfterProperty> measureTypesProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(5); + return query.addProperty(6); }); } QueryBuilder?), QAfterProperty> filesProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(6); - }); - } - - QueryBuilder idProperty() { - return QueryBuilder.apply(this, (query) { - return query.addProperty(0); + return query.addProperty(7); }); } } extension ListMeasureQueryProperty3 on QueryBuilder { - QueryBuilder nameProperty() { + QueryBuilder isarIdProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder idProperty() { return QueryBuilder.apply(this, (query) { return query.addProperty(1); }); } + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + QueryBuilder descriptionProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(2); + return query.addProperty(3); }); } QueryBuilder?), QOperations> measureCategoriesProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(3); + return query.addProperty(4); }); } QueryBuilder?), QOperations> measureGroupsProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(4); + return query.addProperty(5); }); } QueryBuilder?), QOperations> measureTypesProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(5); + return query.addProperty(6); }); } QueryBuilder?), QOperations> filesProperty() { return QueryBuilder.apply(this, (query) { - return query.addProperty(6); - }); - } - - QueryBuilder idProperty() { - return QueryBuilder.apply(this, (query) { - return query.addProperty(0); + return query.addProperty(7); }); } } @@ -1859,7 +2043,7 @@ extension ListMeasureQueryProperty3 // ************************************************************************** ListMeasure _$ListMeasureFromJson(Map json) => ListMeasure() - ..id = (json['id'] as num).toInt() + ..id = (json['id'] as num?)?.toInt() ..name = json['name'] as String? ..description = json['description'] as String? ..measureCategories = (json['measureCategories'] as List?) diff --git a/lib/src/entity/measure/complete/measure_complete.dart b/lib/src/entity/measure/complete/measure_complete.dart new file mode 100644 index 0000000..8c7ce58 --- /dev/null +++ b/lib/src/entity/measure/complete/measure_complete.dart @@ -0,0 +1,239 @@ +import 'package:ambito/src/entity/_general/file/file_part.dart'; +import 'package:ambito/src/entity/_general/id_value_color/id_value_color.dart'; +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +import '../../_general/file/thumbnail.dart'; +import '../../_general/file/thumbnails.dart'; +import '../../_general/id_value/id_value.dart'; + +part 'measure_complete.g.dart'; + +@JsonSerializable() +@collection +class MeasureComplete { + MeasureComplete({required this.id, required this.name}); + + final int id; + final String name; + FilePart? image; + String? description; + String? target; + List? fundingPrograms; + List? sizeOrArea; + String? growth; + String? climate; + String? soilWater; + String? riskOfSpottedWingDrosophila; + String? thermophilic; + String? frostHardy; + String? lateFrost; + String? drought; + List? soilMoisture; + String? numberLight; + String? numberTemperature; + String? numberMoisture; + String? numberReaction; + String? numberNitrogen; + List? region; + String? location; + String? applyCosts; + String? applyDuration; + List? applyMonths; + List? applyTools; + String? applyAdditionalInfos; + String? applySteps; + List? applyMaterials; + List? gallery; + List? maintenanceMonths; + String? maintenanceAdditionalInfos; + String? maintenanceFrequency; + String? maintenanceSteps; + String? maintenanceSpecialFeatures; + List? maintenanceTools; + String? sources; + + String? costs; + String? costsUnit; + + String? measureType; + List? measureGroups; + List? measureCategories; + + factory MeasureComplete.fromJson(Map json) { + List helper = []; + List helperFiles = []; + + MeasureComplete mc = + MeasureComplete(id: json['id'], name: json['field_3021886']); + if (json['field_2402548'] != null && json['field_2402548'].isNotEmpty) { + mc.image = FilePart.fromJson(json['field_2402548'][0]); + } else { + //mc.image = + } + mc.description = json['field_2402431']; + mc.target = json['field_2402433']; + + if (json['field_2402540'] != null) { + json['field_2402540'].forEach((element) { + final IdValue idv = IdValue.fromJson(element); + helper.add(idv.value!); + }); + } + mc.fundingPrograms = helper; + helper = []; + if (json['field_2402427'] != null) { + json['field_2402427'].forEach((element) { + final IdValueColor idv = IdValueColor.fromJson(element); + helper.add(idv.value!); + }); + } + mc.measureCategories = helper; + mc.measureGroups = [IdValueColor.fromJson(json['field_2402473']).value!]; + mc.measureType = json['field_2402426']; + helper = []; + mc.sizeOrArea = [ + json['field_2402445'], + 'Höhe: ${json['field_2532843']} - ${json['field_2532844']}mm' + ]; + if (json['field_2532846'] != null) { + json['field_2532846'].forEach((element) { + mc.growth = IdValueColor.fromJson(element).value; + }); + } + if (json['field_2532849'] != null) { + mc.climate = IdValueColor.fromJson(json['field_2532849']).value; + } + if (json['field_2532853'] != null) { + mc.soilWater = json['field_2532853']; + } + if (json['field_2532848'] != null) { + mc.riskOfSpottedWingDrosophila = + IdValueColor.fromJson(json['field_2532848']).value; + } + if (json['field_2532860'] != null) { + json['field_2532860'].forEach((element) { + final IdValueColor idv = IdValueColor.fromJson(element); + helper.add(idv.value!); + }); + } + mc.region = helper; + helper = []; + mc.location = json['field_2402444']; + mc.applyCosts = json['field_2402448']; + mc.applyDuration = json['field_2429064']; + if (json['field_2402440'] != null) { + json['field_2402440'].forEach((element) { + final IdValueColor idv = IdValueColor.fromJson(element); + helper.add(idv.value!); + }); + } + mc.applyMonths = helper; + helper = []; + mc.applyAdditionalInfos = json['field_2429782']; + mc.applySteps = json['field_2402443']; + if (json['field_2498056'] != null) { + json['field_2498056'].forEach((element) { + final IdValueColor idv = IdValueColor.fromJson(element); + helper.add(idv.value!); + }); + } + mc.maintenanceMonths = helper; + helper = []; + if (json['field_2429460'] != null) { + json['field_2429460'].forEach((element) { + final IdValueColor idv = IdValueColor.fromJson(element); + helper.add(idv.value!); + }); + } + mc.applyTools = helper; + helper = []; + if (json['field_2428593'] != null) { + json['field_2428593'].forEach((element) { + final IdValueColor idv = IdValueColor.fromJson(element); + helper.add(idv.value!); + }); + } + mc.applyMaterials = helper; + helper = []; + + if (json['field_2402454'] != null) { + json['field_2402454'].forEach((element) { + final IdValueColor idv = IdValueColor.fromJson(element); + helper.add(idv.value!); + }); + } + mc.maintenanceFrequency = helper.join(', '); + helper = []; + mc.maintenanceAdditionalInfos = json['field_2463465']; + mc.maintenanceSteps = json['field_2402452']; + mc.maintenanceSpecialFeatures = json['field_2402455']; + if (json['field_2429972'] != null) { + json['field_2429972'].forEach((element) { + final IdValueColor idv = IdValueColor.fromJson(element); + helper.add(idv.value!); + }); + } + mc.maintenanceTools = helper; + helper = []; + mc.sources = json['field_2402437']; + if (json['field_3021896'] != null) { + json['field_3021896'].forEach((element) { + final FilePart fp = FilePart.fromJson(element); + helperFiles.add(fp); + }); + } + mc.gallery = helperFiles; + helperFiles = []; + + if (json['field_3021904'] != null) { + mc.costsUnit = IdValueColor.fromJson(json['field_3021904']).value; + } + mc.costs = json['field_3021892']; + + return mc; + } + + Map toJson() => _$MeasureCompleteToJson(this); +} + +extension MeasureCompleteExtension on MeasureComplete { + CachedNetworkImage? getFullImage() { + CachedNetworkImage? cachedImage; + if (image != null) { + if (image!.url != null) { + cachedImage = CachedNetworkImage( + imageUrl: image!.url!, + placeholder: (context, url) => const CircularProgressIndicator(), + errorWidget: (context, url, error) => const Icon(Icons.error), + fit: BoxFit.cover, + ); + } + } + return cachedImage; + } + + List? getGalleryThumbnails() { + List? images = []; + if (gallery != null && gallery!.isNotEmpty) { + for (final FilePart image in gallery!) { + if (image.thumbnails?.cardCover?.url != null) { + images.add( + Padding( + padding: const EdgeInsets.all(10), + child: CachedNetworkImage( + imageUrl: image.thumbnails!.cardCover!.url!, + placeholder: (context, url) => + const CircularProgressIndicator(), + errorWidget: (context, url, error) => const Icon(Icons.error), + ), + ), + ); + } + } + } + return (images.isNotEmpty) ? images : null; + } +} diff --git a/lib/src/entity/measure/complete/measure_complete.g.dart b/lib/src/entity/measure/complete/measure_complete.g.dart new file mode 100644 index 0000000..eb4b8c5 --- /dev/null +++ b/lib/src/entity/measure/complete/measure_complete.g.dart @@ -0,0 +1,11996 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'measure_complete.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetMeasureCompleteCollection on Isar { + IsarCollection get measureCompletes => + this.collection(); +} + +const MeasureCompleteSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'MeasureComplete', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'name', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'image', + type: IsarType.object, + target: 'FilePart', + ), + IsarPropertySchema( + name: 'description', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'target', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'fundingPrograms', + type: IsarType.stringList, + ), + IsarPropertySchema( + name: 'sizeOrArea', + type: IsarType.stringList, + ), + IsarPropertySchema( + name: 'growth', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'climate', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'soilWater', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'riskOfSpottedWingDrosophila', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'thermophilic', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'frostHardy', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'lateFrost', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'drought', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'soilMoisture', + type: IsarType.stringList, + ), + IsarPropertySchema( + name: 'numberLight', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'numberTemperature', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'numberMoisture', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'numberReaction', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'numberNitrogen', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'region', + type: IsarType.stringList, + ), + IsarPropertySchema( + name: 'location', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'applyCosts', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'applyDuration', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'applyMonths', + type: IsarType.stringList, + ), + IsarPropertySchema( + name: 'applyTools', + type: IsarType.stringList, + ), + IsarPropertySchema( + name: 'applyAdditionalInfos', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'applySteps', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'applyMaterials', + type: IsarType.stringList, + ), + IsarPropertySchema( + name: 'gallery', + type: IsarType.objectList, + target: 'FilePart', + ), + IsarPropertySchema( + name: 'maintenanceMonths', + type: IsarType.stringList, + ), + IsarPropertySchema( + name: 'maintenanceAdditionalInfos', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'maintenanceFrequency', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'maintenanceSteps', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'maintenanceSpecialFeatures', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'maintenanceTools', + type: IsarType.stringList, + ), + IsarPropertySchema( + name: 'sources', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'costs', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'costsUnit', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'measureType', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'measureGroups', + type: IsarType.stringList, + ), + IsarPropertySchema( + name: 'measureCategories', + type: IsarType.stringList, + ), + ], + indexes: [], + ), + converter: IsarObjectConverter( + serialize: serializeMeasureComplete, + deserialize: deserializeMeasureComplete, + deserializeProperty: deserializeMeasureCompleteProp, + ), + embeddedSchemas: [FilePartSchema, ThumbnailsSchema, ThumbnailSchema], +); + +@isarProtected +int serializeMeasureComplete(IsarWriter writer, MeasureComplete object) { + IsarCore.writeString(writer, 1, object.name); + { + final value = object.image; + if (value == null) { + IsarCore.writeNull(writer, 2); + } else { + final objectWriter = IsarCore.beginObject(writer, 2); + serializeFilePart(objectWriter, value); + IsarCore.endObject(writer, objectWriter); + } + } + { + final value = object.description; + if (value == null) { + IsarCore.writeNull(writer, 3); + } else { + IsarCore.writeString(writer, 3, value); + } + } + { + final value = object.target; + if (value == null) { + IsarCore.writeNull(writer, 4); + } else { + IsarCore.writeString(writer, 4, value); + } + } + { + final list = object.fundingPrograms; + if (list == null) { + IsarCore.writeNull(writer, 5); + } else { + final listWriter = IsarCore.beginList(writer, 5, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.sizeOrArea; + if (list == null) { + IsarCore.writeNull(writer, 6); + } else { + final listWriter = IsarCore.beginList(writer, 6, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.growth; + if (value == null) { + IsarCore.writeNull(writer, 7); + } else { + IsarCore.writeString(writer, 7, value); + } + } + { + final value = object.climate; + if (value == null) { + IsarCore.writeNull(writer, 8); + } else { + IsarCore.writeString(writer, 8, value); + } + } + { + final value = object.soilWater; + if (value == null) { + IsarCore.writeNull(writer, 9); + } else { + IsarCore.writeString(writer, 9, value); + } + } + { + final value = object.riskOfSpottedWingDrosophila; + if (value == null) { + IsarCore.writeNull(writer, 10); + } else { + IsarCore.writeString(writer, 10, value); + } + } + { + final value = object.thermophilic; + if (value == null) { + IsarCore.writeNull(writer, 11); + } else { + IsarCore.writeString(writer, 11, value); + } + } + { + final value = object.frostHardy; + if (value == null) { + IsarCore.writeNull(writer, 12); + } else { + IsarCore.writeString(writer, 12, value); + } + } + { + final value = object.lateFrost; + if (value == null) { + IsarCore.writeNull(writer, 13); + } else { + IsarCore.writeString(writer, 13, value); + } + } + { + final value = object.drought; + if (value == null) { + IsarCore.writeNull(writer, 14); + } else { + IsarCore.writeString(writer, 14, value); + } + } + { + final list = object.soilMoisture; + if (list == null) { + IsarCore.writeNull(writer, 15); + } else { + final listWriter = IsarCore.beginList(writer, 15, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.numberLight; + if (value == null) { + IsarCore.writeNull(writer, 16); + } else { + IsarCore.writeString(writer, 16, value); + } + } + { + final value = object.numberTemperature; + if (value == null) { + IsarCore.writeNull(writer, 17); + } else { + IsarCore.writeString(writer, 17, value); + } + } + { + final value = object.numberMoisture; + if (value == null) { + IsarCore.writeNull(writer, 18); + } else { + IsarCore.writeString(writer, 18, value); + } + } + { + final value = object.numberReaction; + if (value == null) { + IsarCore.writeNull(writer, 19); + } else { + IsarCore.writeString(writer, 19, value); + } + } + { + final value = object.numberNitrogen; + if (value == null) { + IsarCore.writeNull(writer, 20); + } else { + IsarCore.writeString(writer, 20, value); + } + } + { + final list = object.region; + if (list == null) { + IsarCore.writeNull(writer, 21); + } else { + final listWriter = IsarCore.beginList(writer, 21, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.location; + if (value == null) { + IsarCore.writeNull(writer, 22); + } else { + IsarCore.writeString(writer, 22, value); + } + } + { + final value = object.applyCosts; + if (value == null) { + IsarCore.writeNull(writer, 23); + } else { + IsarCore.writeString(writer, 23, value); + } + } + { + final value = object.applyDuration; + if (value == null) { + IsarCore.writeNull(writer, 24); + } else { + IsarCore.writeString(writer, 24, value); + } + } + { + final list = object.applyMonths; + if (list == null) { + IsarCore.writeNull(writer, 25); + } else { + final listWriter = IsarCore.beginList(writer, 25, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.applyTools; + if (list == null) { + IsarCore.writeNull(writer, 26); + } else { + final listWriter = IsarCore.beginList(writer, 26, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.applyAdditionalInfos; + if (value == null) { + IsarCore.writeNull(writer, 27); + } else { + IsarCore.writeString(writer, 27, value); + } + } + { + final value = object.applySteps; + if (value == null) { + IsarCore.writeNull(writer, 28); + } else { + IsarCore.writeString(writer, 28, value); + } + } + { + final list = object.applyMaterials; + if (list == null) { + IsarCore.writeNull(writer, 29); + } else { + final listWriter = IsarCore.beginList(writer, 29, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.gallery; + if (list == null) { + IsarCore.writeNull(writer, 30); + } else { + final listWriter = IsarCore.beginList(writer, 30, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeFilePart(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.maintenanceMonths; + if (list == null) { + IsarCore.writeNull(writer, 31); + } else { + final listWriter = IsarCore.beginList(writer, 31, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.maintenanceAdditionalInfos; + if (value == null) { + IsarCore.writeNull(writer, 32); + } else { + IsarCore.writeString(writer, 32, value); + } + } + { + final value = object.maintenanceFrequency; + if (value == null) { + IsarCore.writeNull(writer, 33); + } else { + IsarCore.writeString(writer, 33, value); + } + } + { + final value = object.maintenanceSteps; + if (value == null) { + IsarCore.writeNull(writer, 34); + } else { + IsarCore.writeString(writer, 34, value); + } + } + { + final value = object.maintenanceSpecialFeatures; + if (value == null) { + IsarCore.writeNull(writer, 35); + } else { + IsarCore.writeString(writer, 35, value); + } + } + { + final list = object.maintenanceTools; + if (list == null) { + IsarCore.writeNull(writer, 36); + } else { + final listWriter = IsarCore.beginList(writer, 36, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.sources; + if (value == null) { + IsarCore.writeNull(writer, 37); + } else { + IsarCore.writeString(writer, 37, value); + } + } + { + final value = object.costs; + if (value == null) { + IsarCore.writeNull(writer, 38); + } else { + IsarCore.writeString(writer, 38, value); + } + } + { + final value = object.costsUnit; + if (value == null) { + IsarCore.writeNull(writer, 39); + } else { + IsarCore.writeString(writer, 39, value); + } + } + { + final value = object.measureType; + if (value == null) { + IsarCore.writeNull(writer, 40); + } else { + IsarCore.writeString(writer, 40, value); + } + } + { + final list = object.measureGroups; + if (list == null) { + IsarCore.writeNull(writer, 41); + } else { + final listWriter = IsarCore.beginList(writer, 41, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.measureCategories; + if (list == null) { + IsarCore.writeNull(writer, 42); + } else { + final listWriter = IsarCore.beginList(writer, 42, list.length); + for (var i = 0; i < list.length; i++) { + IsarCore.writeString(listWriter, i, list[i]); + } + IsarCore.endList(writer, listWriter); + } + } + return object.id; +} + +@isarProtected +MeasureComplete deserializeMeasureComplete(IsarReader reader) { + final int _id; + _id = IsarCore.readId(reader); + final String _name; + _name = IsarCore.readString(reader, 1) ?? ''; + final object = MeasureComplete( + id: _id, + name: _name, + ); + { + final objectReader = IsarCore.readObject(reader, 2); + if (objectReader.isNull) { + object.image = null; + } else { + final embedded = deserializeFilePart(objectReader); + IsarCore.freeReader(objectReader); + object.image = embedded; + } + } + object.description = IsarCore.readString(reader, 3); + object.target = IsarCore.readString(reader, 4); + { + final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.fundingPrograms = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.fundingPrograms = list; + } + } + } + { + final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.sizeOrArea = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.sizeOrArea = list; + } + } + } + object.growth = IsarCore.readString(reader, 7); + object.climate = IsarCore.readString(reader, 8); + object.soilWater = IsarCore.readString(reader, 9); + object.riskOfSpottedWingDrosophila = IsarCore.readString(reader, 10); + object.thermophilic = IsarCore.readString(reader, 11); + object.frostHardy = IsarCore.readString(reader, 12); + object.lateFrost = IsarCore.readString(reader, 13); + object.drought = IsarCore.readString(reader, 14); + { + final length = IsarCore.readList(reader, 15, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.soilMoisture = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.soilMoisture = list; + } + } + } + object.numberLight = IsarCore.readString(reader, 16); + object.numberTemperature = IsarCore.readString(reader, 17); + object.numberMoisture = IsarCore.readString(reader, 18); + object.numberReaction = IsarCore.readString(reader, 19); + object.numberNitrogen = IsarCore.readString(reader, 20); + { + final length = IsarCore.readList(reader, 21, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.region = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.region = list; + } + } + } + object.location = IsarCore.readString(reader, 22); + object.applyCosts = IsarCore.readString(reader, 23); + object.applyDuration = IsarCore.readString(reader, 24); + { + final length = IsarCore.readList(reader, 25, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.applyMonths = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.applyMonths = list; + } + } + } + { + final length = IsarCore.readList(reader, 26, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.applyTools = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.applyTools = list; + } + } + } + object.applyAdditionalInfos = IsarCore.readString(reader, 27); + object.applySteps = IsarCore.readString(reader, 28); + { + final length = IsarCore.readList(reader, 29, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.applyMaterials = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.applyMaterials = list; + } + } + } + { + final length = IsarCore.readList(reader, 30, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.gallery = null; + } else { + final list = List.filled(length, FilePart(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = FilePart(); + } else { + final embedded = deserializeFilePart(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.gallery = list; + } + } + } + { + final length = IsarCore.readList(reader, 31, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.maintenanceMonths = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.maintenanceMonths = list; + } + } + } + object.maintenanceAdditionalInfos = IsarCore.readString(reader, 32); + object.maintenanceFrequency = IsarCore.readString(reader, 33); + object.maintenanceSteps = IsarCore.readString(reader, 34); + object.maintenanceSpecialFeatures = IsarCore.readString(reader, 35); + { + final length = IsarCore.readList(reader, 36, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.maintenanceTools = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.maintenanceTools = list; + } + } + } + object.sources = IsarCore.readString(reader, 37); + object.costs = IsarCore.readString(reader, 38); + object.costsUnit = IsarCore.readString(reader, 39); + object.measureType = IsarCore.readString(reader, 40); + { + final length = IsarCore.readList(reader, 41, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.measureGroups = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.measureGroups = list; + } + } + } + { + final length = IsarCore.readList(reader, 42, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.measureCategories = null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + object.measureCategories = list; + } + } + } + return object; +} + +@isarProtected +dynamic deserializeMeasureCompleteProp(IsarReader reader, int property) { + switch (property) { + case 0: + return IsarCore.readId(reader); + case 1: + return IsarCore.readString(reader, 1) ?? ''; + case 2: + { + final objectReader = IsarCore.readObject(reader, 2); + if (objectReader.isNull) { + return null; + } else { + final embedded = deserializeFilePart(objectReader); + IsarCore.freeReader(objectReader); + return embedded; + } + } + case 3: + return IsarCore.readString(reader, 3); + case 4: + return IsarCore.readString(reader, 4); + case 5: + { + final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 6: + { + final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 7: + return IsarCore.readString(reader, 7); + case 8: + return IsarCore.readString(reader, 8); + case 9: + return IsarCore.readString(reader, 9); + case 10: + return IsarCore.readString(reader, 10); + case 11: + return IsarCore.readString(reader, 11); + case 12: + return IsarCore.readString(reader, 12); + case 13: + return IsarCore.readString(reader, 13); + case 14: + return IsarCore.readString(reader, 14); + case 15: + { + final length = IsarCore.readList(reader, 15, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 16: + return IsarCore.readString(reader, 16); + case 17: + return IsarCore.readString(reader, 17); + case 18: + return IsarCore.readString(reader, 18); + case 19: + return IsarCore.readString(reader, 19); + case 20: + return IsarCore.readString(reader, 20); + case 21: + { + final length = IsarCore.readList(reader, 21, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 22: + return IsarCore.readString(reader, 22); + case 23: + return IsarCore.readString(reader, 23); + case 24: + return IsarCore.readString(reader, 24); + case 25: + { + final length = IsarCore.readList(reader, 25, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 26: + { + final length = IsarCore.readList(reader, 26, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 27: + return IsarCore.readString(reader, 27); + case 28: + return IsarCore.readString(reader, 28); + case 29: + { + final length = IsarCore.readList(reader, 29, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 30: + { + final length = IsarCore.readList(reader, 30, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, FilePart(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = FilePart(); + } else { + final embedded = deserializeFilePart(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 31: + { + final length = IsarCore.readList(reader, 31, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 32: + return IsarCore.readString(reader, 32); + case 33: + return IsarCore.readString(reader, 33); + case 34: + return IsarCore.readString(reader, 34); + case 35: + return IsarCore.readString(reader, 35); + case 36: + { + final length = IsarCore.readList(reader, 36, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 37: + return IsarCore.readString(reader, 37); + case 38: + return IsarCore.readString(reader, 38); + case 39: + return IsarCore.readString(reader, 39); + case 40: + return IsarCore.readString(reader, 40); + case 41: + { + final length = IsarCore.readList(reader, 41, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 42: + { + final length = IsarCore.readList(reader, 42, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, '', growable: true); + for (var i = 0; i < length; i++) { + list[i] = IsarCore.readString(reader, i) ?? ''; + } + IsarCore.freeReader(reader); + return list; + } + } + } + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _MeasureCompleteUpdate { + bool call({ + required int id, + String? name, + String? description, + String? target, + String? growth, + String? climate, + String? soilWater, + String? riskOfSpottedWingDrosophila, + String? thermophilic, + String? frostHardy, + String? lateFrost, + String? drought, + String? numberLight, + String? numberTemperature, + String? numberMoisture, + String? numberReaction, + String? numberNitrogen, + String? location, + String? applyCosts, + String? applyDuration, + String? applyAdditionalInfos, + String? applySteps, + String? maintenanceAdditionalInfos, + String? maintenanceFrequency, + String? maintenanceSteps, + String? maintenanceSpecialFeatures, + String? sources, + String? costs, + String? costsUnit, + String? measureType, + }); +} + +class _MeasureCompleteUpdateImpl implements _MeasureCompleteUpdate { + const _MeasureCompleteUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? name = ignore, + Object? description = ignore, + Object? target = ignore, + Object? growth = ignore, + Object? climate = ignore, + Object? soilWater = ignore, + Object? riskOfSpottedWingDrosophila = ignore, + Object? thermophilic = ignore, + Object? frostHardy = ignore, + Object? lateFrost = ignore, + Object? drought = ignore, + Object? numberLight = ignore, + Object? numberTemperature = ignore, + Object? numberMoisture = ignore, + Object? numberReaction = ignore, + Object? numberNitrogen = ignore, + Object? location = ignore, + Object? applyCosts = ignore, + Object? applyDuration = ignore, + Object? applyAdditionalInfos = ignore, + Object? applySteps = ignore, + Object? maintenanceAdditionalInfos = ignore, + Object? maintenanceFrequency = ignore, + Object? maintenanceSteps = ignore, + Object? maintenanceSpecialFeatures = ignore, + Object? sources = ignore, + Object? costs = ignore, + Object? costsUnit = ignore, + Object? measureType = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (name != ignore) 1: name as String?, + if (description != ignore) 3: description as String?, + if (target != ignore) 4: target as String?, + if (growth != ignore) 7: growth as String?, + if (climate != ignore) 8: climate as String?, + if (soilWater != ignore) 9: soilWater as String?, + if (riskOfSpottedWingDrosophila != ignore) + 10: riskOfSpottedWingDrosophila as String?, + if (thermophilic != ignore) 11: thermophilic as String?, + if (frostHardy != ignore) 12: frostHardy as String?, + if (lateFrost != ignore) 13: lateFrost as String?, + if (drought != ignore) 14: drought as String?, + if (numberLight != ignore) 16: numberLight as String?, + if (numberTemperature != ignore) 17: numberTemperature as String?, + if (numberMoisture != ignore) 18: numberMoisture as String?, + if (numberReaction != ignore) 19: numberReaction as String?, + if (numberNitrogen != ignore) 20: numberNitrogen as String?, + if (location != ignore) 22: location as String?, + if (applyCosts != ignore) 23: applyCosts as String?, + if (applyDuration != ignore) 24: applyDuration as String?, + if (applyAdditionalInfos != ignore) + 27: applyAdditionalInfos as String?, + if (applySteps != ignore) 28: applySteps as String?, + if (maintenanceAdditionalInfos != ignore) + 32: maintenanceAdditionalInfos as String?, + if (maintenanceFrequency != ignore) + 33: maintenanceFrequency as String?, + if (maintenanceSteps != ignore) 34: maintenanceSteps as String?, + if (maintenanceSpecialFeatures != ignore) + 35: maintenanceSpecialFeatures as String?, + if (sources != ignore) 37: sources as String?, + if (costs != ignore) 38: costs as String?, + if (costsUnit != ignore) 39: costsUnit as String?, + if (measureType != ignore) 40: measureType as String?, + }) > + 0; + } +} + +sealed class _MeasureCompleteUpdateAll { + int call({ + required List id, + String? name, + String? description, + String? target, + String? growth, + String? climate, + String? soilWater, + String? riskOfSpottedWingDrosophila, + String? thermophilic, + String? frostHardy, + String? lateFrost, + String? drought, + String? numberLight, + String? numberTemperature, + String? numberMoisture, + String? numberReaction, + String? numberNitrogen, + String? location, + String? applyCosts, + String? applyDuration, + String? applyAdditionalInfos, + String? applySteps, + String? maintenanceAdditionalInfos, + String? maintenanceFrequency, + String? maintenanceSteps, + String? maintenanceSpecialFeatures, + String? sources, + String? costs, + String? costsUnit, + String? measureType, + }); +} + +class _MeasureCompleteUpdateAllImpl implements _MeasureCompleteUpdateAll { + const _MeasureCompleteUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? name = ignore, + Object? description = ignore, + Object? target = ignore, + Object? growth = ignore, + Object? climate = ignore, + Object? soilWater = ignore, + Object? riskOfSpottedWingDrosophila = ignore, + Object? thermophilic = ignore, + Object? frostHardy = ignore, + Object? lateFrost = ignore, + Object? drought = ignore, + Object? numberLight = ignore, + Object? numberTemperature = ignore, + Object? numberMoisture = ignore, + Object? numberReaction = ignore, + Object? numberNitrogen = ignore, + Object? location = ignore, + Object? applyCosts = ignore, + Object? applyDuration = ignore, + Object? applyAdditionalInfos = ignore, + Object? applySteps = ignore, + Object? maintenanceAdditionalInfos = ignore, + Object? maintenanceFrequency = ignore, + Object? maintenanceSteps = ignore, + Object? maintenanceSpecialFeatures = ignore, + Object? sources = ignore, + Object? costs = ignore, + Object? costsUnit = ignore, + Object? measureType = ignore, + }) { + return collection.updateProperties(id, { + if (name != ignore) 1: name as String?, + if (description != ignore) 3: description as String?, + if (target != ignore) 4: target as String?, + if (growth != ignore) 7: growth as String?, + if (climate != ignore) 8: climate as String?, + if (soilWater != ignore) 9: soilWater as String?, + if (riskOfSpottedWingDrosophila != ignore) + 10: riskOfSpottedWingDrosophila as String?, + if (thermophilic != ignore) 11: thermophilic as String?, + if (frostHardy != ignore) 12: frostHardy as String?, + if (lateFrost != ignore) 13: lateFrost as String?, + if (drought != ignore) 14: drought as String?, + if (numberLight != ignore) 16: numberLight as String?, + if (numberTemperature != ignore) 17: numberTemperature as String?, + if (numberMoisture != ignore) 18: numberMoisture as String?, + if (numberReaction != ignore) 19: numberReaction as String?, + if (numberNitrogen != ignore) 20: numberNitrogen as String?, + if (location != ignore) 22: location as String?, + if (applyCosts != ignore) 23: applyCosts as String?, + if (applyDuration != ignore) 24: applyDuration as String?, + if (applyAdditionalInfos != ignore) 27: applyAdditionalInfos as String?, + if (applySteps != ignore) 28: applySteps as String?, + if (maintenanceAdditionalInfos != ignore) + 32: maintenanceAdditionalInfos as String?, + if (maintenanceFrequency != ignore) 33: maintenanceFrequency as String?, + if (maintenanceSteps != ignore) 34: maintenanceSteps as String?, + if (maintenanceSpecialFeatures != ignore) + 35: maintenanceSpecialFeatures as String?, + if (sources != ignore) 37: sources as String?, + if (costs != ignore) 38: costs as String?, + if (costsUnit != ignore) 39: costsUnit as String?, + if (measureType != ignore) 40: measureType as String?, + }); + } +} + +extension MeasureCompleteUpdate on IsarCollection { + _MeasureCompleteUpdate get update => _MeasureCompleteUpdateImpl(this); + + _MeasureCompleteUpdateAll get updateAll => + _MeasureCompleteUpdateAllImpl(this); +} + +sealed class _MeasureCompleteQueryUpdate { + int call({ + String? name, + String? description, + String? target, + String? growth, + String? climate, + String? soilWater, + String? riskOfSpottedWingDrosophila, + String? thermophilic, + String? frostHardy, + String? lateFrost, + String? drought, + String? numberLight, + String? numberTemperature, + String? numberMoisture, + String? numberReaction, + String? numberNitrogen, + String? location, + String? applyCosts, + String? applyDuration, + String? applyAdditionalInfos, + String? applySteps, + String? maintenanceAdditionalInfos, + String? maintenanceFrequency, + String? maintenanceSteps, + String? maintenanceSpecialFeatures, + String? sources, + String? costs, + String? costsUnit, + String? measureType, + }); +} + +class _MeasureCompleteQueryUpdateImpl implements _MeasureCompleteQueryUpdate { + const _MeasureCompleteQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? description = ignore, + Object? target = ignore, + Object? growth = ignore, + Object? climate = ignore, + Object? soilWater = ignore, + Object? riskOfSpottedWingDrosophila = ignore, + Object? thermophilic = ignore, + Object? frostHardy = ignore, + Object? lateFrost = ignore, + Object? drought = ignore, + Object? numberLight = ignore, + Object? numberTemperature = ignore, + Object? numberMoisture = ignore, + Object? numberReaction = ignore, + Object? numberNitrogen = ignore, + Object? location = ignore, + Object? applyCosts = ignore, + Object? applyDuration = ignore, + Object? applyAdditionalInfos = ignore, + Object? applySteps = ignore, + Object? maintenanceAdditionalInfos = ignore, + Object? maintenanceFrequency = ignore, + Object? maintenanceSteps = ignore, + Object? maintenanceSpecialFeatures = ignore, + Object? sources = ignore, + Object? costs = ignore, + Object? costsUnit = ignore, + Object? measureType = ignore, + }) { + return query.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (description != ignore) 3: description as String?, + if (target != ignore) 4: target as String?, + if (growth != ignore) 7: growth as String?, + if (climate != ignore) 8: climate as String?, + if (soilWater != ignore) 9: soilWater as String?, + if (riskOfSpottedWingDrosophila != ignore) + 10: riskOfSpottedWingDrosophila as String?, + if (thermophilic != ignore) 11: thermophilic as String?, + if (frostHardy != ignore) 12: frostHardy as String?, + if (lateFrost != ignore) 13: lateFrost as String?, + if (drought != ignore) 14: drought as String?, + if (numberLight != ignore) 16: numberLight as String?, + if (numberTemperature != ignore) 17: numberTemperature as String?, + if (numberMoisture != ignore) 18: numberMoisture as String?, + if (numberReaction != ignore) 19: numberReaction as String?, + if (numberNitrogen != ignore) 20: numberNitrogen as String?, + if (location != ignore) 22: location as String?, + if (applyCosts != ignore) 23: applyCosts as String?, + if (applyDuration != ignore) 24: applyDuration as String?, + if (applyAdditionalInfos != ignore) 27: applyAdditionalInfos as String?, + if (applySteps != ignore) 28: applySteps as String?, + if (maintenanceAdditionalInfos != ignore) + 32: maintenanceAdditionalInfos as String?, + if (maintenanceFrequency != ignore) 33: maintenanceFrequency as String?, + if (maintenanceSteps != ignore) 34: maintenanceSteps as String?, + if (maintenanceSpecialFeatures != ignore) + 35: maintenanceSpecialFeatures as String?, + if (sources != ignore) 37: sources as String?, + if (costs != ignore) 38: costs as String?, + if (costsUnit != ignore) 39: costsUnit as String?, + if (measureType != ignore) 40: measureType as String?, + }); + } +} + +extension MeasureCompleteQueryUpdate on IsarQuery { + _MeasureCompleteQueryUpdate get updateFirst => + _MeasureCompleteQueryUpdateImpl(this, limit: 1); + + _MeasureCompleteQueryUpdate get updateAll => + _MeasureCompleteQueryUpdateImpl(this); +} + +class _MeasureCompleteQueryBuilderUpdateImpl + implements _MeasureCompleteQueryUpdate { + const _MeasureCompleteQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? description = ignore, + Object? target = ignore, + Object? growth = ignore, + Object? climate = ignore, + Object? soilWater = ignore, + Object? riskOfSpottedWingDrosophila = ignore, + Object? thermophilic = ignore, + Object? frostHardy = ignore, + Object? lateFrost = ignore, + Object? drought = ignore, + Object? numberLight = ignore, + Object? numberTemperature = ignore, + Object? numberMoisture = ignore, + Object? numberReaction = ignore, + Object? numberNitrogen = ignore, + Object? location = ignore, + Object? applyCosts = ignore, + Object? applyDuration = ignore, + Object? applyAdditionalInfos = ignore, + Object? applySteps = ignore, + Object? maintenanceAdditionalInfos = ignore, + Object? maintenanceFrequency = ignore, + Object? maintenanceSteps = ignore, + Object? maintenanceSpecialFeatures = ignore, + Object? sources = ignore, + Object? costs = ignore, + Object? costsUnit = ignore, + Object? measureType = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (description != ignore) 3: description as String?, + if (target != ignore) 4: target as String?, + if (growth != ignore) 7: growth as String?, + if (climate != ignore) 8: climate as String?, + if (soilWater != ignore) 9: soilWater as String?, + if (riskOfSpottedWingDrosophila != ignore) + 10: riskOfSpottedWingDrosophila as String?, + if (thermophilic != ignore) 11: thermophilic as String?, + if (frostHardy != ignore) 12: frostHardy as String?, + if (lateFrost != ignore) 13: lateFrost as String?, + if (drought != ignore) 14: drought as String?, + if (numberLight != ignore) 16: numberLight as String?, + if (numberTemperature != ignore) 17: numberTemperature as String?, + if (numberMoisture != ignore) 18: numberMoisture as String?, + if (numberReaction != ignore) 19: numberReaction as String?, + if (numberNitrogen != ignore) 20: numberNitrogen as String?, + if (location != ignore) 22: location as String?, + if (applyCosts != ignore) 23: applyCosts as String?, + if (applyDuration != ignore) 24: applyDuration as String?, + if (applyAdditionalInfos != ignore) 27: applyAdditionalInfos as String?, + if (applySteps != ignore) 28: applySteps as String?, + if (maintenanceAdditionalInfos != ignore) + 32: maintenanceAdditionalInfos as String?, + if (maintenanceFrequency != ignore) 33: maintenanceFrequency as String?, + if (maintenanceSteps != ignore) 34: maintenanceSteps as String?, + if (maintenanceSpecialFeatures != ignore) + 35: maintenanceSpecialFeatures as String?, + if (sources != ignore) 37: sources as String?, + if (costs != ignore) 38: costs as String?, + if (costsUnit != ignore) 39: costsUnit as String?, + if (measureType != ignore) 40: measureType as String?, + }); + } finally { + q.close(); + } + } +} + +extension MeasureCompleteQueryBuilderUpdate + on QueryBuilder { + _MeasureCompleteQueryUpdate get updateFirst => + _MeasureCompleteQueryBuilderUpdateImpl(this, limit: 1); + + _MeasureCompleteQueryUpdate get updateAll => + _MeasureCompleteQueryBuilderUpdateImpl(this); +} + +extension MeasureCompleteQueryFilter + on QueryBuilder { + QueryBuilder + idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } + + QueryBuilder + nameEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + nameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + imageIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + imageIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + descriptionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + descriptionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + descriptionEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 3, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 3, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder + descriptionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder + targetIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + targetIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + targetEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + targetGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + targetGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + targetLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + targetLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + targetBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 4, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + targetStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + targetEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + targetContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + targetMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 4, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + targetIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 4, + value: '', + ), + ); + }); + } + + QueryBuilder + targetIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 4, + value: '', + ), + ); + }); + } + + QueryBuilder + fundingProgramsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + fundingProgramsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + fundingProgramsElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 5, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 5, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder + fundingProgramsElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder + fundingProgramsIsEmpty() { + return not().group( + (q) => q.fundingProgramsIsNull().or().fundingProgramsIsNotEmpty(), + ); + } + + QueryBuilder + fundingProgramsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 5, value: null), + ); + }); + } + + QueryBuilder + sizeOrAreaIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder + sizeOrAreaIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder + sizeOrAreaElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 6, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 6, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder + sizeOrAreaElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder + sizeOrAreaIsEmpty() { + return not().group( + (q) => q.sizeOrAreaIsNull().or().sizeOrAreaIsNotEmpty(), + ); + } + + QueryBuilder + sizeOrAreaIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 6, value: null), + ); + }); + } + + QueryBuilder + growthIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder + growthIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder + growthEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + growthGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + growthGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + growthLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + growthLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + growthBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 7, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + growthStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + growthEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + growthContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + growthMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 7, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + growthIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 7, + value: '', + ), + ); + }); + } + + QueryBuilder + growthIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 7, + value: '', + ), + ); + }); + } + + QueryBuilder + climateIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder + climateIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder + climateEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + climateGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + climateGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + climateLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + climateLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + climateBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 8, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + climateStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + climateEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + climateContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + climateMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 8, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + climateIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 8, + value: '', + ), + ); + }); + } + + QueryBuilder + climateIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 8, + value: '', + ), + ); + }); + } + + QueryBuilder + soilWaterIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder + soilWaterIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder + soilWaterEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilWaterGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilWaterGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilWaterLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilWaterLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilWaterBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 9, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilWaterStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilWaterEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilWaterContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilWaterMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 9, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilWaterIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 9, + value: '', + ), + ); + }); + } + + QueryBuilder + soilWaterIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 9, + value: '', + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 10, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 10, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 10, + value: '', + ), + ); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 10, + value: '', + ), + ); + }); + } + + QueryBuilder + thermophilicIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 11)); + }); + } + + QueryBuilder + thermophilicIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 11)); + }); + } + + QueryBuilder + thermophilicEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + thermophilicGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + thermophilicGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + thermophilicLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + thermophilicLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + thermophilicBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 11, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + thermophilicStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + thermophilicEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + thermophilicContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + thermophilicMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 11, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + thermophilicIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 11, + value: '', + ), + ); + }); + } + + QueryBuilder + thermophilicIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 11, + value: '', + ), + ); + }); + } + + QueryBuilder + frostHardyIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 12)); + }); + } + + QueryBuilder + frostHardyIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 12)); + }); + } + + QueryBuilder + frostHardyEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + frostHardyGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + frostHardyGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + frostHardyLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + frostHardyLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + frostHardyBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 12, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + frostHardyStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + frostHardyEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + frostHardyContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + frostHardyMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 12, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + frostHardyIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 12, + value: '', + ), + ); + }); + } + + QueryBuilder + frostHardyIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 12, + value: '', + ), + ); + }); + } + + QueryBuilder + lateFrostIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 13)); + }); + } + + QueryBuilder + lateFrostIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 13)); + }); + } + + QueryBuilder + lateFrostEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + lateFrostGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + lateFrostGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + lateFrostLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + lateFrostLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + lateFrostBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 13, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + lateFrostStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + lateFrostEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + lateFrostContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + lateFrostMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 13, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + lateFrostIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 13, + value: '', + ), + ); + }); + } + + QueryBuilder + lateFrostIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 13, + value: '', + ), + ); + }); + } + + QueryBuilder + droughtIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 14)); + }); + } + + QueryBuilder + droughtIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 14)); + }); + } + + QueryBuilder + droughtEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + droughtGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + droughtGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + droughtLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + droughtLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + droughtBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 14, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + droughtStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + droughtEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + droughtContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + droughtMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 14, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + droughtIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 14, + value: '', + ), + ); + }); + } + + QueryBuilder + droughtIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 14, + value: '', + ), + ); + }); + } + + QueryBuilder + soilMoistureIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 15)); + }); + } + + QueryBuilder + soilMoistureIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 15)); + }); + } + + QueryBuilder + soilMoistureElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilMoistureElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilMoistureElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilMoistureElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilMoistureElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilMoistureElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 15, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilMoistureElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilMoistureElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilMoistureElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilMoistureElementMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 15, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + soilMoistureElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 15, + value: '', + ), + ); + }); + } + + QueryBuilder + soilMoistureElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 15, + value: '', + ), + ); + }); + } + + QueryBuilder + soilMoistureIsEmpty() { + return not().group( + (q) => q.soilMoistureIsNull().or().soilMoistureIsNotEmpty(), + ); + } + + QueryBuilder + soilMoistureIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 15, value: null), + ); + }); + } + + QueryBuilder + numberLightIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 16)); + }); + } + + QueryBuilder + numberLightIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 16)); + }); + } + + QueryBuilder + numberLightEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLightGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLightGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLightLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLightLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLightBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 16, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLightStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLightEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLightContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLightMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 16, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLightIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 16, + value: '', + ), + ); + }); + } + + QueryBuilder + numberLightIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 16, + value: '', + ), + ); + }); + } + + QueryBuilder + numberTemperatureIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 17)); + }); + } + + QueryBuilder + numberTemperatureIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 17)); + }); + } + + QueryBuilder + numberTemperatureEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberTemperatureGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberTemperatureGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberTemperatureLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberTemperatureLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberTemperatureBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 17, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberTemperatureStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberTemperatureEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberTemperatureContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberTemperatureMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 17, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberTemperatureIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 17, + value: '', + ), + ); + }); + } + + QueryBuilder + numberTemperatureIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 17, + value: '', + ), + ); + }); + } + + QueryBuilder + numberMoistureIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 18)); + }); + } + + QueryBuilder + numberMoistureIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 18)); + }); + } + + QueryBuilder + numberMoistureEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMoistureGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMoistureGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMoistureLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMoistureLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMoistureBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 18, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMoistureStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMoistureEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMoistureContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMoistureMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 18, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMoistureIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 18, + value: '', + ), + ); + }); + } + + QueryBuilder + numberMoistureIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 18, + value: '', + ), + ); + }); + } + + QueryBuilder + numberReactionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 19)); + }); + } + + QueryBuilder + numberReactionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 19)); + }); + } + + QueryBuilder + numberReactionEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberReactionGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberReactionGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberReactionLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberReactionLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberReactionBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 19, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberReactionStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberReactionEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberReactionContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberReactionMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 19, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberReactionIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 19, + value: '', + ), + ); + }); + } + + QueryBuilder + numberReactionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 19, + value: '', + ), + ); + }); + } + + QueryBuilder + numberNitrogenIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 20)); + }); + } + + QueryBuilder + numberNitrogenIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 20)); + }); + } + + QueryBuilder + numberNitrogenEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberNitrogenGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberNitrogenGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberNitrogenLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberNitrogenLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberNitrogenBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 20, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberNitrogenStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberNitrogenEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberNitrogenContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberNitrogenMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 20, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberNitrogenIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 20, + value: '', + ), + ); + }); + } + + QueryBuilder + numberNitrogenIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 20, + value: '', + ), + ); + }); + } + + QueryBuilder + regionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 21)); + }); + } + + QueryBuilder + regionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 21)); + }); + } + + QueryBuilder + regionElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 21, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionElementMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 21, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 21, + value: '', + ), + ); + }); + } + + QueryBuilder + regionElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 21, + value: '', + ), + ); + }); + } + + QueryBuilder + regionIsEmpty() { + return not().group( + (q) => q.regionIsNull().or().regionIsNotEmpty(), + ); + } + + QueryBuilder + regionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 21, value: null), + ); + }); + } + + QueryBuilder + locationIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 22)); + }); + } + + QueryBuilder + locationIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 22)); + }); + } + + QueryBuilder + locationEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + locationGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + locationGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + locationLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + locationLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + locationBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 22, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + locationStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + locationEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + locationContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + locationMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 22, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + locationIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 22, + value: '', + ), + ); + }); + } + + QueryBuilder + locationIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 22, + value: '', + ), + ); + }); + } + + QueryBuilder + applyCostsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 23)); + }); + } + + QueryBuilder + applyCostsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 23)); + }); + } + + QueryBuilder + applyCostsEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyCostsGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyCostsGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyCostsLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyCostsLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyCostsBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 23, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyCostsStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyCostsEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyCostsContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyCostsMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 23, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyCostsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 23, + value: '', + ), + ); + }); + } + + QueryBuilder + applyCostsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 23, + value: '', + ), + ); + }); + } + + QueryBuilder + applyDurationIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 24)); + }); + } + + QueryBuilder + applyDurationIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 24)); + }); + } + + QueryBuilder + applyDurationEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyDurationGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyDurationGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyDurationLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyDurationLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyDurationBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 24, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyDurationStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyDurationEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyDurationContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyDurationMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 24, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyDurationIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 24, + value: '', + ), + ); + }); + } + + QueryBuilder + applyDurationIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 24, + value: '', + ), + ); + }); + } + + QueryBuilder + applyMonthsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 25)); + }); + } + + QueryBuilder + applyMonthsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 25)); + }); + } + + QueryBuilder + applyMonthsElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 25, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMonthsElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 25, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMonthsElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 25, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMonthsElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 25, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMonthsElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 25, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMonthsElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 25, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMonthsElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 25, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMonthsElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 25, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMonthsElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 25, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMonthsElementMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 25, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMonthsElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 25, + value: '', + ), + ); + }); + } + + QueryBuilder + applyMonthsElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 25, + value: '', + ), + ); + }); + } + + QueryBuilder + applyMonthsIsEmpty() { + return not().group( + (q) => q.applyMonthsIsNull().or().applyMonthsIsNotEmpty(), + ); + } + + QueryBuilder + applyMonthsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 25, value: null), + ); + }); + } + + QueryBuilder + applyToolsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 26)); + }); + } + + QueryBuilder + applyToolsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 26)); + }); + } + + QueryBuilder + applyToolsElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 26, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyToolsElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 26, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyToolsElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 26, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyToolsElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 26, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyToolsElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 26, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyToolsElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 26, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyToolsElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 26, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyToolsElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 26, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyToolsElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 26, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyToolsElementMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 26, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyToolsElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 26, + value: '', + ), + ); + }); + } + + QueryBuilder + applyToolsElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 26, + value: '', + ), + ); + }); + } + + QueryBuilder + applyToolsIsEmpty() { + return not().group( + (q) => q.applyToolsIsNull().or().applyToolsIsNotEmpty(), + ); + } + + QueryBuilder + applyToolsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 26, value: null), + ); + }); + } + + QueryBuilder + applyAdditionalInfosIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 27)); + }); + } + + QueryBuilder + applyAdditionalInfosIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 27)); + }); + } + + QueryBuilder + applyAdditionalInfosEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 27, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 27, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 27, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 27, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 27, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 27, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 27, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 27, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 27, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 27, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 27, + value: '', + ), + ); + }); + } + + QueryBuilder + applyAdditionalInfosIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 27, + value: '', + ), + ); + }); + } + + QueryBuilder + applyStepsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 28)); + }); + } + + QueryBuilder + applyStepsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 28)); + }); + } + + QueryBuilder + applyStepsEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 28, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyStepsGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 28, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyStepsGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 28, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyStepsLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 28, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyStepsLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 28, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyStepsBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 28, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyStepsStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 28, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyStepsEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 28, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyStepsContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 28, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyStepsMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 28, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyStepsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 28, + value: '', + ), + ); + }); + } + + QueryBuilder + applyStepsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 28, + value: '', + ), + ); + }); + } + + QueryBuilder + applyMaterialsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 29)); + }); + } + + QueryBuilder + applyMaterialsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 29)); + }); + } + + QueryBuilder + applyMaterialsElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 29, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 29, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 29, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 29, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 29, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 29, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 29, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 29, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 29, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 29, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 29, + value: '', + ), + ); + }); + } + + QueryBuilder + applyMaterialsElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 29, + value: '', + ), + ); + }); + } + + QueryBuilder + applyMaterialsIsEmpty() { + return not().group( + (q) => q.applyMaterialsIsNull().or().applyMaterialsIsNotEmpty(), + ); + } + + QueryBuilder + applyMaterialsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 29, value: null), + ); + }); + } + + QueryBuilder + galleryIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 30)); + }); + } + + QueryBuilder + galleryIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 30)); + }); + } + + QueryBuilder + galleryIsEmpty() { + return not().group( + (q) => q.galleryIsNull().or().galleryIsNotEmpty(), + ); + } + + QueryBuilder + galleryIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 30, value: null), + ); + }); + } + + QueryBuilder + maintenanceMonthsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 31)); + }); + } + + QueryBuilder + maintenanceMonthsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 31)); + }); + } + + QueryBuilder + maintenanceMonthsElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 31, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 31, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 31, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 31, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 31, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 31, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 31, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 31, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 31, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 31, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 31, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 31, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceMonthsIsEmpty() { + return not().group( + (q) => q.maintenanceMonthsIsNull().or().maintenanceMonthsIsNotEmpty(), + ); + } + + QueryBuilder + maintenanceMonthsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 31, value: null), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 32)); + }); + } + + QueryBuilder + maintenanceAdditionalInfosIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 32)); + }); + } + + QueryBuilder + maintenanceAdditionalInfosEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 32, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 32, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 32, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 32, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 32, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 32, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 32, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 32, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 32, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 32, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 32, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceAdditionalInfosIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 32, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 33)); + }); + } + + QueryBuilder + maintenanceFrequencyIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 33)); + }); + } + + QueryBuilder + maintenanceFrequencyEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 33, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 33, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 33, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 33, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 33, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 33, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 33, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 33, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 33, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 33, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 33, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceFrequencyIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 33, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceStepsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 34)); + }); + } + + QueryBuilder + maintenanceStepsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 34)); + }); + } + + QueryBuilder + maintenanceStepsEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 34, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceStepsGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 34, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceStepsGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 34, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceStepsLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 34, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceStepsLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 34, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceStepsBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 34, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceStepsStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 34, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceStepsEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 34, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceStepsContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 34, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceStepsMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 34, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceStepsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 34, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceStepsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 34, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 35)); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 35)); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 35, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 35, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 35, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 35, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 35, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 35, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 35, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 35, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 35, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 35, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 35, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 35, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceToolsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 36)); + }); + } + + QueryBuilder + maintenanceToolsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 36)); + }); + } + + QueryBuilder + maintenanceToolsElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 36, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 36, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 36, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 36, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 36, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 36, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 36, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 36, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 36, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 36, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 36, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceToolsElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 36, + value: '', + ), + ); + }); + } + + QueryBuilder + maintenanceToolsIsEmpty() { + return not().group( + (q) => q.maintenanceToolsIsNull().or().maintenanceToolsIsNotEmpty(), + ); + } + + QueryBuilder + maintenanceToolsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 36, value: null), + ); + }); + } + + QueryBuilder + sourcesIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 37)); + }); + } + + QueryBuilder + sourcesIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 37)); + }); + } + + QueryBuilder + sourcesEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 37, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sourcesGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 37, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sourcesGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 37, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sourcesLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 37, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sourcesLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 37, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sourcesBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 37, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sourcesStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 37, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sourcesEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 37, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sourcesContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 37, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sourcesMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 37, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + sourcesIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 37, + value: '', + ), + ); + }); + } + + QueryBuilder + sourcesIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 37, + value: '', + ), + ); + }); + } + + QueryBuilder + costsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 38)); + }); + } + + QueryBuilder + costsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 38)); + }); + } + + QueryBuilder + costsEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 38, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 38, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 38, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 38, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 38, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 38, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 38, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 38, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 38, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 38, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 38, + value: '', + ), + ); + }); + } + + QueryBuilder + costsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 38, + value: '', + ), + ); + }); + } + + QueryBuilder + costsUnitIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 39)); + }); + } + + QueryBuilder + costsUnitIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 39)); + }); + } + + QueryBuilder + costsUnitEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 39, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsUnitGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 39, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsUnitGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 39, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsUnitLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 39, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsUnitLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 39, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsUnitBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 39, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsUnitStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 39, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsUnitEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 39, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsUnitContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 39, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsUnitMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 39, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsUnitIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 39, + value: '', + ), + ); + }); + } + + QueryBuilder + costsUnitIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 39, + value: '', + ), + ); + }); + } + + QueryBuilder + measureTypeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 40)); + }); + } + + QueryBuilder + measureTypeIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 40)); + }); + } + + QueryBuilder + measureTypeEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 40, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureTypeGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 40, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureTypeGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 40, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureTypeLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 40, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureTypeLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 40, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureTypeBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 40, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureTypeStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 40, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureTypeEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 40, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureTypeContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 40, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureTypeMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 40, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureTypeIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 40, + value: '', + ), + ); + }); + } + + QueryBuilder + measureTypeIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 40, + value: '', + ), + ); + }); + } + + QueryBuilder + measureGroupsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 41)); + }); + } + + QueryBuilder + measureGroupsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 41)); + }); + } + + QueryBuilder + measureGroupsElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 41, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGroupsElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 41, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGroupsElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 41, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGroupsElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 41, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGroupsElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 41, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGroupsElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 41, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGroupsElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 41, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGroupsElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 41, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGroupsElementContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 41, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGroupsElementMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 41, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGroupsElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 41, + value: '', + ), + ); + }); + } + + QueryBuilder + measureGroupsElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 41, + value: '', + ), + ); + }); + } + + QueryBuilder + measureGroupsIsEmpty() { + return not().group( + (q) => q.measureGroupsIsNull().or().measureGroupsIsNotEmpty(), + ); + } + + QueryBuilder + measureGroupsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 41, value: null), + ); + }); + } + + QueryBuilder + measureCategoriesIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 42)); + }); + } + + QueryBuilder + measureCategoriesIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 42)); + }); + } + + QueryBuilder + measureCategoriesElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 42, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementGreaterThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 42, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementGreaterThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 42, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementLessThan( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 42, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementLessThanOrEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 42, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementBetween( + String lower, + String upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 42, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 42, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 42, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 42, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 42, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 42, + value: '', + ), + ); + }); + } + + QueryBuilder + measureCategoriesElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 42, + value: '', + ), + ); + }); + } + + QueryBuilder + measureCategoriesIsEmpty() { + return not().group( + (q) => q.measureCategoriesIsNull().or().measureCategoriesIsNotEmpty(), + ); + } + + QueryBuilder + measureCategoriesIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 42, value: null), + ); + }); + } +} + +extension MeasureCompleteQueryObject + on QueryBuilder { + QueryBuilder image( + FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, 2); + }); + } +} + +extension MeasureCompleteQuerySortBy + on QueryBuilder { + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } + + QueryBuilder sortByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByDescription({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByDescriptionDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByTarget( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 4, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByTargetDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 4, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByGrowth( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 7, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByGrowthDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 7, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByClimate( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 8, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByClimateDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 8, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortBySoilWater( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 9, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortBySoilWaterDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 9, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByRiskOfSpottedWingDrosophila({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 10, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByRiskOfSpottedWingDrosophilaDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 10, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByThermophilic({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 11, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByThermophilicDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 11, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByFrostHardy( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 12, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByFrostHardyDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 12, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByLateFrost( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 13, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByLateFrostDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 13, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByDrought( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 14, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByDroughtDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 14, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNumberLight({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 16, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNumberLightDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 16, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNumberTemperature({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 17, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNumberTemperatureDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 17, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNumberMoisture({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 18, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNumberMoistureDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 18, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNumberReaction({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 19, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNumberReactionDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 19, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNumberNitrogen({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 20, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNumberNitrogenDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 20, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByLocation( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 22, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByLocationDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 22, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByApplyCosts( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 23, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByApplyCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 23, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByApplyDuration({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 24, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByApplyDurationDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 24, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByApplyAdditionalInfos({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 27, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByApplyAdditionalInfosDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 27, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByApplySteps( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 28, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByApplyStepsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 28, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMaintenanceAdditionalInfos({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 32, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMaintenanceAdditionalInfosDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 32, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMaintenanceFrequency({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 33, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMaintenanceFrequencyDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 33, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMaintenanceSteps({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 34, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMaintenanceStepsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 34, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMaintenanceSpecialFeatures({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 35, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMaintenanceSpecialFeaturesDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 35, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortBySources( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 37, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortBySourcesDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 37, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByCosts( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 38, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByCostsDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 38, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByCostsUnit( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 39, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByCostsUnitDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 39, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMeasureType({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 40, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMeasureTypeDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 40, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } +} + +extension MeasureCompleteQuerySortThenBy + on QueryBuilder { + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } + + QueryBuilder thenByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByDescription({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByDescriptionDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByTarget( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(4, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByTargetDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(4, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByGrowth( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(7, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByGrowthDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(7, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByClimate( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(8, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByClimateDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(8, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenBySoilWater( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(9, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenBySoilWaterDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(9, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByRiskOfSpottedWingDrosophila({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(10, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByRiskOfSpottedWingDrosophilaDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(10, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByThermophilic({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByThermophilicDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByFrostHardy( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(12, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByFrostHardyDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(12, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByLateFrost( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(13, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByLateFrostDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(13, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByDrought( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(14, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByDroughtDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(14, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNumberLight({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(16, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNumberLightDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(16, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNumberTemperature({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(17, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNumberTemperatureDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(17, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNumberMoisture({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(18, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNumberMoistureDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(18, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNumberReaction({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(19, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNumberReactionDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(19, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNumberNitrogen({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(20, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNumberNitrogenDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(20, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByLocation( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(22, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByLocationDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(22, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByApplyCosts( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(23, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByApplyCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(23, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByApplyDuration({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(24, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByApplyDurationDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(24, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByApplyAdditionalInfos({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(27, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByApplyAdditionalInfosDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(27, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByApplySteps( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(28, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByApplyStepsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(28, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMaintenanceAdditionalInfos({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(32, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMaintenanceAdditionalInfosDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(32, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMaintenanceFrequency({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(33, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMaintenanceFrequencyDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(33, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMaintenanceSteps({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(34, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMaintenanceStepsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(34, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMaintenanceSpecialFeatures({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(35, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMaintenanceSpecialFeaturesDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(35, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenBySources( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(37, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenBySourcesDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(37, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByCosts( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(38, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByCostsDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(38, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByCostsUnit( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(39, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByCostsUnitDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(39, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMeasureType({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(40, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMeasureTypeDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(40, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } +} + +extension MeasureCompleteQueryWhereDistinct + on QueryBuilder { + QueryBuilder distinctByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByDescription({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByTarget({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(4, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByFundingPrograms() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(5); + }); + } + + QueryBuilder + distinctBySizeOrArea() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(6); + }); + } + + QueryBuilder + distinctByGrowth({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(7, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByClimate({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(8, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctBySoilWater({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(9, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByRiskOfSpottedWingDrosophila({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(10, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByThermophilic({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(11, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByFrostHardy({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(12, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByLateFrost({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(13, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByDrought({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(14, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctBySoilMoisture() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(15); + }); + } + + QueryBuilder + distinctByNumberLight({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(16, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByNumberTemperature({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(17, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByNumberMoisture({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(18, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByNumberReaction({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(19, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByNumberNitrogen({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(20, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByRegion() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(21); + }); + } + + QueryBuilder + distinctByLocation({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(22, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByApplyCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(23, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByApplyDuration({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(24, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByApplyMonths() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(25); + }); + } + + QueryBuilder + distinctByApplyTools() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(26); + }); + } + + QueryBuilder + distinctByApplyAdditionalInfos({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(27, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByApplySteps({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(28, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByApplyMaterials() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(29); + }); + } + + QueryBuilder + distinctByMaintenanceMonths() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(31); + }); + } + + QueryBuilder + distinctByMaintenanceAdditionalInfos({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(32, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByMaintenanceFrequency({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(33, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByMaintenanceSteps({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(34, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByMaintenanceSpecialFeatures({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(35, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByMaintenanceTools() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(36); + }); + } + + QueryBuilder + distinctBySources({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(37, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(38, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByCostsUnit({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(39, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByMeasureType({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(40, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByMeasureGroups() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(41); + }); + } + + QueryBuilder + distinctByMeasureCategories() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(42); + }); + } +} + +extension MeasureCompleteQueryProperty1 + on QueryBuilder { + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder imageProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder descriptionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder targetProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?, QAfterProperty> + fundingProgramsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder?, QAfterProperty> + sizeOrAreaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder growthProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder climateProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder soilWaterProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + thermophilicProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder frostHardyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder lateFrostProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder droughtProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } + + QueryBuilder?, QAfterProperty> + soilMoistureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(15); + }); + } + + QueryBuilder numberLightProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(16); + }); + } + + QueryBuilder + numberTemperatureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(17); + }); + } + + QueryBuilder + numberMoistureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(18); + }); + } + + QueryBuilder + numberReactionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(19); + }); + } + + QueryBuilder + numberNitrogenProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(20); + }); + } + + QueryBuilder?, QAfterProperty> + regionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(21); + }); + } + + QueryBuilder locationProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(22); + }); + } + + QueryBuilder applyCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(23); + }); + } + + QueryBuilder + applyDurationProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(24); + }); + } + + QueryBuilder?, QAfterProperty> + applyMonthsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(25); + }); + } + + QueryBuilder?, QAfterProperty> + applyToolsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(26); + }); + } + + QueryBuilder + applyAdditionalInfosProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(27); + }); + } + + QueryBuilder applyStepsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(28); + }); + } + + QueryBuilder?, QAfterProperty> + applyMaterialsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(29); + }); + } + + QueryBuilder?, QAfterProperty> + galleryProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(30); + }); + } + + QueryBuilder?, QAfterProperty> + maintenanceMonthsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(31); + }); + } + + QueryBuilder + maintenanceAdditionalInfosProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(32); + }); + } + + QueryBuilder + maintenanceFrequencyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(33); + }); + } + + QueryBuilder + maintenanceStepsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(34); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(35); + }); + } + + QueryBuilder?, QAfterProperty> + maintenanceToolsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(36); + }); + } + + QueryBuilder sourcesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(37); + }); + } + + QueryBuilder costsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(38); + }); + } + + QueryBuilder costsUnitProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(39); + }); + } + + QueryBuilder measureTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(40); + }); + } + + QueryBuilder?, QAfterProperty> + measureGroupsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(41); + }); + } + + QueryBuilder?, QAfterProperty> + measureCategoriesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(42); + }); + } +} + +extension MeasureCompleteQueryProperty2 + on QueryBuilder { + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + imageProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + descriptionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder targetProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?), QAfterProperty> + fundingProgramsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder?), QAfterProperty> + sizeOrAreaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder growthProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + climateProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder + soilWaterProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + thermophilicProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder + frostHardyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder + lateFrostProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder + droughtProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } + + QueryBuilder?), QAfterProperty> + soilMoistureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(15); + }); + } + + QueryBuilder + numberLightProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(16); + }); + } + + QueryBuilder + numberTemperatureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(17); + }); + } + + QueryBuilder + numberMoistureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(18); + }); + } + + QueryBuilder + numberReactionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(19); + }); + } + + QueryBuilder + numberNitrogenProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(20); + }); + } + + QueryBuilder?), QAfterProperty> + regionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(21); + }); + } + + QueryBuilder + locationProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(22); + }); + } + + QueryBuilder + applyCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(23); + }); + } + + QueryBuilder + applyDurationProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(24); + }); + } + + QueryBuilder?), QAfterProperty> + applyMonthsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(25); + }); + } + + QueryBuilder?), QAfterProperty> + applyToolsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(26); + }); + } + + QueryBuilder + applyAdditionalInfosProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(27); + }); + } + + QueryBuilder + applyStepsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(28); + }); + } + + QueryBuilder?), QAfterProperty> + applyMaterialsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(29); + }); + } + + QueryBuilder?), QAfterProperty> + galleryProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(30); + }); + } + + QueryBuilder?), QAfterProperty> + maintenanceMonthsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(31); + }); + } + + QueryBuilder + maintenanceAdditionalInfosProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(32); + }); + } + + QueryBuilder + maintenanceFrequencyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(33); + }); + } + + QueryBuilder + maintenanceStepsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(34); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(35); + }); + } + + QueryBuilder?), QAfterProperty> + maintenanceToolsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(36); + }); + } + + QueryBuilder + sourcesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(37); + }); + } + + QueryBuilder costsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(38); + }); + } + + QueryBuilder + costsUnitProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(39); + }); + } + + QueryBuilder + measureTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(40); + }); + } + + QueryBuilder?), QAfterProperty> + measureGroupsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(41); + }); + } + + QueryBuilder?), QAfterProperty> + measureCategoriesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(42); + }); + } +} + +extension MeasureCompleteQueryProperty3 + on QueryBuilder { + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + imageProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + descriptionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder + targetProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?), QOperations> + fundingProgramsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder?), QOperations> + sizeOrAreaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder + growthProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + climateProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder + soilWaterProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder + riskOfSpottedWingDrosophilaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + thermophilicProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder + frostHardyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder + lateFrostProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder + droughtProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } + + QueryBuilder?), QOperations> + soilMoistureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(15); + }); + } + + QueryBuilder + numberLightProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(16); + }); + } + + QueryBuilder + numberTemperatureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(17); + }); + } + + QueryBuilder + numberMoistureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(18); + }); + } + + QueryBuilder + numberReactionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(19); + }); + } + + QueryBuilder + numberNitrogenProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(20); + }); + } + + QueryBuilder?), QOperations> + regionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(21); + }); + } + + QueryBuilder + locationProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(22); + }); + } + + QueryBuilder + applyCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(23); + }); + } + + QueryBuilder + applyDurationProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(24); + }); + } + + QueryBuilder?), QOperations> + applyMonthsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(25); + }); + } + + QueryBuilder?), QOperations> + applyToolsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(26); + }); + } + + QueryBuilder + applyAdditionalInfosProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(27); + }); + } + + QueryBuilder + applyStepsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(28); + }); + } + + QueryBuilder?), QOperations> + applyMaterialsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(29); + }); + } + + QueryBuilder?), QOperations> + galleryProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(30); + }); + } + + QueryBuilder?), QOperations> + maintenanceMonthsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(31); + }); + } + + QueryBuilder + maintenanceAdditionalInfosProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(32); + }); + } + + QueryBuilder + maintenanceFrequencyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(33); + }); + } + + QueryBuilder + maintenanceStepsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(34); + }); + } + + QueryBuilder + maintenanceSpecialFeaturesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(35); + }); + } + + QueryBuilder?), QOperations> + maintenanceToolsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(36); + }); + } + + QueryBuilder + sourcesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(37); + }); + } + + QueryBuilder + costsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(38); + }); + } + + QueryBuilder + costsUnitProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(39); + }); + } + + QueryBuilder + measureTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(40); + }); + } + + QueryBuilder?), QOperations> + measureGroupsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(41); + }); + } + + QueryBuilder?), QOperations> + measureCategoriesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(42); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +MeasureComplete _$MeasureCompleteFromJson(Map json) => + MeasureComplete( + id: (json['id'] as num).toInt(), + name: json['name'] as String, + ) + ..image = json['image'] == null + ? null + : FilePart.fromJson(json['image'] as Map) + ..description = json['description'] as String? + ..target = json['target'] as String? + ..fundingPrograms = (json['fundingPrograms'] as List?) + ?.map((e) => e as String) + .toList() + ..sizeOrArea = (json['sizeOrArea'] as List?) + ?.map((e) => e as String) + .toList() + ..growth = json['growth'] as String? + ..climate = json['climate'] as String? + ..soilWater = json['soilWater'] as String? + ..riskOfSpottedWingDrosophila = + json['riskOfSpottedWingDrosophila'] as String? + ..thermophilic = json['thermophilic'] as String? + ..frostHardy = json['frostHardy'] as String? + ..lateFrost = json['lateFrost'] as String? + ..drought = json['drought'] as String? + ..soilMoisture = (json['soilMoisture'] as List?) + ?.map((e) => e as String) + .toList() + ..numberLight = json['numberLight'] as String? + ..numberTemperature = json['numberTemperature'] as String? + ..numberMoisture = json['numberMoisture'] as String? + ..numberReaction = json['numberReaction'] as String? + ..numberNitrogen = json['numberNitrogen'] as String? + ..region = + (json['region'] as List?)?.map((e) => e as String).toList() + ..location = json['location'] as String? + ..applyCosts = json['applyCosts'] as String? + ..applyDuration = json['applyDuration'] as String? + ..applyMonths = (json['applyMonths'] as List?) + ?.map((e) => e as String) + .toList() + ..applyTools = (json['applyTools'] as List?) + ?.map((e) => e as String) + .toList() + ..applyAdditionalInfos = json['applyAdditionalInfos'] as String? + ..applySteps = json['applySteps'] as String? + ..applyMaterials = (json['applyMaterials'] as List?) + ?.map((e) => e as String) + .toList() + ..gallery = (json['gallery'] as List?) + ?.map((e) => FilePart.fromJson(e as Map)) + .toList() + ..maintenanceMonths = (json['maintenanceMonths'] as List?) + ?.map((e) => e as String) + .toList() + ..maintenanceAdditionalInfos = + json['maintenanceAdditionalInfos'] as String? + ..maintenanceFrequency = json['maintenanceFrequency'] as String? + ..maintenanceSteps = json['maintenanceSteps'] as String? + ..maintenanceSpecialFeatures = + json['maintenanceSpecialFeatures'] as String? + ..maintenanceTools = (json['maintenanceTools'] as List?) + ?.map((e) => e as String) + .toList() + ..sources = json['sources'] as String? + ..costs = json['costs'] as String? + ..costsUnit = json['costsUnit'] as String? + ..measureType = json['measureType'] as String? + ..measureGroups = (json['measureGroups'] as List?) + ?.map((e) => e as String) + .toList() + ..measureCategories = (json['measureCategories'] as List?) + ?.map((e) => e as String) + .toList(); + +Map _$MeasureCompleteToJson(MeasureComplete instance) => + { + 'id': instance.id, + 'name': instance.name, + 'image': instance.image, + 'description': instance.description, + 'target': instance.target, + 'fundingPrograms': instance.fundingPrograms, + 'sizeOrArea': instance.sizeOrArea, + 'growth': instance.growth, + 'climate': instance.climate, + 'soilWater': instance.soilWater, + 'riskOfSpottedWingDrosophila': instance.riskOfSpottedWingDrosophila, + 'thermophilic': instance.thermophilic, + 'frostHardy': instance.frostHardy, + 'lateFrost': instance.lateFrost, + 'drought': instance.drought, + 'soilMoisture': instance.soilMoisture, + 'numberLight': instance.numberLight, + 'numberTemperature': instance.numberTemperature, + 'numberMoisture': instance.numberMoisture, + 'numberReaction': instance.numberReaction, + 'numberNitrogen': instance.numberNitrogen, + 'region': instance.region, + 'location': instance.location, + 'applyCosts': instance.applyCosts, + 'applyDuration': instance.applyDuration, + 'applyMonths': instance.applyMonths, + 'applyTools': instance.applyTools, + 'applyAdditionalInfos': instance.applyAdditionalInfos, + 'applySteps': instance.applySteps, + 'applyMaterials': instance.applyMaterials, + 'gallery': instance.gallery, + 'maintenanceMonths': instance.maintenanceMonths, + 'maintenanceAdditionalInfos': instance.maintenanceAdditionalInfos, + 'maintenanceFrequency': instance.maintenanceFrequency, + 'maintenanceSteps': instance.maintenanceSteps, + 'maintenanceSpecialFeatures': instance.maintenanceSpecialFeatures, + 'maintenanceTools': instance.maintenanceTools, + 'sources': instance.sources, + 'costs': instance.costs, + 'costsUnit': instance.costsUnit, + 'measureType': instance.measureType, + 'measureGroups': instance.measureGroups, + 'measureCategories': instance.measureCategories, + }; diff --git a/lib/src/entity/measure/details/measure_details_repository.dart b/lib/src/entity/measure/details/measure_details_repository.dart index b6371d3..e486fe4 100644 --- a/lib/src/entity/measure/details/measure_details_repository.dart +++ b/lib/src/entity/measure/details/measure_details_repository.dart @@ -7,4 +7,12 @@ import '../../../packages/ambito_db/base_db.dart'; class MeasureDetailsRepository extends BaseDB { @override IsarCollection collection = isar.measureDetails; + + MeasureDetails getDetailsForMeasure(String measure) { + List all = isar.measureDetails.where().findAll(); + return all + .where( + (el) => el.measure!.map((m) => m.value).toList().contains(measure)) + .first; + } } diff --git a/lib/src/entity/measure/general/measure_general.dart b/lib/src/entity/measure/general/measure_general.dart index 374ea92..b93e0ee 100644 --- a/lib/src/entity/measure/general/measure_general.dart +++ b/lib/src/entity/measure/general/measure_general.dart @@ -56,7 +56,8 @@ class MeasureGeneral extends BaseEntity with EntityWithId { extension MeasureGeneralExtension on MeasureGeneral { ListMeasure toListMeasure() { final listMeasure = ListMeasure() - ..id = isar.listMeasures.autoIncrement() + ..isarId = isar.listMeasures.autoIncrement() + ..id = this.id ..name = name ..measureGroups = measureGroup ?.map((group) => diff --git a/lib/src/entity/measure/general/measure_general_repository.dart b/lib/src/entity/measure/general/measure_general_repository.dart index c646f05..e0ed5d1 100644 --- a/lib/src/entity/measure/general/measure_general_repository.dart +++ b/lib/src/entity/measure/general/measure_general_repository.dart @@ -14,6 +14,10 @@ class MeasureGeneralRepository extends BaseDB { return isar.measureGenerals.where().sortByName().findAll(); } + MeasureGeneral? getByName(String name) { + return isar.measureGenerals.where().nameEqualTo(name).findFirst(); + } + List getAllOrderedByGroupAndType( String group, String type, diff --git a/lib/src/entity/measure/measure_repository.dart b/lib/src/entity/measure/measure_repository.dart index 2a08387..13fb9ae 100644 --- a/lib/src/entity/measure/measure_repository.dart +++ b/lib/src/entity/measure/measure_repository.dart @@ -2,6 +2,7 @@ import 'package:ambito/src/entity/entities.dart'; import 'package:ambito/src/entity/lists/list_display.dart'; import 'package:ambito/src/entity/lists/list_repository.dart'; import 'package:ambito/src/entity/measure/category/measure_category.dart'; +import 'package:ambito/src/entity/measure/complete/measure_complete.dart'; import 'package:ambito/src/entity/measure/measure_grouping.dart'; import 'package:ambito/src/extensions/extensions.dart'; import 'package:ambito/src/packages/ambito_db/base_db.dart'; @@ -22,6 +23,10 @@ class MeasureRepository extends BaseDB { }); } + MeasureTypes? getTypeByName(String name) { + return isar.measureTypes.where().measureTypeEqualTo(name).findFirst(); + } + Map getTypesCounterByCategory(String category) { final counter = {}; @@ -116,119 +121,10 @@ class MeasureRepository extends BaseDB { } Future buildLists() async { - var measures = getAll(); - Map>> lists = {}; - - /*List props = MeasureSchema.schema.properties; - for (var prop in props) { - if (prop.type == IsarType.objectList) { - lists[prop.name] = []; - } - } - - logger.d(lists); - - int counter = 0; - - for (Measure measure in measures) { - var json = measure.toJson(); - if (counter == 0) { - logger.d(json); - } - - lists.forEach((key, value) { - if (counter == 0) { - logger.d(key); - } - if (json[key] != null) { - logger.d(json[key]); - } - }); - counter++; - }*/ return true; } Future buildMeasureFilters() async { - Map> filtersAreaType = {}; - Map> filtersMeasureGroup = {}; - Map> filterMonths = {}; - Map> filterFundingPrograms = {}; - Map colors = {}; - - var measures = getAll(); - - /*for (Measure measure in measures) { - measure.factsheetAreaType?.forEach((ivc) { - filtersAreaType.putIfAbsent(ivc.value!, () => []).add(measure.id); - colors[ivc.value!] = ivc.color!; - }); - - if (measure.actionGroup != null) { - filtersMeasureGroup - .putIfAbsent(measure.actionGroup!.value!, () => []) - .add(measure.id); - colors[measure.actionGroup!.value!] = measure.actionGroup!.color!; - } - - measure.timeFrame?.forEach((ivc) { - filterMonths.putIfAbsent(ivc.value!, () => []).add(measure.id); - colors[ivc.value!] = ivc.color!; - }); - - measure.fundingPrograms?.forEach((ivc) { - filterFundingPrograms.putIfAbsent(ivc.value!, () => []).add(measure.id); - }); - } - - final itemFilterRepo = ItemFilterRepository(); - final autoIncrement = isar.itemFilters.autoIncrement; - - itemFilterRepo.putAll(filtersAreaType.entries - .map((entry) => ItemFilter() - ..id = autoIncrement() - ..name = entry.key - ..url = entry.key.toLowerCase().replaceUmlauts() - ..type = 'areaType' - ..description = - 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy.' - ..image = - 'images/measure/category/${entry.key.toLowerCase().replaceUmlauts()}.jpg' - ..color = colors[entry.key] - ..ids = entry.value) - .toList()); - - itemFilterRepo.putAll(filtersMeasureGroup.entries - .map((entry) => ItemFilter() - ..id = autoIncrement() - ..name = entry.key - ..url = entry.key.toLowerCase().replaceUmlauts() - ..type = 'group' - ..description = 'Lorem ipsum dolor sit amet, consetetur sadipscing.' - ..image = - 'images/measure/category/${entry.key.toLowerCase().replaceUmlauts()}.jpg' - ..color = colors[entry.key] - ..ids = entry.value) - .toList()); - - itemFilterRepo.putAll(filterMonths.entries - .map((entry) => ItemFilter() - ..id = autoIncrement() - ..name = entry.key - ..url = entry.key.toLowerCase().replaceUmlauts() - ..type = 'month' - ..ids = entry.value) - .toList()); - - itemFilterRepo.putAll(filterFundingPrograms.entries - .map((entry) => ItemFilter() - ..id = autoIncrement() - ..name = entry.key - ..url = entry.key.toLowerCase().replaceUmlauts() - ..type = 'fundingProgram' - ..ids = entry.value) - .toList()); -*/ return true; } @@ -360,4 +256,8 @@ class MeasureRepository extends BaseDB { entries: filterItems.map((item) => item.title!).toList(), ); } + + MeasureComplete? getMeasureCompleteByName(String name) { + return isar.measureCompletes.where().nameEqualTo(name).findFirst(); + } } diff --git a/lib/src/entity/measure/types/measure_types.dart b/lib/src/entity/measure/types/measure_types.dart index 62ff9c5..d91e776 100644 --- a/lib/src/entity/measure/types/measure_types.dart +++ b/lib/src/entity/measure/types/measure_types.dart @@ -154,7 +154,8 @@ class MeasureTypes extends BaseEntity with EntityWithId { extension MeasureExtension on MeasureTypes { ListMeasure toListMeasure() { final listMeasure = ListMeasure() - ..id = isar.listMeasures.autoIncrement() + ..isarId = isar.listMeasures.autoIncrement() + ..id = this.id ..name = measureType ..measureCategories = measureCategory ?.map( diff --git a/lib/src/entity/measure/types_details/measure_types_details_repository.dart b/lib/src/entity/measure/types_details/measure_types_details_repository.dart index c3463ca..d9e5a42 100644 --- a/lib/src/entity/measure/types_details/measure_types_details_repository.dart +++ b/lib/src/entity/measure/types_details/measure_types_details_repository.dart @@ -7,4 +7,11 @@ import '../../../packages/ambito_db/base_db.dart'; class MeasureTypesDetailsRepository extends BaseDB { @override IsarCollection collection = isar.measureTypesDetails; + + MeasureTypesDetails? getTypeDetailsForType(String type) { + return isar.measureTypesDetails + .where() + .measureTypeEqualTo(type) + .findFirst(); + } } diff --git a/lib/src/packages/ambito_api/base_api.dart b/lib/src/packages/ambito_api/base_api.dart index 010ee6c..725ace0 100644 --- a/lib/src/packages/ambito_api/base_api.dart +++ b/lib/src/packages/ambito_api/base_api.dart @@ -59,7 +59,8 @@ class BaseApi { return true; } - Future postContent(String table, dynamic body) async { + Future postContent(String table, dynamic body, + [bool autosave = true]) async { init(); int tableId = tables[table] ?? 0; @@ -70,17 +71,17 @@ class BaseApi { var response = await RestClient().post('$tableId/', body); if (response.statusCode != 200) Get.toNamed('/error'); - var model = _createModelFromJson(table, jsonDecode(response.body)); + if (autosave == true) { + var model = _createModelFromJson(table, jsonDecode(response.body)); + var repositoryFunction = repositoryMap[table]; + if (repositoryFunction == null) return false; + repositoryFunction(model); + } - var repositoryFunction = repositoryMap[table]; - if (repositoryFunction == null) return false; - - repositoryFunction(model); - - return true; + return response.body; } - Future getContent(String table) async { + Future getContent(String table, [bool autosave = true]) async { init(); int tableId = tables[table] ?? 0; @@ -93,39 +94,26 @@ class BaseApi { var results = json['results']; - final repositoryMap = { - 'area': AreaRepository().put, - 'business': BusinessRepository().put, - 'funding_program': FundingProgramRepository().put, - 'measure_types': MeasureRepository().put, - 'measure_general': MeasureGeneralRepository().put, - 'measure_details': MeasureDetailsRepository().put, - 'measure_types_details': MeasureTypesDetailsRepository().put, - //'measure_combination': MeasureCombinationRepository().put, - //'organism': OrganismRepository().put, - //'location_requirements': LocationRequirementsRepository().put, - //'reference_implementation': ReferenceImplementationRepository().put, - //'tree_type': TreeTypeRepository().put, - //'measure': MeasureRepository().putMeasureGroups, + if (autosave == true) { + final repositoryMap = { + 'area': AreaRepository().put, + 'business': BusinessRepository().put, + 'funding_program': FundingProgramRepository().put, + 'measure_types': MeasureRepository().put, + 'measure_general': MeasureGeneralRepository().put, + 'measure_details': MeasureDetailsRepository().put, + 'measure_types_details': MeasureTypesDetailsRepository().put, + }; - //'service_provider': ServiceProviderRepository().put, - //'service_provider_contact_person': - // ServiceProviderContactPersonRepository().put, - //'material': MaterialRepository().put, - //'source': SourceRepository().put, - //'experience_report': ExperienceReportRepository().put, - //'approval_requirement': ApprovalRequirementRepository().put - }; + var repositoryFunction = repositoryMap[table]; + if (repositoryFunction == null) return false; - var repositoryFunction = repositoryMap[table]; - if (repositoryFunction == null) return false; - - for (var item in results) { - var model = _createModelFromJson(table, item); - repositoryFunction(model); + for (var item in results) { + var model = _createModelFromJson(table, item); + repositoryFunction(model); + } } - - return true; + return results; } dynamic _createModelFromJson(String table, Map json) { diff --git a/lib/src/packages/ambito_db/base_db.dart b/lib/src/packages/ambito_db/base_db.dart index 8050bf5..f6fba4c 100644 --- a/lib/src/packages/ambito_db/base_db.dart +++ b/lib/src/packages/ambito_db/base_db.dart @@ -1,4 +1,5 @@ import 'package:ambito/src/entity/area/area.dart'; +import 'package:ambito/src/entity/cart/cart.dart'; import 'package:ambito/src/entity/entities.dart'; import 'package:ambito/src/entity/lists/list_measure.dart'; import 'package:ambito/src/entity/lists/list_measure_single.dart'; @@ -13,6 +14,7 @@ import 'package:isar/isar.dart'; import 'package:path_provider/path_provider.dart'; import '../../consts/consts.dart'; +import '../../entity/cart/cart_element.dart'; import '../../entity/measure/type/measure_type.dart'; export 'repositories/_repositories.dart'; @@ -29,13 +31,14 @@ class AmbitoIsarDB { AreaSchema, ApprovalRequirementSchema, BusinessSchema, + CartSchema, + CartElementSchema, ExperienceReportSchema, FundingProgramSchema, ItemFilterSchema, ListMeasureSchema, ListMeasureSingleSchema, ListMeasureTypeGroupCategorySchema, - LocationRequirementsSchema, MaterialSchema, MeasureTypesSchema, MeasureTypesDetailsSchema, @@ -45,13 +48,6 @@ class AmbitoIsarDB { MeasureCategorySchema, MeasureTypeSchema, MeasureGroupingSchema, - NumberFactsheetSchema, - OrganismSchema, - ReferenceImplementationSchema, - ServiceProviderSchema, - ServiceProviderContactPersonSchema, - SourceSchema, - TreeTypeSchema, ], directory: dir, engine: engine, diff --git a/lib/src/packages/ambito_notifier/notifier/cart_notifier.dart b/lib/src/packages/ambito_notifier/notifier/cart_notifier.dart new file mode 100644 index 0000000..8a1ec11 --- /dev/null +++ b/lib/src/packages/ambito_notifier/notifier/cart_notifier.dart @@ -0,0 +1,30 @@ +import 'package:flutter/cupertino.dart'; + +AmbitoCartNotifier ambitoCartNotifier = AmbitoCartNotifier(); + +class AmbitoCartNotifier extends ChangeNotifier { + AmbitoCartNotifier(); + + AmbitoCartNotifier.create(BuildContext context); + + int carts = 0; + + void addCart() { + carts++; + notifyListeners(); + } + + void resetCarts() { + carts = 0; + notifyListeners(); + } + + void removeCart() { + if (carts > 1) { + carts--; + notifyListeners(); + } else { + resetCarts(); + } + } +} diff --git a/lib/src/pages/calendar/calendar_page_year.dart b/lib/src/pages/calendar/calendar_page_year.dart index bd05ae9..5accc42 100644 --- a/lib/src/pages/calendar/calendar_page_year.dart +++ b/lib/src/pages/calendar/calendar_page_year.dart @@ -63,7 +63,7 @@ class CalendarPageYearState extends State { ? month.substring(0, 3) : month, style: theme.titleMedium - ?.copyWith(fontWeight: FontWeight.bold, color: Colors.white), + .copyWith(fontWeight: FontWeight.bold, color: Colors.white), ), ), ); diff --git a/lib/src/pages/cart/cart_page.dart b/lib/src/pages/cart/cart_page.dart index d6dd069..828d9df 100644 --- a/lib/src/pages/cart/cart_page.dart +++ b/lib/src/pages/cart/cart_page.dart @@ -1,166 +1,282 @@ -import 'package:ambito/src/entity/_general/filter/item_filter.dart'; -import 'package:ambito/src/entity/_general/filter/item_filter_repository.dart'; -import 'package:ambito/src/entity/measure/measure_repository.dart'; -import 'package:ambito/src/entity/measure/types/measure_types.dart'; -import 'package:ambito/src/extensions/extensions.dart'; +import 'dart:typed_data'; + +import 'package:ambito/src/entity/cart/cart_datasource.dart'; +import 'package:ambito/src/entity/cart/cart_element.dart'; +import 'package:ambito/src/entity/cart/cart_repository.dart'; +import 'package:ambito/src/entity/measure/complete/measure_complete.dart'; +import 'package:ambito/src/entity/measure/general/measure_general.dart'; import 'package:ambito/src/packages/ambito_theme/ambito_theme.dart'; -import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_to_pdf/export_delegate.dart'; +import 'package:flutter_to_pdf/export_frame.dart'; import 'package:screen_breakpoints/screen_breakpoints.dart'; -import 'package:syncfusion_flutter_calendar/calendar.dart'; +import 'package:screenshot/screenshot.dart'; +import 'package:syncfusion_flutter_core/theme.dart'; +import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -import '../../consts/consts.dart'; -import '../../widgets/appbar/ambito_appbar.dart'; +import '../../entity/cart/cart.dart'; +import '../../entity/measure/general/measure_general_repository.dart'; +import '../../widgets/buttons/print_all_button.dart'; +import '../../widgets/buttons/print_button.dart'; +import '../../widgets/page/base_page.dart'; -class CalendarPage extends StatefulWidget { - const CalendarPage({super.key}); +class CartPage extends StatefulWidget { + const CartPage({super.key, required this.measure}); + + final MeasureComplete? measure; @override - State createState() => CalendarPageState(); + State createState() => CartPageState(); } -class CalendarPageState extends State { - List appointments = []; +class CartPageState extends State { + List? carts; + Widget cartCards = const SizedBox(); + final ExportDelegate exportDelegate = ExportDelegate( + ttfFonts: { + 'OpenSans': 'fonts/OpenSans-Regular.ttf', + 'OpenSans_regular': 'fonts/OpenSans-Regular.ttf', + 'OpenSans_500': 'fonts/OpenSans-Bold.ttf', + }, + ); - List? monthFilter = []; + final ScreenshotController screenshotController = ScreenshotController(); + Uint8List? _imageFile; @override void initState() { - initDataSource(); super.initState(); } - initDataSource() { - monthFilter = ItemFilterRepository().getByType('month')?.toList(); - for (String month in months) { - DateTime now = DateTime.now(); - int monthInt = months.indexOf(month) + 1; - - DateTime startDate = DateTime(now.year, monthInt, 1, 0, 0, 0); - DateTime endDate = DateTime( - now.year, monthInt, startDate.lastDayOfMonth.day, 23, 59, 59); - - ItemFilter? itemFilter = - monthFilter?.firstWhereOrNull((item) => item.name == month); - if (itemFilter != null) { - List currentMeasures = - MeasureRepository().getByIds(itemFilter.ids!); - for (var measure in currentMeasures) { - appointments.add( - Appointment( - startTime: startDate, - endTime: endDate, - isAllDay: true, - subject: measure!.measureType ?? '', - color: actionGroupColors[measure.measureGroup!.value!]!, - ), - ); - } - } - } - } - @override Widget build(BuildContext context) { final AmbitoTheme theme = getTheme(context); - return Scaffold( - appBar: AmbitoAppbar( - links: const ['dashboard', 'massnahmen'], - breakpoint: Breakpoint.fromContext(context), - theme: theme, - ), - body: Center( - child: Padding( - padding: const EdgeInsets.all(32), - child: SfCalendar( - firstDayOfWeek: 1, - showNavigationArrow: true, - view: CalendarView.month, - dataSource: _AppointmentDataSource(appointments), - monthViewSettings: const MonthViewSettings( - appointmentDisplayMode: MonthAppointmentDisplayMode.appointment, - appointmentDisplayCount: 64, + + carts = CartRepository().getMyCarts(); + return BasePage().getPage( + context, + BreakpointBuilder( + builder: ( + context, + breakpoint, + configuration, + ) { + return SingleChildScrollView( + child: Center( + child: Screenshot( + controller: screenshotController, + child: SizedBox( + width: Breakpoint.fromContext(context).width, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + theme.verticalSpacer, + Text( + 'Warenkorb', + style: theme.headlineLarge, + textAlign: TextAlign.start, + ), + theme.verticalSpacerSmall, + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + const Spacer(), + PrintAllButton( + onPressed: () async { + screenshotController.capture(); + }, + ), + ], + ), + theme.verticalSpacerSmall, + buildCards(theme, carts), + ], + ), + ), + ), ), - ), - ), + ); + }, ), ); } - _AppointmentDataSource _getCalendarDataSource() { - List appointments = []; - appointments.add(Appointment( - startTime: DateTime.now(), - endTime: DateTime.now().add(const Duration(minutes: 10)), - subject: 'Meeting', - isAllDay: true, - color: Colors.blue, - startTimeZone: '', - endTimeZone: '', - )); + Future saveFile(document, String name) async {} - return _AppointmentDataSource(appointments); + Widget buildCards(AmbitoTheme theme, List? carts) { + List children = []; + + if (carts != null) { + int counter = 0; + for (final cart in carts) { + final measure = MeasureGeneralRepository().getByName(cart.name!); + + final elements = CartRepository().getElementsByCartId(cart.id); + + double sum = 0; + + for (final element in elements) { + sum = sum + + ((int.tryParse(element.amount ?? '1') ?? 1) * + (double.tryParse(element.price ?? '0') ?? 0)); + } + + final card = ExportFrame( + exportDelegate: exportDelegate, + frameId: 'cart${cart.id}', + child: SizedBox( + width: 1152, + child: Card( + elevation: 0, + color: theme.currentColorScheme.tertiary, + child: Padding( + padding: const EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + cart.name!, + style: theme.labelLarge.copyWith( + color: theme.currentColorScheme.primary), + ), + const Spacer(), + SizedBox( + height: 40, + width: 200, + child: ClipRRect( + borderRadius: const BorderRadius.all( + Radius.circular(10), + ), + child: measure?.getFullImage() ?? + Image.asset('assets/images/logo_trans.png'), + ), + ), + ], + ), + theme.verticalSpacerSmall, + gridWidget(elements ?? []), + theme.verticalSpacer, + Row( + children: [ + Text( + 'Richtpreis ca. ${sum.toStringAsFixed(2)}€', + style: theme.labelMedium + .copyWith(fontWeight: FontWeight.bold), + ), + Spacer(), + PrintButton( + onPressed: () async { + final pdf = await exportDelegate + .exportToPdfDocument('cart${cart.id}'); + await saveFile(pdf, '${cart.id}.pdf'); + }, + ), + ], + ) + ], + ), + ), + ), + ), + ); + children.add(card); + children.add(theme.verticalSpacerMax); + counter++; + } + } + + return ExportFrame( + frameId: 'completeCart', + exportDelegate: exportDelegate, + child: Column( + children: children, + ), + ); + } + + Widget gridWidget(List cartElements) { + final AmbitoTheme theme = getTheme(context); + + return SfDataGridTheme( + data: SfDataGridThemeData( + headerColor: theme.currentColorScheme.primaryContainer, + sortIcon: Icon( + Icons.keyboard_arrow_down, + color: theme.currentColorScheme.primary, + ), + ), + child: SfDataGrid( + allowSorting: true, + source: CartDataSource(cartElements: cartElements, context: context), + columnWidthMode: ColumnWidthMode.fill, + columns: [ + GridColumn( + columnName: 'name', + label: Container( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + alignment: Alignment.centerLeft, + child: Text( + 'Material', + overflow: TextOverflow.ellipsis, + style: theme.bodyMedium.copyWith( + color: theme.currentColorScheme.primary, + ), + ), + ), + ), + GridColumn( + columnName: 'amount', + maximumWidth: 150, + label: Container( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + alignment: Alignment.centerLeft, + child: Text( + 'Menge', + overflow: TextOverflow.ellipsis, + style: theme.bodyMedium.copyWith( + color: theme.currentColorScheme.primary, + ), + ), + ), + ), + GridColumn( + columnName: 'provider', + maximumWidth: 200, + allowSorting: false, + label: Container( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + alignment: Alignment.centerLeft, + child: Text( + 'Anbieter', + overflow: TextOverflow.ellipsis, + style: theme.bodyMedium.copyWith( + color: theme.currentColorScheme.primary, + ), + ), + ), + ), + GridColumn( + columnName: 'price', + allowSorting: true, + maximumWidth: 250, + label: Container( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + alignment: Alignment.centerLeft, + child: Text( + 'Richtpreis', + overflow: TextOverflow.ellipsis, + style: theme.bodyMedium.copyWith( + color: theme.currentColorScheme.primary, + ), + ), + ), + ), + ], + ), + ); } } - -class _AppointmentDataSource extends CalendarDataSource { - _AppointmentDataSource(List source) { - appointments = source; - } -} - -/*class ActionDataSource extends CalendarDataSource { - ActionDataSource(List source) { - appointments = source; - } - - @override - DateTime getStartTime(int index) { - return appointments![index].from; - } - - @override - DateTime getEndTime(int index) { - return appointments![index].to; - } - - @override - bool isAllDay(int index) { - return appointments![index].isAllDay; - } - - @override - String getSubject(int index) { - return appointments![index].eventName; - } - - @override - String getStartTimeZone(int index) { - return appointments![index].startTimeZone; - } - - @override - String getEndTimeZone(int index) { - return appointments![index].endTimeZone; - } - - @override - Color getColor(int index) { - return appointments![index].background; - } -} - -class Action { - Action( - {this.eventName = '', - required this.from, - required this.to, - required this.background, - this.isAllDay = false}); - - String eventName; - DateTime from; - DateTime to; - Color background; - bool isAllDay; -}*/ diff --git a/lib/src/pages/dashboard/areas/dashboard_areas_page.dart b/lib/src/pages/dashboard/areas/dashboard_areas_page.dart index bf8fb35..f669aea 100644 --- a/lib/src/pages/dashboard/areas/dashboard_areas_page.dart +++ b/lib/src/pages/dashboard/areas/dashboard_areas_page.dart @@ -37,6 +37,7 @@ class DashboardAreasPageState extends State { final api = GoogleGeocodingApi(googleApiKey, isLogged: false); Set markers = {}; Set polygons = {}; + Set polylines = {}; List areas = []; Business? business; @@ -87,6 +88,7 @@ class DashboardAreasPageState extends State { mapWidget = MapWidget( markers: markers, polygons: polygons, + polylines: polylines, ); }); }); @@ -112,6 +114,7 @@ class DashboardAreasPageState extends State { padding: context.breakpoint.padding, child: SizedBox( width: 1152, + height: 1152, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -521,7 +524,9 @@ class DashboardAreasPageState extends State { ], ), theme.verticalSpacer, - (display == 0) ? mapWidget : gridWidget(areas), + Expanded( + child: (display == 0) ? mapWidget : gridWidget(areas), + ), theme.verticalSpacer, ], ), diff --git a/lib/src/pages/dashboard/dashboard_page.dart b/lib/src/pages/dashboard/dashboard_page.dart index 4b54551..cfdb755 100644 --- a/lib/src/pages/dashboard/dashboard_page.dart +++ b/lib/src/pages/dashboard/dashboard_page.dart @@ -70,6 +70,7 @@ class DashboardPageState extends State { mapWidget = MapWidget( markers: markers, polygons: {}, + polylines: {}, ); }); }); diff --git a/lib/src/pages/measure/detail/cards/_cards.dart b/lib/src/pages/measure/detail/cards/_cards.dart index 97c2e1a..d6df8b6 100644 --- a/lib/src/pages/measure/detail/cards/_cards.dart +++ b/lib/src/pages/measure/detail/cards/_cards.dart @@ -1,16 +1,4 @@ export 'advisor_card.dart'; -export 'background_card.dart'; -export 'biodiverisity_card.dart'; -export 'creation_card.dart'; -export 'description_card.dart'; export 'factsheet_card.dart'; -export 'funding_card.dart'; -export 'implementation_card.dart'; -export 'location_card.dart'; -export 'maintenance_card.dart'; export 'material_card.dart'; -export 'presets_card.dart'; -export 'review_card.dart'; -export 'size_card.dart'; -export 'sources_card.dart'; export 'toc_card.dart'; diff --git a/lib/src/pages/measure/detail/cards/_main_card.dart b/lib/src/pages/measure/detail/cards/_main_card.dart index 1c032a7..444198b 100644 --- a/lib/src/pages/measure/detail/cards/_main_card.dart +++ b/lib/src/pages/measure/detail/cards/_main_card.dart @@ -1,8 +1,8 @@ +import 'package:ambito/src/entity/measure/complete/measure_complete.dart'; import 'package:ambito/src/extensions/extensions.dart'; import 'package:expansion_tile_card/expansion_tile_card.dart'; import 'package:flutter/material.dart'; -import '../../../../entity/entities.dart'; import '../../../../packages/ambito_theme/ambito_theme.dart'; import '../measure_detail_page.dart'; @@ -13,7 +13,7 @@ class MainCard extends StatelessWidget { required this.title, required this.content}); - final MeasureTypes massnahme; + final MeasureComplete massnahme; final String title; final Widget content; diff --git a/lib/src/pages/measure/detail/cards/_sidebar_card.dart b/lib/src/pages/measure/detail/cards/_sidebar_card.dart index 30f7090..8ce3fed 100644 --- a/lib/src/pages/measure/detail/cards/_sidebar_card.dart +++ b/lib/src/pages/measure/detail/cards/_sidebar_card.dart @@ -1,7 +1,7 @@ +import 'package:ambito/src/entity/measure/complete/measure_complete.dart'; import 'package:ambito/src/extensions/extensions.dart'; import 'package:flutter/material.dart'; -import '../../../../entity/entities.dart'; import '../../../../packages/ambito_theme/ambito_theme.dart'; class SideBarCard extends StatelessWidget { @@ -11,7 +11,7 @@ class SideBarCard extends StatelessWidget { required this.title, required this.content}); - final MeasureTypes massnahme; + final MeasureComplete massnahme; final String title; final List content; diff --git a/lib/src/pages/measure/detail/cards/advisor_card.dart b/lib/src/pages/measure/detail/cards/advisor_card.dart index 2777157..7d3834d 100644 --- a/lib/src/pages/measure/detail/cards/advisor_card.dart +++ b/lib/src/pages/measure/detail/cards/advisor_card.dart @@ -1,15 +1,13 @@ +import 'package:ambito/src/entity/measure/complete/measure_complete.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_linkify/flutter_linkify.dart'; -import 'package:linkify/linkify.dart'; -import '../../../../entity/entities.dart'; import '../../../../packages/ambito_theme/ambito_theme.dart'; import '_sidebar_card.dart'; class AdvisorCard extends StatelessWidget { const AdvisorCard({super.key, required this.massnahme}); - final MeasureTypes massnahme; + final MeasureComplete massnahme; @override Widget build(BuildContext context) { @@ -20,24 +18,10 @@ class AdvisorCard extends StatelessWidget { title: 'page.actionDetailPage.advisor.title', content: [ Text( - 'Max Mustermann', + '-', style: theme.currentThemeData.textTheme.bodyLarge ?.copyWith(fontWeight: FontWeight.bold), ), - Linkify( - text: 'EMail: max@mustermann.de', - style: theme.currentThemeData.textTheme.bodyLarge, - linkifiers: const [ - EmailLinkifier(), - ], - ), - Linkify( - text: 'Tel: +4917666554433', - style: theme.currentThemeData.textTheme.bodyLarge, - linkifiers: const [ - PhoneNumberLinkifier(), - ], - ), ], ); } diff --git a/lib/src/pages/measure/detail/cards/background_card.dart b/lib/src/pages/measure/detail/cards/background_card.dart deleted file mode 100644 index 1a16ecc..0000000 --- a/lib/src/pages/measure/detail/cards/background_card.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; -import '_main_card.dart'; - -class BackgroundCard extends StatelessWidget { - const BackgroundCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - return MainCard( - massnahme: massnahme, - title: 'page.actionDetailPage.background.target', - content: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - massnahme.applyLocation.toString(), - style: theme.currentThemeData.textTheme.bodyLarge, - ), - ], - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/biodiverisity_card.dart b/lib/src/pages/measure/detail/cards/biodiverisity_card.dart deleted file mode 100644 index 5a684e2..0000000 --- a/lib/src/pages/measure/detail/cards/biodiverisity_card.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:ambito/src/extensions/extensions.dart'; -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; - -class BiodiverisityCard extends StatelessWidget { - const BiodiverisityCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - return SizedBox( - width: double.infinity, - child: Card( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(0), - ), - elevation: 0, - color: theme.currentColorScheme.secondary, - child: Padding( - padding: const EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - context.translate('page.actionDetailPage.biodiversity.title'), - style: theme.currentThemeData.textTheme.titleMedium, - ), - theme.verticalSpacer, - Text( - massnahme.ecologicalRelevance.toString(), - style: theme.currentThemeData.textTheme.bodyMedium, - ), - ], - ), - ), - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/creation_card.dart b/lib/src/pages/measure/detail/cards/creation_card.dart deleted file mode 100644 index bea4f86..0000000 --- a/lib/src/pages/measure/detail/cards/creation_card.dart +++ /dev/null @@ -1,133 +0,0 @@ -import 'package:ambito/src/consts/consts.dart'; -import 'package:ambito/src/extensions/extensions.dart'; -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; -import '_main_card.dart'; - -class CreationCard extends StatelessWidget { - const CreationCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - Chip buildChip(String label, [active = false]) { - return Chip( - labelPadding: EdgeInsets.zero, - backgroundColor: active - ? theme.currentColorScheme.secondary - : theme.currentColorScheme.outline.withOpacity(.1), - label: Text( - label, - style: theme.currentThemeData.textTheme.bodyLarge?.copyWith( - color: active - ? theme.currentColorScheme.onSecondary - : theme.currentColorScheme.onSurface, - ), - ), - ); - } - - List buildChips(List? items) => - months.map((item) => buildChip(item, items?.contains(item))).toList(); - - List buildTools(List? tools) => - tools?.where((item) => item?.isNotEmpty ?? false).map((item) { - return Row( - children: [ - const Icon(Icons.fiber_manual_record, size: 8), - theme.horizontalSpacerSmall, - Expanded( - child: Text( - item!, - style: theme.currentThemeData.textTheme.bodyLarge, - ), - ), - ], - ); - }).toList() ?? - []; - - Widget buildSection({ - required String titleKey, - required List children, - }) { - if (children.isEmpty) return const SizedBox.shrink(); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Divider(), - Text( - context.translate(titleKey), - style: theme.currentThemeData.textTheme.labelMedium, - ), - ...children, - ], - ); - } - - Widget buildTextSection(String? text, String titleKey) { - if (text == null || text.isEmpty) return const SizedBox.shrink(); - return buildSection( - titleKey: titleKey, - children: [ - Text( - text, - style: theme.currentThemeData.textTheme.bodyLarge, - ), - ], - ); - } - - final tfChips = - buildChips(massnahme.applyTimeFrame?.map((e) => e.value).toList()); - final creationTools = - buildTools(massnahme.applyTools?.map((e) => e.value).toList()); - - return MainCard( - massnahme: massnahme, - title: 'page.actionDetailPage.creation.title', - content: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (tfChips.isNotEmpty) - buildSection( - titleKey: 'page.actionDetailPage.creation.timeFrame', - children: [ - Wrap( - runSpacing: 8, - spacing: 8, - children: tfChips, - ), - ], - ), - buildTextSection( - massnahme.applyTimeFrameAdditional, - 'page.actionDetailPage.creation.additional', - ), - buildTextSection( - massnahme.applyReminder, - 'page.actionDetailPage.creation.reminders', - ), - if (creationTools.isNotEmpty) - buildSection( - titleKey: 'page.actionDetailPage.creation.tools', - children: creationTools, - ), - buildTextSection( - massnahme.applyWorkSteps, - 'page.actionDetailPage.creation.steps', - ), - buildTextSection( - massnahme.applyTips, - 'page.actionDetailPage.creation.tips', - ), - ], - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/description_card.dart b/lib/src/pages/measure/detail/cards/description_card.dart deleted file mode 100644 index 71281a7..0000000 --- a/lib/src/pages/measure/detail/cards/description_card.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; -import '_main_card.dart'; - -class DescriptionCard extends StatelessWidget { - const DescriptionCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - return MainCard( - massnahme: massnahme, - title: 'page.actionDetailPage.description.title', - content: Text( - massnahme.description ?? '', - style: theme.currentThemeData.textTheme.bodyLarge, - textAlign: TextAlign.left, - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/factsheet_card.dart b/lib/src/pages/measure/detail/cards/factsheet_card.dart index 1c5e57c..539d201 100644 --- a/lib/src/pages/measure/detail/cards/factsheet_card.dart +++ b/lib/src/pages/measure/detail/cards/factsheet_card.dart @@ -1,14 +1,14 @@ import 'package:ambito/src/widgets/buttons/text_button.dart'; import 'package:flutter/material.dart'; -import '../../../../entity/entities.dart'; +import '../../../../entity/measure/complete/measure_complete.dart'; import '../../../../packages/ambito_theme/ambito_theme.dart'; import '_sidebar_card.dart'; class FactsheetCard extends StatelessWidget { const FactsheetCard({super.key, required this.massnahme}); - final MeasureTypes massnahme; + final MeasureComplete massnahme; @override Widget build(BuildContext context) { diff --git a/lib/src/pages/measure/detail/cards/funding_card.dart b/lib/src/pages/measure/detail/cards/funding_card.dart deleted file mode 100644 index 89281b3..0000000 --- a/lib/src/pages/measure/detail/cards/funding_card.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'package:ambito/src/extensions/extensions.dart'; -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; - -class FundingCard extends StatelessWidget { - const FundingCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - return SizedBox( - width: double.infinity, - child: Card( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(0), - ), - elevation: 0, - color: theme.currentColorScheme.secondary, - child: Padding( - padding: const EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - context.translate('page.actionDetailPage.funding.title'), - style: theme.currentThemeData.textTheme.titleMedium, - ), - theme.verticalSpacer, - ], - ), - ), - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/implementation_card.dart b/lib/src/pages/measure/detail/cards/implementation_card.dart deleted file mode 100644 index 998bed0..0000000 --- a/lib/src/pages/measure/detail/cards/implementation_card.dart +++ /dev/null @@ -1,52 +0,0 @@ -import 'package:ambito/src/extensions/extensions.dart'; -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; -import '_main_card.dart'; - -class ImplementationCard extends StatelessWidget { - const ImplementationCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - return MainCard( - massnahme: massnahme, - title: 'page.actionDetailPage.implementation.title', - content: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (massnahme.applyCosts != null && massnahme.applyCosts != '') - Text( - context.translate('page.actionDetailPage.implementation.costs'), - style: theme.currentThemeData.textTheme.labelMedium, - ), - if (massnahme.applyCosts != null && massnahme.applyCosts != '') - Text( - massnahme.applyCosts.toString(), - style: theme.currentThemeData.textTheme.bodyLarge, - ), - if (massnahme.applyCosts != null && - massnahme.applyCosts != '' && - massnahme.applyTime != null && - massnahme.applyTime != '') - const Divider(), - if (massnahme.applyTime != null && massnahme.applyTime != '') - Text( - context.translate('page.actionDetailPage.implementation.time'), - style: theme.currentThemeData.textTheme.labelMedium, - ), - if (massnahme.applyTime != null && massnahme.applyTime != '') - Text( - massnahme.applyTime.toString(), - style: theme.currentThemeData.textTheme.bodyLarge, - ), - ], - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/location_card.dart b/lib/src/pages/measure/detail/cards/location_card.dart deleted file mode 100644 index d644bce..0000000 --- a/lib/src/pages/measure/detail/cards/location_card.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; -import '_main_card.dart'; - -class LocationCard extends StatelessWidget { - const LocationCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - return MainCard( - massnahme: massnahme, - title: 'page.actionDetailPage.location.title', - content: Text( - massnahme.applyLocation.toString(), - style: theme.currentThemeData.textTheme.bodyLarge, - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/main/combined_card.dart b/lib/src/pages/measure/detail/cards/main/combined_card.dart new file mode 100644 index 0000000..0eda75c --- /dev/null +++ b/lib/src/pages/measure/detail/cards/main/combined_card.dart @@ -0,0 +1,53 @@ +import 'package:expansion_tile_card/expansion_tile_card.dart'; +import 'package:flutter/cupertino.dart'; + +import '../../../../../packages/ambito_theme/ambito_theme.dart'; +import '../../measure_detail_page.dart'; + +class CombinedCard extends StatelessWidget { + const CombinedCard({ + super.key, + required this.title, + required this.elements, + }); + + final String title; + final List? elements; + + @override + Widget build(BuildContext context) { + if (elements == null) { + return const SizedBox(); + } + + final AmbitoTheme theme = getTheme(context); + + globalKeys.putIfAbsent(title, () => GlobalKey()); + + return ExpansionTileCard( + key: globalKeys[title], + initiallyExpanded: true, + contentPadding: const EdgeInsets.only(left: 16), + elevation: 0, + expandedTextColor: theme.currentColorScheme.outline, + baseColor: theme.currentColorScheme.outline.withOpacity(.1), + expandedColor: theme.currentColorScheme.outline.withOpacity(.1), + title: Text( + title, + style: theme.currentThemeData.textTheme.labelMedium + ?.copyWith(fontWeight: FontWeight.bold), + ), + children: [ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20), + child: Column( + children: elements!, + ), + ), + ), + ], + ); + } +} diff --git a/lib/src/pages/measure/detail/cards/main/gallery_card.dart b/lib/src/pages/measure/detail/cards/main/gallery_card.dart new file mode 100644 index 0000000..d61d131 --- /dev/null +++ b/lib/src/pages/measure/detail/cards/main/gallery_card.dart @@ -0,0 +1,67 @@ +import 'package:expansion_tile_card/expansion_tile_card.dart'; +import 'package:flutter/material.dart'; +import 'package:horizontal_list/horizontal_list.dart'; + +import '../../../../../packages/ambito_theme/ambito_theme.dart'; +import '../../measure_detail_page.dart'; + +class GalleryCard extends StatelessWidget { + const GalleryCard({ + super.key, + required this.title, + required this.widgets, + }); + + final String title; + final List? widgets; + + @override + Widget build(BuildContext context) { + if (widgets == null) { + return const SizedBox(); + } + + final AmbitoTheme theme = getTheme(context); + + globalKeys.putIfAbsent(title, () => GlobalKey()); + + return ExpansionTileCard( + key: globalKeys[title], + initiallyExpanded: true, + contentPadding: const EdgeInsets.only(left: 16), + elevation: 0, + expandedTextColor: theme.currentColorScheme.outline, + baseColor: theme.currentColorScheme.outline.withOpacity(.1), + expandedColor: theme.currentColorScheme.outline.withOpacity(.1), + title: Text( + title, + style: theme.currentThemeData.textTheme.labelMedium + ?.copyWith(fontWeight: FontWeight.bold), + ), + children: [ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20), + child: HorizontalListView( + width: double.maxFinite, //Width of widget + height: 150, //Height of widget + list: widgets!, //List of widget + iconNext: + const Icon(Icons.arrow_forward_ios), // Icon for button next + iconPrevious: + const Icon(Icons.arrow_back_ios), // Icon for button previous + curveAnimation: + Curves.fastLinearToSlowEaseIn, //Curve for animation + durationAnimation: + const Duration(milliseconds: 300), //Duration of animation + enableManualScroll: true, //Enable manual scroll + onNextPressed: () {}, + onPreviousPressed: () {}, + ), + ), + ), + ], + ); + } +} diff --git a/lib/src/pages/measure/detail/cards/main/simple_text_card.dart b/lib/src/pages/measure/detail/cards/main/simple_text_card.dart new file mode 100644 index 0000000..f3d8828 --- /dev/null +++ b/lib/src/pages/measure/detail/cards/main/simple_text_card.dart @@ -0,0 +1,54 @@ +import 'package:expansion_tile_card/expansion_tile_card.dart'; +import 'package:flutter/cupertino.dart'; + +import '../../../../../packages/ambito_theme/ambito_theme.dart'; +import '../../measure_detail_page.dart'; + +class SimpleTextCard extends StatelessWidget { + const SimpleTextCard({ + super.key, + required this.title, + required this.text, + }); + + final String title; + final String? text; + + @override + Widget build(BuildContext context) { + if (text == null) { + return const SizedBox(); + } + + final AmbitoTheme theme = getTheme(context); + + globalKeys.putIfAbsent(title, () => GlobalKey()); + + return ExpansionTileCard( + key: globalKeys[title], + initiallyExpanded: true, + contentPadding: const EdgeInsets.only(left: 16), + elevation: 0, + expandedTextColor: theme.currentColorScheme.outline, + baseColor: theme.currentColorScheme.outline.withOpacity(.1), + expandedColor: theme.currentColorScheme.outline.withOpacity(.1), + title: Text( + title, + style: theme.currentThemeData.textTheme.labelMedium + ?.copyWith(fontWeight: FontWeight.bold), + ), + children: [ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20), + child: Text( + text!, + style: theme.bodyMedium, + ), + ), + ), + ], + ); + } +} diff --git a/lib/src/pages/measure/detail/cards/main/sublevel_months_card.dart b/lib/src/pages/measure/detail/cards/main/sublevel_months_card.dart new file mode 100644 index 0000000..d4ae2c8 --- /dev/null +++ b/lib/src/pages/measure/detail/cards/main/sublevel_months_card.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; + +import '../../../../../consts/consts.dart'; +import '../../../../../packages/ambito_theme/ambito_theme.dart'; + +class SublevelMonthsCard extends StatelessWidget { + const SublevelMonthsCard({ + super.key, + required this.title, + required this.items, + }); + + final String title; + final List? items; + + @override + Widget build(BuildContext context) { + if (items == null) { + return const SizedBox(); + } + + final AmbitoTheme theme = getTheme(context); + + Chip buildChip(String label, [active = false]) { + return Chip( + labelPadding: EdgeInsets.zero, + backgroundColor: active + ? theme.currentColorScheme.secondary + : theme.currentColorScheme.outline.withOpacity(.1), + label: Text( + label, + style: theme.currentThemeData.textTheme.bodyLarge?.copyWith( + color: active + ? theme.currentColorScheme.onSecondary + : theme.currentColorScheme.onSurface, + ), + ), + ); + } + + List buildChips(List? items) => + months.map((item) => buildChip(item, items?.contains(item))).toList(); + + final chips = buildChips(items); + + return Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.only(right: 20, bottom: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: theme.currentThemeData.textTheme.labelMedium, + ), + theme.verticalSpacerSmall, + Wrap( + runSpacing: 8, + spacing: 8, + children: chips, + ), + ], + ), + ), + ); + } +} diff --git a/lib/src/pages/measure/detail/cards/main/sublevel_text_card.dart b/lib/src/pages/measure/detail/cards/main/sublevel_text_card.dart new file mode 100644 index 0000000..7d67534 --- /dev/null +++ b/lib/src/pages/measure/detail/cards/main/sublevel_text_card.dart @@ -0,0 +1,48 @@ +import 'package:expansion_tile_card/expansion_tile_card.dart'; +import 'package:flutter/cupertino.dart'; + +import '../../../../../packages/ambito_theme/ambito_theme.dart'; +import '../../measure_detail_page.dart'; + +class SublevelTextCard extends StatelessWidget { + const SublevelTextCard({ + super.key, + required this.title, + required this.text, + }); + + final String title; + final String? text; + + @override + Widget build(BuildContext context) { + if (text == null) { + return const SizedBox(); + } + + final AmbitoTheme theme = getTheme(context); + + globalKeys.putIfAbsent(title, () => GlobalKey()); + + return Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.only(right: 20, bottom: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: theme.currentThemeData.textTheme.labelMedium, + ), + theme.verticalSpacerSmall, + Text( + text!, + style: theme.bodyMedium, + ), + ], + ), + ), + ); + } +} diff --git a/lib/src/pages/measure/detail/cards/main/sublevel_unordered_list_card.dart b/lib/src/pages/measure/detail/cards/main/sublevel_unordered_list_card.dart new file mode 100644 index 0000000..fdd0c6f --- /dev/null +++ b/lib/src/pages/measure/detail/cards/main/sublevel_unordered_list_card.dart @@ -0,0 +1,66 @@ +import 'package:expansion_tile_card/expansion_tile_card.dart'; +import 'package:flutter/material.dart'; + +import '../../../../../packages/ambito_theme/ambito_theme.dart'; +import '../../measure_detail_page.dart'; + +class SublevelUnorderedListCard extends StatelessWidget { + const SublevelUnorderedListCard({ + super.key, + required this.title, + required this.text, + }); + + final String title; + final List? text; + + @override + Widget build(BuildContext context) { + if (text == null) { + return const SizedBox(); + } + + final AmbitoTheme theme = getTheme(context); + + globalKeys.putIfAbsent(title, () => GlobalKey()); + + return Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.only(right: 20, bottom: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + title, + style: theme.currentThemeData.textTheme.labelMedium, + ), + ...text! + .map( + (item) => Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Align( + alignment: Alignment.center, + child: Icon(Icons.circle, size: 4), + ), + theme.horizontalSpacerSmall, + Expanded( + child: Text( + item, + softWrap: true, + maxLines: 2, + style: theme.bodyMedium, + ), + ), + ], + ), + ) + .toList(), + ], + ), + ), + ); + } +} diff --git a/lib/src/pages/measure/detail/cards/main/unordered_list_card.dart b/lib/src/pages/measure/detail/cards/main/unordered_list_card.dart new file mode 100644 index 0000000..a605d16 --- /dev/null +++ b/lib/src/pages/measure/detail/cards/main/unordered_list_card.dart @@ -0,0 +1,70 @@ +import 'package:expansion_tile_card/expansion_tile_card.dart'; +import 'package:flutter/material.dart'; + +import '../../../../../packages/ambito_theme/ambito_theme.dart'; +import '../../measure_detail_page.dart'; + +class UnorderedListCard extends StatelessWidget { + const UnorderedListCard({ + super.key, + required this.title, + required this.text, + }); + + final String title; + final List? text; + + @override + Widget build(BuildContext context) { + if (text == null) { + return const SizedBox(); + } + + final AmbitoTheme theme = getTheme(context); + + globalKeys.putIfAbsent(title, () => GlobalKey()); + + return ExpansionTileCard( + key: globalKeys[title], + initiallyExpanded: true, + contentPadding: const EdgeInsets.only(left: 16), + elevation: 0, + expandedTextColor: theme.currentColorScheme.outline, + baseColor: theme.currentColorScheme.outline.withOpacity(.1), + expandedColor: theme.currentColorScheme.outline.withOpacity(.1), + title: Text( + title, + style: theme.currentThemeData.textTheme.labelMedium + ?.copyWith(fontWeight: FontWeight.bold), + ), + children: [ + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20), + child: Column( + children: text! + .map( + (item) => Row( + children: [ + const Icon(Icons.circle, size: 4), + theme.horizontalSpacerSmall, + Expanded( + child: Text( + item, + softWrap: true, + maxLines: 2, + style: theme.bodyMedium, + ), + ), + ], + ), + ) + .toList(), + ), + ), + ), + ], + ); + } +} diff --git a/lib/src/pages/measure/detail/cards/maintenance_card.dart b/lib/src/pages/measure/detail/cards/maintenance_card.dart deleted file mode 100644 index 6d2ac23..0000000 --- a/lib/src/pages/measure/detail/cards/maintenance_card.dart +++ /dev/null @@ -1,144 +0,0 @@ -import 'package:ambito/src/extensions/extensions.dart'; -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; -import '_main_card.dart'; - -class MaintenanceCard extends StatelessWidget { - const MaintenanceCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - Chip buildChip(String label) { - return Chip( - labelPadding: EdgeInsets.zero, - backgroundColor: theme.currentColorScheme.secondary, - label: Text( - label, - style: theme.currentThemeData.textTheme.bodyLarge - ?.copyWith(color: theme.currentColorScheme.onSecondary), - ), - ); - } - - List buildChips(List? items) => - items - ?.where((item) => item?.isNotEmpty ?? false) - .map((item) => buildChip(item!)) - .toList() ?? - []; - - List buildTools(List? tools) => - tools?.where((item) => item?.isNotEmpty ?? false).map((item) { - return Row( - children: [ - const Icon(Icons.fiber_manual_record, size: 8), - theme.horizontalSpacerSmall, - Expanded( - child: Text( - item!, - style: theme.currentThemeData.textTheme.bodyLarge, - ), - ), - ], - ); - }).toList() ?? - []; - - Widget buildSection({ - required String titleKey, - required List children, - }) { - if (children.isEmpty) return const SizedBox.shrink(); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Divider(), - Text( - context.translate(titleKey), - style: theme.currentThemeData.textTheme.labelMedium, - ), - ...children, - ], - ); - } - - Widget buildTextSection(String? text, String titleKey) { - if (text == null || text.isEmpty) return const SizedBox.shrink(); - return buildSection( - titleKey: titleKey, - children: [ - Text( - text, - style: theme.currentThemeData.textTheme.bodyLarge, - ), - ], - ); - } - - final tfChips = buildChips( - massnahme.maintenanceTimeFrame?.map((e) => e.value).toList()); - final tfMaintenance = buildChips( - massnahme.maintenanceFrequency?.map((e) => e.value).toList()); - final creationTools = - buildTools(massnahme.maintenanceMaterial?.map((e) => e.value).toList()); - - return MainCard( - massnahme: massnahme, - title: 'page.actionDetailPage.maintenance.title', - content: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (tfChips.isNotEmpty) - buildSection( - titleKey: 'page.actionDetailPage.maintenance.time', - children: [ - Wrap( - runSpacing: 8, - spacing: 8, - children: tfChips, - ), - ], - ), - buildTextSection( - massnahme.maintenanceTimeFrameAdditional, - 'page.actionDetailPage.maintenance.additional_time', - ), - if (tfMaintenance.isNotEmpty) - buildSection( - titleKey: 'page.actionDetailPage.maintenance.frequency', - children: [ - Wrap( - runSpacing: 8, - spacing: 8, - children: tfMaintenance, - ), - ], - ), - buildTextSection( - massnahme.maintenanceFrequencyAdditional, - 'page.actionDetailPage.maintenance.additional_frequency', - ), - if (creationTools.isNotEmpty) - buildSection( - titleKey: 'page.actionDetailPage.maintenance.tools', - children: creationTools, - ), - buildTextSection( - massnahme.maintenanceWorkSteps, - 'page.actionDetailPage.maintenance.steps', - ), - buildTextSection( - massnahme.maintenanceTips, - 'page.actionDetailPage.maintenance.tips', - ), - ], - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/material_card.dart b/lib/src/pages/measure/detail/cards/material_card.dart index c4943d6..1df0fd0 100644 --- a/lib/src/pages/measure/detail/cards/material_card.dart +++ b/lib/src/pages/measure/detail/cards/material_card.dart @@ -1,15 +1,26 @@ -import 'package:ambito/src/extensions/extensions.dart'; -import 'package:ambito/src/widgets/buttons/text_button.dart'; -import 'package:flutter/material.dart'; +import 'dart:convert'; -import '../../../../entity/entities.dart'; +import 'package:ambito/src/entity/_general/id_value/id_value.dart'; +import 'package:ambito/src/entity/cart/cart.dart'; +import 'package:ambito/src/entity/cart/cart_element.dart'; +import 'package:ambito/src/extensions/extensions.dart'; +import 'package:ambito/src/packages/ambito_api/base_api.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +import '../../../../consts/consts.dart'; +import '../../../../entity/measure/complete/measure_complete.dart'; import '../../../../packages/ambito_theme/ambito_theme.dart'; +import '../../../../widgets/buttons/text_button.dart'; +import '../../../cart/cart_page.dart'; import '_sidebar_card.dart'; class MaterialCard extends StatelessWidget { - const MaterialCard({super.key, required this.massnahme}); + MaterialCard({super.key, required this.massnahme}); - final MeasureTypes massnahme; + final MeasureComplete massnahme; + + final List elements = []; @override Widget build(BuildContext context) { @@ -21,17 +32,62 @@ class MaterialCard extends StatelessWidget { content: [ _getSortedMaterials(context), theme.verticalSpacer, - if (massnahme.applyMaterialCosts != null) - Text(context - .translate('page.actionDetailPage.material.suggested_price') + - massnahme.applyMaterialCosts + - ' €'), - theme.verticalSpacerSmall, + if (massnahme.costs != null) + Text( + context.translate( + 'page.actionDetailPage.material.suggested_price') + + massnahme.costs + + ' €', + style: theme.bodyMedium.copyWith(fontWeight: FontWeight.bold), + ), + theme.verticalSpacer, Align( alignment: Alignment.center, child: TextButtonElement( title: 'page.actionDetailPage.material.add_to_basket', - onPressed: () {}, + onPressed: () async { + prefs.setBool('extended_json', false).then((_) async { + var cartId = isar.carts.autoIncrement(); + Cart newCart = Cart() + ..id = cartId + ..name = massnahme.name + ..business = [ + (IdValue()..id = (prefs.getInt('currrentUser') ?? 100)) + ]; + + final cart = await BaseApi() + .postContent('cart', newCart.toJson(), false); + newCart = Cart.fromJson(jsonDecode(cart)); + IdValue cartIdv = (IdValue()..id = newCart.id); + List elements = []; + final cartElement = CartElement() + ..id = isar.cartElements.autoIncrement() + ..cart = [cartIdv] + ..name = massnahme.name + ..amount = '1' + ..priceType = massnahme.costsUnit + ..provider = [] + ..price = massnahme.costs ?? '0.0'; + await BaseApi() + .postContent('cart_elements', cartElement.toJson(), false); + elements.add(cartElement); + for (var item in massnahme.applyMaterials ?? []) { + final addtionalElement = CartElement() + ..id = isar.cartElements.autoIncrement() + ..cart = [cartIdv] + ..name = item + ..amount = '1' + ..priceType = 'Stk' + ..provider = [] + ..price = '0.0'; + await BaseApi().postContent( + 'cart_elements', addtionalElement.toJson(), false); + elements.add(addtionalElement); + } + + Get.to(() => CartPage(measure: massnahme)); + }); + }, ), ) ], @@ -41,15 +97,16 @@ class MaterialCard extends StatelessWidget { _getSortedMaterials(BuildContext context) { final AmbitoTheme theme = getTheme(context); - List items = []; - if (massnahme.applyMaterial != null) { - for (IdValueColor ivc in massnahme.applyMaterial!) { - items.add(ivc.value!); - } - } + List items = massnahme.applyMaterials ?? []; items.sort((a, b) => a.toString().compareTo(b.toString())); List tiles = []; for (String item in items) { + elements.add( + CartElement() + ..name = item + ..amount = '1' + ..price = massnahme.costs ?? '0.0', + ); tiles.add( Row( children: [ diff --git a/lib/src/pages/measure/detail/cards/presets_card.dart b/lib/src/pages/measure/detail/cards/presets_card.dart deleted file mode 100644 index fd65eef..0000000 --- a/lib/src/pages/measure/detail/cards/presets_card.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; -import '_main_card.dart'; - -class PresetsCard extends StatelessWidget { - const PresetsCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - return MainCard( - massnahme: massnahme, - title: 'page.actionDetailPage.presets.title', - content: Text( - massnahme.requirementTips.toString(), - style: theme.currentThemeData.textTheme.bodyLarge, - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/review_card.dart b/lib/src/pages/measure/detail/cards/review_card.dart deleted file mode 100644 index 1fe33e0..0000000 --- a/lib/src/pages/measure/detail/cards/review_card.dart +++ /dev/null @@ -1,60 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_rating/flutter_rating.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; -import '_sidebar_card.dart'; - -class ReviewCard extends StatelessWidget { - const ReviewCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - return SideBarCard( - massnahme: massnahme, - title: 'page.actionDetailPage.review.title', - content: [ - StarRating( - mainAxisAlignment: MainAxisAlignment.start, - size: 24, - allowHalfRating: true, - rating: 3.5, - filledIcon: Icons.star, - halfFilledIcon: Icons.star_half, - emptyIcon: Icons.star_border_outlined, - color: - Colors.yellow.shade800, // Color for filled and half-filled icons - borderColor: Colors.yellow.shade800, // Color for empty icons - onRatingChanged: null, - ), - theme.verticalSpacerSmall, - Text( - '21 Bewertungen', - style: theme.bodySmall, - ), - theme.verticalSpacer, - Text( - '"Sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam"', - style: theme.bodyLarge.copyWith(fontWeight: FontWeight.bold), - ), - Text( - 'Maxi Mustermann', - style: theme.bodyLarge.copyWith(fontWeight: FontWeight.bold), - ), - theme.verticalSpacer, - Text( - '"Lorem ipsum dolor sit amet, consetetur sadipscing elitr"', - style: theme.bodyLarge.copyWith(fontWeight: FontWeight.bold), - ), - Text( - 'Peter Parker', - style: theme.bodyLarge.copyWith(fontWeight: FontWeight.bold), - ), - ], - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/size_card.dart b/lib/src/pages/measure/detail/cards/size_card.dart deleted file mode 100644 index 99c7f3b..0000000 --- a/lib/src/pages/measure/detail/cards/size_card.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; -import '_main_card.dart'; - -class SizeCard extends StatelessWidget { - const SizeCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - return MainCard( - massnahme: massnahme, - title: 'page.actionDetailPage.size.title', - content: Text( - massnahme.applySize.toString(), - style: theme.currentThemeData.textTheme.bodyLarge, - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/sources_card.dart b/lib/src/pages/measure/detail/cards/sources_card.dart deleted file mode 100644 index 52c63d8..0000000 --- a/lib/src/pages/measure/detail/cards/sources_card.dart +++ /dev/null @@ -1,26 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../../../entity/entities.dart'; -import '../../../../packages/ambito_theme/ambito_theme.dart'; -import '_main_card.dart'; - -class SourcesCard extends StatelessWidget { - const SourcesCard({super.key, required this.massnahme}); - - final MeasureTypes massnahme; - - @override - Widget build(BuildContext context) { - final AmbitoTheme theme = getTheme(context); - - return MainCard( - massnahme: massnahme, - title: 'page.actionDetailPage.sources.title', - content: Text( - massnahme.sources ?? '', - style: theme.currentThemeData.textTheme.bodyLarge, - textAlign: TextAlign.left, - ), - ); - } -} diff --git a/lib/src/pages/measure/detail/cards/toc_card.dart b/lib/src/pages/measure/detail/cards/toc_card.dart index 538422d..0f51533 100644 --- a/lib/src/pages/measure/detail/cards/toc_card.dart +++ b/lib/src/pages/measure/detail/cards/toc_card.dart @@ -1,15 +1,20 @@ +import 'package:ambito/src/entity/measure/complete/measure_complete.dart'; import 'package:flutter/material.dart'; -import 'package:super_bullet_list/bullet_list.dart'; -import '../../../../entity/entities.dart'; import '../../../../packages/ambito_theme/ambito_theme.dart'; import '_sidebar_card.dart'; class TocCard extends StatelessWidget { - const TocCard({super.key, required this.massnahme, required this.items}); + const TocCard({ + super.key, + required this.massnahme, + required this.items, + required this.scrollController, + }); - final MeasureTypes massnahme; + final MeasureComplete massnahme; final List items; + final ScrollController scrollController; @override Widget build(BuildContext context) { @@ -18,20 +23,25 @@ class TocCard extends StatelessWidget { return SideBarCard( massnahme: massnahme, title: 'page.actionDetailPage.toc.title', - content: [ - SuperBulletList( - gap: 2, - crossAxisMargin: 2, - iconSize: 24, - isOrdered: true, - items: items - .map((item) => Text( - item, - style: theme.bodyLarge, - )) - .toList(), - ), - ], + content: items + .map((item) => Row( + children: [ + SizedBox(width: 30, child: + Text( + '${items.indexOf(item) + 1}. ', + style: theme.bodyMedium, + ),), + Expanded( + child: InkWell( + child: Text( + item, + style: theme.bodyMedium, + ), + ), + ) + ], + )) + .toList(), ); } } diff --git a/lib/src/pages/measure/detail/measure_detail_page.dart b/lib/src/pages/measure/detail/measure_detail_page.dart index 587252e..7720431 100644 --- a/lib/src/pages/measure/detail/measure_detail_page.dart +++ b/lib/src/pages/measure/detail/measure_detail_page.dart @@ -1,6 +1,16 @@ import 'package:ambito/src/entity/entities.dart'; -import 'package:ambito/src/entity/enums/enum_details_type.dart'; +import 'package:ambito/src/entity/measure/details/measure_details.dart'; +import 'package:ambito/src/entity/measure/details/measure_details_repository.dart'; +import 'package:ambito/src/entity/measure/measure_repository.dart'; +import 'package:ambito/src/entity/measure/types_details/measure_types_details.dart'; +import 'package:ambito/src/entity/measure/types_details/measure_types_details_repository.dart'; import 'package:ambito/src/extensions/extensions.dart'; +import 'package:ambito/src/pages/measure/detail/cards/main/combined_card.dart'; +import 'package:ambito/src/pages/measure/detail/cards/main/gallery_card.dart'; +import 'package:ambito/src/pages/measure/detail/cards/main/simple_text_card.dart'; +import 'package:ambito/src/pages/measure/detail/cards/main/sublevel_months_card.dart'; +import 'package:ambito/src/pages/measure/detail/cards/main/sublevel_text_card.dart'; +import 'package:ambito/src/pages/measure/detail/cards/main/unordered_list_card.dart'; import 'package:animated_segmented_tab_control/animated_segmented_tab_control.dart'; import 'package:expansion_tile_card/expansion_tile_card.dart'; import 'package:flutter/material.dart'; @@ -11,6 +21,7 @@ import 'package:screen_breakpoints/screen_breakpoints.dart'; import '../../../config/config.dart'; import '../../../consts/consts.dart'; +import '../../../entity/measure/complete/measure_complete.dart'; import '../../../packages/ambito_theme/ambito_theme.dart'; import '../../../widgets/appbar/ambito_appbar.dart'; import '../../ambito_page.dart'; @@ -19,10 +30,7 @@ import 'cards/_cards.dart'; final Map> globalKeys = {}; class MeasureDetailPage extends AmbitoPage { - const MeasureDetailPage({required this.id, required this.type, super.key}); - - final EnumDetailsType type; - final int id; + const MeasureDetailPage({super.key}); @override final String path = 'massnahme'; @@ -35,33 +43,73 @@ class MeasureDetailPage extends AmbitoPage { class MeasureDetailPageState extends State { final ScrollController scrollController = ScrollController(); + final ScrollController itemScrollController = ScrollController(); + bool showBackToTopButton = false; final Map> expansionKeys = {}; MeasureGeneral? measureGeneral; + MeasureDetails? measureDetails; + MeasureTypes? measureType; + MeasureTypesDetails? measureTypesDetails; List contentItems = []; final Set visibleItems = {}; bool collapsed = false; + int? id; + + MeasureComplete? measure; @override void initState() { super.initState(); - //massnahme = MeasureRepository().get(int.parse(id)) as MeasureTypes; - //} + // Parse ID from parameters + id = int.tryParse(Get.parameters['id'] ?? '0') ?? 0; - List generals = isar.measureGenerals.where().findAll(); + // Initialize combined map with ID + Map combined = {'id': id}; - logger.d(generals.map((el) => el.id)); + // Retrieve measureGeneral data + measureGeneral = isar.measureGenerals.where().idEqualTo(id!).findFirst(); - measureGeneral = - isar.measureGenerals.where().idEqualTo(widget.id).findFirst(); + if (measureGeneral != null) { + // Fetch related details and types + measureDetails = MeasureDetailsRepository() + .getDetailsForMeasure(measureGeneral!.name!); + measureType = MeasureRepository().getTypeByName( + measureGeneral!.measureType!.map((el) => el.value).first!); + measureTypesDetails = MeasureTypesDetailsRepository() + .getTypeDetailsForType(measureType!.measureType!); + } - logger.d(measureGeneral); + // Save preferences and populate combined map + prefs.setBool('extended_json', true).then((_) { + _mergeToCombinedMap(combined, measureGeneral?.toJson()); + _mergeToCombinedMap(combined, measureDetails?.toJson()); + _mergeToCombinedMap(combined, measureType?.toJson()); + _mergeToCombinedMap(combined, measureTypesDetails?.toJson()); + setState(() { + measure = MeasureComplete.fromJson(combined); + }); + logger.d(measure!.toJson()); + }); + + // Add scroll listener for the back-to-top button scrollController.addListener(() { const showOffset = 10.0; - setState( - () => showBackToTopButton = scrollController.offset > showOffset); + setState(() { + showBackToTopButton = scrollController.offset > showOffset; + }); + }); + } + +// Utility function to merge data into combined map, excluding 'id' + void _mergeToCombinedMap( + Map combined, Map? data) { + data?.forEach((key, value) { + if (key != 'id') { + combined[key] = value; + } }); } @@ -74,9 +122,9 @@ class MeasureDetailPageState extends State { breakpoint: Breakpoint.fromContext(context), theme: theme, ), - /*body: (context.breakpoint != myBreakpoints.sm) - ? _buildInfoPage(context, massnahme) - : _tabbedInfoPage(context, massnahme), + body: (context.breakpoint != myBreakpoints.sm) + ? _buildInfoPage(context, measure) + : _tabbedInfoPage(context, measure), floatingActionButton: (context.breakpoint != myBreakpoints.sm) ? AnimatedOpacity( duration: const Duration(milliseconds: 1000), @@ -94,11 +142,11 @@ class MeasureDetailPageState extends State { color: theme.currentColorScheme.onPrimary), ), ) - : null,*/ + : null, ); } - Widget _tabbedInfoPage(BuildContext context, MeasureTypes? massnahme) { + Widget _tabbedInfoPage(BuildContext context, MeasureComplete? massnahme) { final AmbitoTheme theme = getTheme(context); if (massnahme == null) { @@ -152,11 +200,11 @@ class MeasureDetailPageState extends State { SingleChildScrollView( child: Column(children: _buildContentItems(massnahme)), ), - SingleChildScrollView( + /*SingleChildScrollView( child: Column( children: _buildSidebarItems(context, theme, massnahme), ), - ), + ),*/ ], ), ), @@ -166,22 +214,20 @@ class MeasureDetailPageState extends State { ); } - Widget _buildInfoPage(BuildContext context, MeasureTypes? massnahme) { + Widget _buildInfoPage(BuildContext context, MeasureComplete? measure) { final AmbitoTheme theme = getTheme(context); - if (massnahme == null) { + if (measure == null) { return const Center(child: CircularProgressIndicator()); } - contentItems = _buildContentItems(massnahme); + contentItems = _buildContentItems(measure); return Column( children: [ - _buildBreadcrumb(context, theme, massnahme), + //_buildBreadcrumb(context, theme, massnahme), SizedBox( - width: double.infinity, - height: 300, - child: massnahme.getFullImage()), + width: double.infinity, height: 300, child: measure.getFullImage()), Expanded( child: SingleChildScrollView( controller: scrollController, @@ -193,7 +239,7 @@ class MeasureDetailPageState extends State { Align( alignment: Alignment.centerLeft, child: Text( - massnahme.measureType!, + measure.name, style: theme.currentThemeData.textTheme.headlineMedium, ), ), @@ -202,14 +248,22 @@ class MeasureDetailPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( - child: Column(children: contentItems), + child: Column(children: [ + ListView.builder( + controller: itemScrollController, + itemCount: contentItems.length, + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemBuilder: (context, index) { + return contentItems[index]; + }), + ]), ), theme.horizontalSpacer, SizedBox( width: 300, child: Column( - children: - _buildSidebarItems(context, theme, massnahme), + children: _buildSidebarItems(context, theme, measure), ), ), ], @@ -257,68 +311,182 @@ class MeasureDetailPageState extends State { ); } - List _buildContentItems(MeasureTypes massnahme) { + List _buildContentItems(MeasureComplete measure) { final AmbitoTheme theme = getTheme(context); List elements = []; - void addCard( - {required Widget card, - required String titleKey, - required bool condition}) { - if (condition) { - visibleItems.add(context.translate(titleKey)); - elements.addAll([card, theme.verticalSpacer]); + void addCard({ + required String title, + required Widget widget, + }) { + if (widget != const SizedBox()) { + visibleItems.add(title); + elements.add(widget); + elements.add(theme.verticalSpacer); } } addCard( - card: DescriptionCard(massnahme: massnahme), - titleKey: 'page.actionDetailPage.description.title', - condition: massnahme.description?.isNotEmpty ?? false, + title: 'Beschreibung', + widget: SimpleTextCard( + title: 'Beschreibung', + text: measure.description, + ), ); addCard( - card: PresetsCard(massnahme: massnahme), - titleKey: 'page.actionDetailPage.presets.title', - condition: massnahme.objective?.isNotEmpty ?? false, + title: 'Zielsetzung', + widget: SimpleTextCard( + title: 'Zielsetzung', + text: measure.target, + ), ); addCard( - card: SizeCard(massnahme: massnahme), - titleKey: 'page.actionDetailPage.size.title', - condition: massnahme.applySize?.isNotEmpty ?? false, + title: 'Förderprogramme', + widget: UnorderedListCard( + title: 'Förderprogramme', + text: measure.fundingPrograms, + ), ); addCard( - card: LocationCard(massnahme: massnahme), - titleKey: 'page.actionDetailPage.location.title', - condition: massnahme.applyLocation?.isNotEmpty ?? false, + title: 'Größe / Fläche', + widget: UnorderedListCard( + title: 'Größe / Fläche', + text: measure.sizeOrArea, + ), ); addCard( - card: ImplementationCard(massnahme: massnahme), - titleKey: 'page.actionDetailPage.implementation.title', - condition: (massnahme.applyCosts?.isNotEmpty ?? false) && - (massnahme.applyTime?.isNotEmpty ?? false), + title: 'Wuchs / Krone', + widget: SimpleTextCard( + title: 'Wuchs / Krone', + text: measure.growth, + ), ); addCard( - card: CreationCard(massnahme: massnahme), - titleKey: 'page.actionDetailPage.creation.title', - condition: massnahme.applyTimeFrame?.isNotEmpty ?? false, + title: 'Klima', + widget: SimpleTextCard( + title: 'Klima', + text: measure.climate, + ), ); addCard( - card: MaintenanceCard(massnahme: massnahme), - titleKey: 'page.actionDetailPage.maintenance.title', - condition: massnahme.maintenanceTimeFrame?.isNotEmpty ?? false, + title: 'Bodenwasser', + widget: SimpleTextCard( + title: 'Bodenwasser', + text: measure.soilWater, + ), ); addCard( - card: SourcesCard(massnahme: massnahme), - titleKey: 'page.actionDetailPage.sources.title', - condition: massnahme.sources?.isNotEmpty ?? false, + title: 'Region', + widget: SimpleTextCard( + title: 'Region', + text: measure.region?.join(', '), + ), + ); + + addCard( + title: 'Standort', + widget: SimpleTextCard( + title: 'Standort', + text: measure.location, + ), + ); + + addCard( + title: 'Fachgerechte Umsetzung', + widget: CombinedCard( + title: 'Fachgerechte Umsetzung', + elements: [ + SublevelTextCard( + title: 'Kosten', + text: measure.applyCosts, + ), + const Divider(), + SublevelTextCard( + title: 'Zeit', + text: measure.applyDuration, + ), + ], + ), + ); + + addCard( + title: 'Anlage', + widget: CombinedCard( + title: 'Anlage', + elements: [ + SublevelMonthsCard( + title: 'Zeitrahmen', + items: measure.applyMonths, + ), + const Divider(), + SublevelTextCard( + title: 'Zusatzinformationen', + text: measure.applyAdditionalInfos, + ), + const Divider(), + SublevelTextCard( + title: 'Arbeitsschritte', + text: measure.applySteps, + ), + ], + ), + ); + + addCard( + title: 'Galerie', + widget: GalleryCard( + title: 'Galerie', + widgets: measure.getGalleryThumbnails(), + ), + ); + + addCard( + title: 'Pflege', + widget: CombinedCard( + title: 'Pflege', + elements: [ + SublevelMonthsCard( + title: 'Zeitrahmen', + items: measure.maintenanceMonths, + ), + const Divider(), + SublevelTextCard( + title: 'Zusatzinformationen', + text: measure.maintenanceAdditionalInfos, + ), + const Divider(), + SublevelTextCard( + title: 'Frequenz', + text: measure.maintenanceFrequency, + ), + const Divider(), + SublevelTextCard( + title: 'Arbeitsschritte', + text: measure.maintenanceSteps, + ), + const Divider(), + SublevelTextCard( + title: 'Besonderheiten', + text: measure.maintenanceSpecialFeatures, + ), + ], + ), + ); + + addCard( + title: 'Quellen', + widget: SimpleTextCard( + title: 'Quellen', + text: measure.sources, + ), ); return [ @@ -354,10 +522,14 @@ class MeasureDetailPageState extends State { } List _buildSidebarItems( - BuildContext context, AmbitoTheme theme, MeasureTypes massnahme) { + BuildContext context, AmbitoTheme theme, MeasureComplete massnahme) { return [ if (visibleItems.isNotEmpty && context.breakpoint != myBreakpoints.sm) - TocCard(massnahme: massnahme, items: visibleItems.toList()), + TocCard( + massnahme: massnahme, + items: visibleItems.toList(), + scrollController: itemScrollController, + ), if (visibleItems.isNotEmpty && context.breakpoint != myBreakpoints.sm) theme.verticalSpacer, AdvisorCard(massnahme: massnahme), @@ -366,7 +538,6 @@ class MeasureDetailPageState extends State { theme.verticalSpacer, FactsheetCard(massnahme: massnahme), theme.verticalSpacer, - ReviewCard(massnahme: massnahme), ]; } } diff --git a/lib/src/pages/measure/groups/measure_groups_page.dart b/lib/src/pages/measure/groups/measure_groups_page.dart index 21d5f3b..39b5f61 100644 --- a/lib/src/pages/measure/groups/measure_groups_page.dart +++ b/lib/src/pages/measure/groups/measure_groups_page.dart @@ -40,8 +40,6 @@ class MeasureGroupsPageState extends State { Widget build(BuildContext context) { final AmbitoTheme theme = getTheme(context); - //counter = MeasureRepository().getTypesCounterByCategory(currentCategory); - setState(() { cards = {}; }); diff --git a/lib/src/pages/measure/measure_page.dart b/lib/src/pages/measure/measure_page.dart index 577a56f..ad1b73d 100644 --- a/lib/src/pages/measure/measure_page.dart +++ b/lib/src/pages/measure/measure_page.dart @@ -1,11 +1,9 @@ import 'package:ambito/src/config/config.dart'; -import 'package:ambito/src/entity/enums/enum_details_type.dart'; import 'package:ambito/src/entity/funding_program/funding_program_repository.dart'; import 'package:ambito/src/entity/lists/list_display.dart'; import 'package:ambito/src/entity/lists/list_repository.dart'; import 'package:ambito/src/extensions/extensions.dart'; import 'package:ambito/src/pages/ambito_page.dart'; -import 'package:ambito/src/pages/measure/detail/measure_detail_page.dart'; import 'package:ambito/src/widgets/form/fields/field_title.dart'; import 'package:ambito/src/widgets/form/form_widget.dart'; import 'package:ambito/src/widgets/form/form_widget_type.dart'; @@ -52,8 +50,6 @@ class MeasuresPageState extends State { void initState() { ambitoFilterNotifier.addListener(_changeListener); - _initializeData(); - preselectCategory = Get.parameters['kategorie'] ?? ''; if (preselectCategory != '') { setState(() { @@ -102,30 +98,23 @@ class MeasuresPageState extends State { filterCategory = ambitoFilterNotifier.getFilter('category') ?? ''; filterGroup = ambitoFilterNotifier.getFilter('group') ?? ''; filterType = ambitoFilterNotifier.getFilter('type') ?? ''; - /*filterSupport = ambitoFilterNotifier.getFilter('fundingProgram'); - filterMonths = ambitoFilterNotifier.getFilter('month');*/ - - if (filterGroup == '' && filterType == '') { - setState(() { - itemsToDisplay = ListRepository().getGroupsToDisplay(filterCategory); - }); - } else if (filterGroup != '' && filterType == '') { - setState(() { - itemsToDisplay = - ListRepository().getTypesToDisplay(filterCategory, filterGroup); - }); - } else if (filterCategory != '' && - filterGroup != '' && - filterType != '') { - setState(() { - itemsToDisplay = ListRepository() - .getMeasuresToDisplay(filterCategory, filterGroup, filterType); - }); - } }); - //html.window.history.pushState(null, 'Maßnahmen', - // '#/massnahmendatenbank/$filterCategory${filterGroup != '' ? '/$filterGroup' : ''}${filterType != '' ? '/$filterType' : ''}'); + if (filterGroup == '' && filterType == '') { + setState(() { + itemsToDisplay = ListRepository().getGroupsToDisplay(filterCategory); + }); + } else if (filterGroup != '' && filterType == '') { + setState(() { + itemsToDisplay = + ListRepository().getTypesToDisplay(filterCategory, filterGroup); + }); + } else if (filterCategory != '' && filterGroup != '' && filterType != '') { + setState(() { + itemsToDisplay = ListRepository() + .getMeasuresToDisplay(filterCategory, filterGroup, filterType); + }); + } } @override @@ -133,8 +122,6 @@ class MeasuresPageState extends State { super.dispose(); } - void _initializeData() {} - void _onSearchTextChanged(String value) { setState(() { searchText = value; @@ -270,17 +257,12 @@ class MeasuresPageState extends State { '/massnahmendatenbank/$filterCategory/$filterGroup/${measure.title!.toLowerCase().replaceUmlauts()}'); } else if (measure.isMeasure == true) { logger.d(measure.id); - Get.to( - () => MeasureDetailPage( - id: measure.id!, - type: measure.isMeasure! - ? EnumDetailsType.measure - : EnumDetailsType.type, - ), - ); + Get.toNamed('/massnahme/${measure.id}'); } }, - onHover: (hovered) {}, + onHover: (measure.isMeasure == true || measure.hasChildren == true) + ? (hovered) {} + : null, highlightColor: Colors.transparent, splashColor: Colors.transparent, focusColor: Colors.transparent, diff --git a/lib/src/widgets/appbar/ambito_appbar.dart b/lib/src/widgets/appbar/ambito_appbar.dart index 2e3f0b5..f3a4ee6 100644 --- a/lib/src/widgets/appbar/ambito_appbar.dart +++ b/lib/src/widgets/appbar/ambito_appbar.dart @@ -1,4 +1,5 @@ import 'package:ambito/src/extensions/extensions.dart'; +import 'package:ambito/src/packages/ambito_notifier/notifier/cart_notifier.dart'; import 'package:ambito/src/packages/ambito_theme/ambito_theme.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -55,6 +56,24 @@ class AmbitoAppbar extends AppBar { color: theme.currentColorScheme.primary, ), ), + if (breakpoint >= myBreakpoints.md) + IconButton( + onPressed: () { + Get.toNamed('/warenkorb'); + }, + icon: ambitoCartNotifier.carts == 0 + ? Icon( + Icons.shopping_cart_outlined, + color: theme.currentColorScheme.primary, + ) + : Badge.count( + count: ambitoCartNotifier.carts, + child: Icon( + Icons.shopping_cart_outlined, + color: theme.currentColorScheme.primary, + ), + ), + ), if (breakpoint >= myBreakpoints.md) IconButton( onPressed: () { diff --git a/lib/src/widgets/buttons/print_all_button.dart b/lib/src/widgets/buttons/print_all_button.dart new file mode 100644 index 0000000..521cc94 --- /dev/null +++ b/lib/src/widgets/buttons/print_all_button.dart @@ -0,0 +1,23 @@ +import 'package:ambito/src/extensions/extensions.dart'; +import 'package:flutter/material.dart'; + +import '../../packages/ambito_theme/ambito_theme.dart'; +import 'outline_button.dart'; + +class PrintAllButton extends StatelessWidget { + final VoidCallback onPressed; + + const PrintAllButton({super.key, required this.onPressed}); + + @override + Widget build(BuildContext context) { + final AmbitoTheme theme = getTheme(context); + return WidgetOutlineButton( + onPressed: onPressed, + title: context.translate('page.general.buttons.print_all'), + backgroundColor: theme.currentColorScheme.secondary, + foregroundColor: theme.currentColorScheme.onPrimary, + borderColor: theme.currentColorScheme.secondary, + ); + } +} diff --git a/lib/src/widgets/buttons/print_button.dart b/lib/src/widgets/buttons/print_button.dart new file mode 100644 index 0000000..37cb97c --- /dev/null +++ b/lib/src/widgets/buttons/print_button.dart @@ -0,0 +1,23 @@ +import 'package:ambito/src/extensions/extensions.dart'; +import 'package:flutter/material.dart'; + +import '../../packages/ambito_theme/ambito_theme.dart'; +import 'outline_button.dart'; + +class PrintButton extends StatelessWidget { + final VoidCallback onPressed; + + const PrintButton({super.key, required this.onPressed}); + + @override + Widget build(BuildContext context) { + final AmbitoTheme theme = getTheme(context); + return WidgetOutlineButton( + onPressed: onPressed, + title: context.translate('page.general.buttons.print'), + backgroundColor: theme.currentColorScheme.secondary, + foregroundColor: theme.currentColorScheme.onPrimary, + borderColor: theme.currentColorScheme.secondary, + ); + } +} diff --git a/lib/src/widgets/cards/card_measure.dart b/lib/src/widgets/cards/card_measure.dart index a817ab1..e60f562 100644 --- a/lib/src/widgets/cards/card_measure.dart +++ b/lib/src/widgets/cards/card_measure.dart @@ -12,7 +12,7 @@ import '../../entity/measure/group/measure_group.dart'; import '../../packages/ambito_theme/ambito_theme.dart'; class CardMeasure extends StatelessWidget { - const CardMeasure({Key? key, this.category, this.group}) : super(key: key); + const CardMeasure({super.key, this.category, this.group}); final MeasureCategory? category; final MeasureGroup? group; diff --git a/lib/src/widgets/map/map_widget.dart b/lib/src/widgets/map/map_widget.dart index 251358b..be59c74 100644 --- a/lib/src/widgets/map/map_widget.dart +++ b/lib/src/widgets/map/map_widget.dart @@ -3,13 +3,19 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import '../../consts/consts.dart'; import '../../packages/ambito_theme/ambito_theme.dart'; class MapWidget extends StatefulWidget { - const MapWidget({super.key, required this.markers, required this.polygons}); + const MapWidget( + {super.key, + required this.markers, + required this.polygons, + required this.polylines}); - final Set? markers; - final Set? polygons; + final Set markers; + final Set polygons; + final Set polylines; @override State createState() => MapWidgetState(); @@ -29,12 +35,11 @@ class MapWidgetState extends State { @override void initState() { - if (widget.markers != null) { - setState(() { - _initialPos = - CameraPosition(target: widget.markers!.first.position, zoom: 14); - }); - } + setState(() { + _initialPos = + CameraPosition(target: widget.markers.first.position, zoom: 14); + }); + super.initState(); } @@ -45,12 +50,11 @@ class MapWidgetState extends State { borderRadius: BorderRadius.circular(10.0), child: SizedBox( width: double.infinity, - height: 600, child: Column( children: [ Row( children: [ - Spacer(), + const Spacer(), IconButton( onPressed: () { setState(() { @@ -70,17 +74,40 @@ class MapWidgetState extends State { onTap: (position) { if (_drawPolygon == true) { setState(() { - widget.markers?.add(Marker( + widget.markers.add( + Marker( + onTap: onTapMarker('polygon_$_counter'), markerId: MarkerId('polygon_$_counter'), - position: position)); + position: position, + ), + ); + if (_counter > 0) { + logger.i('add polyline'); + widget.polylines.add( + Polyline( + polylineId: PolylineId('polyline_$_counter'), + color: theme.currentColorScheme.primary, + width: 2, + points: [ + widget.markers + .where((el) => + el.markerId == + MarkerId('polygon_${_counter - 1}')) + .first + .position, + position + ]), + ); + } _counter++; }); } }, mapToolbarEnabled: true, mapType: MapType.hybrid, - markers: widget.markers ?? {}, - polygons: widget.polygons ?? {}, + markers: widget.markers, + polygons: widget.polygons, + polylines: widget.polylines, initialCameraPosition: _initialPos, onMapCreated: (GoogleMapController controller) { _controller.complete(controller); @@ -91,4 +118,11 @@ class MapWidgetState extends State { )), ); } + + onTapMarker(String counter) { + logger.d(counter); + if (counter == 'polygon_0') { + logger.d('first pressed'); + } + } } diff --git a/pubspec.lock b/pubspec.lock index 920ad5d..4d71e99 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,23 +5,23 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 + sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" url: "https://pub.dev" source: hosted - version: "72.0.0" + version: "76.0.0" _macros: dependency: transitive description: dart source: sdk - version: "0.3.2" + version: "0.3.3" analyzer: dependency: transitive description: name: analyzer - sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 + sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" url: "https://pub.dev" source: hosted - version: "6.7.0" + version: "6.11.0" animated_segmented_tab_control: dependency: "direct main" description: @@ -30,6 +30,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" args: dependency: transitive description: @@ -54,6 +62,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.2" + barcode: + dependency: transitive + description: + name: barcode + sha256: ab180ce22c6555d77d45f0178a523669db67f95856e3378259ef2ffeb43e6003 + url: "https://pub.dev" + source: hosted + version: "2.2.8" + bidi: + dependency: transitive + description: + name: bidi + sha256: "9a712c7ddf708f7c41b1923aa83648a3ed44cfd75b04f72d598c45e5be287f9d" + url: "https://pub.dev" + source: hosted + version: "2.0.12" boolean_selector: dependency: transitive description: @@ -202,10 +226,10 @@ packages: dependency: "direct main" description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" convert: dependency: transitive description: @@ -218,10 +242,18 @@ packages: dependency: "direct main" description: name: country_flags - sha256: "0c2d9f0673ad0a5ec148f5b264c9e7338208b83000336bb4db8d189cd50df2bb" + sha256: dad797491167a5b8dee465b969cb756795d842fdfc3fc1ff93f22e9c1884b73d url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.0" + cross_file: + dependency: "direct main" + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" crypto: dependency: transitive description: @@ -306,10 +338,10 @@ packages: dependency: "direct main" description: name: fast_immutable_collections - sha256: c3c73f4f989d3302066e4ec94e6ec73b5dc872592d02194f49f1352d64126b8c + sha256: e5e27788db94c5f1046585566a5cf63a8139a0d743cf9fdcab7ae7b0c3701a4a url: "https://pub.dev" source: hosted - version: "10.2.4" + version: "11.0.0" ffi: dependency: transitive description: @@ -399,10 +431,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" flutter_localizations: dependency: "direct main" description: flutter @@ -437,6 +469,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_to_pdf: + dependency: "direct main" + description: + name: flutter_to_pdf + sha256: d595795738e26bd9d344c5873ead71e001d2e617fda2a5b03aea8397dde65bd7 + url: "https://pub.dev" + source: hosted + version: "0.2.2" flutter_web_plugins: dependency: transitive description: flutter @@ -602,6 +642,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.0" + horizontal_list: + dependency: "direct main" + description: + name: horizontal_list + sha256: "789dd64e91d749c74099d91ea6faad4b6de97eeff0f9134db04988d4c857b9ff" + url: "https://pub.dev" + source: hosted + version: "0.0.7" html: dependency: transitive description: @@ -630,10 +678,18 @@ packages: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.1" + image: + dependency: transitive + description: + name: image + sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d + url: "https://pub.dev" + source: hosted + version: "4.3.0" image_downloader_web: dependency: "direct main" description: @@ -654,10 +710,10 @@ packages: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" isar: dependency: "direct main" description: @@ -718,18 +774,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -750,10 +806,10 @@ packages: dependency: transitive description: name: lints - sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + sha256: "4a16b3f03741e1252fda5de3ce712666d010ba2122f8e912c94f9f7b90e1a4c3" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.1.0" logger: dependency: "direct main" description: @@ -774,10 +830,10 @@ packages: dependency: transitive description: name: macros - sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" url: "https://pub.dev" source: hosted - version: "0.1.2-main.4" + version: "0.1.3-main.0" matcher: dependency: transitive description: @@ -830,10 +886,10 @@ packages: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" path: dependency: transitive description: @@ -842,6 +898,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.0" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" path_provider: dependency: "direct main" description: @@ -854,10 +918,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "8c4967f8b7cb46dc914e178daa29813d83ae502e0529d7b0478330616a691ef7" + sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2" url: "https://pub.dev" source: hosted - version: "2.2.14" + version: "2.2.15" path_provider_foundation: dependency: transitive description: @@ -890,6 +954,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" + pdf: + dependency: transitive + description: + name: pdf + sha256: "05df53f8791587402493ac97b9869d3824eccbc77d97855f4545cf72df3cae07" + url: "https://pub.dev" + source: hosted + version: "3.11.1" pedantic: dependency: transitive description: @@ -998,10 +1070,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" pubspec_parse: dependency: transitive description: @@ -1010,6 +1082,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + qr: + dependency: transitive + description: + name: qr + sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445" + url: "https://pub.dev" + source: hosted + version: "3.0.2" rxdart: dependency: transitive description: @@ -1034,6 +1114,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + screenshot: + dependency: "direct main" + description: + name: screenshot + sha256: "63817697a7835e6ce82add4228e15d233b74d42975c143ad8cfe07009fab866b" + url: "https://pub.dev" + source: hosted + version: "3.0.0" shared_preferences: dependency: "direct main" description: @@ -1094,10 +1182,10 @@ packages: dependency: transitive description: name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.2" shelf_web_socket: dependency: transitive description: @@ -1110,7 +1198,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_gen: dependency: transitive description: @@ -1187,10 +1275,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" stream_channel: dependency: transitive description: @@ -1211,10 +1299,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" super_bullet_list: dependency: "direct main" description: @@ -1227,42 +1315,42 @@ packages: dependency: "direct main" description: name: syncfusion_flutter_calendar - sha256: "20118a598cf5ae5b7ec84fa364e2b51070800f078466158fcd25864e1b5a2cfd" + sha256: "1af61cfccbd7860897685d28cf7aa3e7340287e56cf298d28cb5e1f8818af8e5" url: "https://pub.dev" source: hosted - version: "27.2.5" + version: "28.1.33" syncfusion_flutter_core: - dependency: transitive + dependency: "direct main" description: name: syncfusion_flutter_core - sha256: "325f519ce4ad8edd81811c21b853d72018529e353584490824da0555156ba076" + sha256: b1071c698b502e7d55f91352a8b82d42f49f4c96e523d43b6fade5d5af710048 url: "https://pub.dev" source: hosted - version: "27.2.5" + version: "28.1.33" syncfusion_flutter_datagrid: dependency: "direct main" description: name: syncfusion_flutter_datagrid - sha256: "1ba098d01468ed9dd400bf69403eedfbbd3626dce675005697a2698834f05fde" + sha256: "2949bf434f5c29ae3dff62681234aabcb0db900b10a2feaf3ea5a539ed6deffc" url: "https://pub.dev" source: hosted - version: "27.2.5" + version: "28.1.33" syncfusion_flutter_datepicker: dependency: "direct main" description: name: syncfusion_flutter_datepicker - sha256: "2177e49eb8a1c0fce7081e40f5613c986d00e5e63cbeb98a6012f65ca156bfc7" + sha256: "74e2637402231c5de59cd88c5e39f5e7907285e902a631432f2ceec27d079aad" url: "https://pub.dev" source: hosted - version: "27.2.5" + version: "28.1.33" syncfusion_localizations: dependency: "direct main" description: name: syncfusion_localizations - sha256: c08ffb408a7425b911538be8d607a00bac82cb3be8d24a1a6af7a531bd889db0 + sha256: "88595d77e5c5849f22b7bef444fd4574ef9930bddc91c519b49b0a92c2354a6d" url: "https://pub.dev" source: hosted - version: "27.2.5" + version: "28.1.33" synchronized: dependency: transitive description: @@ -1283,10 +1371,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" timezone: dependency: "direct main" description: @@ -1299,10 +1387,10 @@ packages: dependency: transitive description: name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" toggle_switch: dependency: "direct main" description: @@ -1363,10 +1451,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.0" watcher: dependency: transitive description: @@ -1399,6 +1487,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.1" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_web: + dependency: "direct main" + description: + name: webview_flutter_web + sha256: "18a7ccc1c31dd9a5c759a1b7217a2a1e04bd8f65712714a4070bfac19a23ca9e" + url: "https://pub.dev" + source: hosted + version: "0.2.3+4" xdg_directories: dependency: transitive description: @@ -1432,5 +1536,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.5.0 <4.0.0" + dart: ">=3.6.0-0 <4.0.0" flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index f455a13..9b66f43 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: sdk: flutter cupertino_icons: ^1.0.6 intl: ^0.19.0 - fast_immutable_collections: ^10.2.4 + fast_immutable_collections: ^11.0.0 badges: ^3.1.2 logger: ^2.4.0 geolocator: ^13.0.1 @@ -35,8 +35,8 @@ dependencies: cached_network_image: ^3.4.1 http: ^1.2.2 flutter_form_builder: ^9.4.1 - syncfusion_flutter_datepicker: ^27.1.50 - syncfusion_localizations: ^27.1.52 + syncfusion_flutter_datepicker: ^28.1.33 + syncfusion_localizations: ^28.1.33 flutter_dotenv: ^5.2.1 highlight_text: ^1.8.0 shared_preferences: ^2.3.2 @@ -44,7 +44,7 @@ dependencies: google_fonts: ^6.2.1 collection: ^1.18.0 flutter_rating_stars: ^1.1.0 - syncfusion_flutter_calendar: ^27.1.58 + syncfusion_flutter_calendar: ^28.1.33 timezone: ^0.9.4 percent_indicator: ^4.2.3 image_downloader_web: ^2.0.6 @@ -60,14 +60,20 @@ dependencies: google_maps_flutter: ^2.10.0 google_geocoding_api: ^1.5.2 toggle_switch: ^2.3.0 - syncfusion_flutter_datagrid: ^27.2.5 + syncfusion_flutter_datagrid: ^28.1.33 + horizontal_list: ^0.0.7 + flutter_to_pdf: ^0.2.2 + syncfusion_flutter_core: ^28.1.33 + cross_file: ^0.3.4+2 + screenshot: ^3.0.0 + webview_flutter_web: ^0.2.3+4 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 build_runner: any flutter: @@ -78,3 +84,4 @@ flutter: - assets/ - assets/images/ - assets/i18n/ + - assets/fonts/