diff --git a/android/app/build.gradle b/android/app/build.gradle index 208f653..cffb3e9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -32,7 +32,7 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion flutter.compileSdkVersion + compileSdkVersion 34 ndkVersion flutter.ndkVersion compileOptions { @@ -49,10 +49,7 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "de.assecutor.stadtbote" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() diff --git a/lib/content_views/task_list_page.dart b/lib/content_views/task_list_page.dart index 8991391..9af2e66 100644 --- a/lib/content_views/task_list_page.dart +++ b/lib/content_views/task_list_page.dart @@ -74,7 +74,7 @@ class _TaskListPageState extends State { Future.delayed(const Duration(seconds: 0), () async { _taskList = await _fetchTaskList(); - _commisionNumber = widget.tour.com; + _commisionNumber = widget.tour.com ?? ""; _initCompleted = true; diff --git a/lib/model/job_tour.dart b/lib/model/job_tour.dart index 8bf8e00..57e9d5c 100644 --- a/lib/model/job_tour.dart +++ b/lib/model/job_tour.dart @@ -14,10 +14,10 @@ class JobTour { late String mode; late String comp; late String person; - late String phone; + late String? phone; late String street; late String city; - late String com; + late String? com; late TourPosition? pos; late List rem; late List tasks; diff --git a/lib/model/job_tour.g.dart b/lib/model/job_tour.g.dart index cf299a9..762ca97 100644 --- a/lib/model/job_tour.g.dart +++ b/lib/model/job_tour.g.dart @@ -94,11 +94,21 @@ int _jobTourEstimateSize( ) { var bytesCount = offsets.last; bytesCount += 3 + object.city.length * 3; - bytesCount += 3 + object.com.length * 3; + { + final value = object.com; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } bytesCount += 3 + object.comp.length * 3; bytesCount += 3 + object.mode.length * 3; bytesCount += 3 + object.person.length * 3; - bytesCount += 3 + object.phone.length * 3; + { + final value = object.phone; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } { final value = object.pos; if (value != null) { @@ -165,12 +175,12 @@ JobTour _jobTourDeserialize( ) { final object = JobTour(); object.city = reader.readString(offsets[0]); - object.com = reader.readString(offsets[1]); + object.com = reader.readStringOrNull(offsets[1]); object.comp = reader.readString(offsets[2]); object.id = reader.readLong(offsets[3]); object.mode = reader.readString(offsets[4]); object.person = reader.readString(offsets[5]); - object.phone = reader.readString(offsets[6]); + object.phone = reader.readStringOrNull(offsets[6]); object.pos = reader.readObjectOrNull( offsets[7], TourPositionSchema.deserialize, @@ -200,7 +210,7 @@ P _jobTourDeserializeProp

( case 0: return (reader.readString(offset)) as P; case 1: - return (reader.readString(offset)) as P; + return (reader.readStringOrNull(offset)) as P; case 2: return (reader.readString(offset)) as P; case 3: @@ -210,7 +220,7 @@ P _jobTourDeserializeProp

( case 5: return (reader.readString(offset)) as P; case 6: - return (reader.readString(offset)) as P; + return (reader.readStringOrNull(offset)) as P; case 7: return (reader.readObjectOrNull( offset, @@ -370,8 +380,24 @@ extension JobTourQueryFilter }); } + QueryBuilder comIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'com', + )); + }); + } + + QueryBuilder comIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'com', + )); + }); + } + QueryBuilder comEqualTo( - String value, { + String? value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { @@ -384,7 +410,7 @@ extension JobTourQueryFilter } QueryBuilder comGreaterThan( - String value, { + String? value, { bool include = false, bool caseSensitive = true, }) { @@ -399,7 +425,7 @@ extension JobTourQueryFilter } QueryBuilder comLessThan( - String value, { + String? value, { bool include = false, bool caseSensitive = true, }) { @@ -414,8 +440,8 @@ extension JobTourQueryFilter } QueryBuilder comBetween( - String lower, - String upper, { + String? lower, + String? upper, { bool includeLower = true, bool includeUpper = true, bool caseSensitive = true, @@ -942,8 +968,24 @@ extension JobTourQueryFilter }); } + QueryBuilder phoneIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'phone', + )); + }); + } + + QueryBuilder phoneIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'phone', + )); + }); + } + QueryBuilder phoneEqualTo( - String value, { + String? value, { bool caseSensitive = true, }) { return QueryBuilder.apply(this, (query) { @@ -956,7 +998,7 @@ extension JobTourQueryFilter } QueryBuilder phoneGreaterThan( - String value, { + String? value, { bool include = false, bool caseSensitive = true, }) { @@ -971,7 +1013,7 @@ extension JobTourQueryFilter } QueryBuilder phoneLessThan( - String value, { + String? value, { bool include = false, bool caseSensitive = true, }) { @@ -986,8 +1028,8 @@ extension JobTourQueryFilter } QueryBuilder phoneBetween( - String lower, - String upper, { + String? lower, + String? upper, { bool includeLower = true, bool includeUpper = true, bool caseSensitive = true, @@ -1650,10 +1692,10 @@ JobTour _$JobTourFromJson(Map json) => JobTour() ..mode = json['mode'] as String ..comp = json['comp'] as String ..person = json['person'] as String - ..phone = json['phone'] as String + ..phone = json['phone'] as String? ..street = json['street'] as String ..city = json['city'] as String - ..com = json['com'] as String + ..com = json['com'] as String? ..pos = json['pos'] == null ? null : TourPosition.fromJson(json['pos'] as Map) diff --git a/pubspec.lock b/pubspec.lock index 6d75ca2..8d54706 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -604,10 +604,10 @@ packages: dependency: transitive description: name: geolocator_windows - sha256: a92fae29779d5c6dc60e8411302f5221ade464968fe80a36d330e80a71f087af + sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e" url: "https://pub.dev" source: hosted - version: "0.2.2" + version: "0.2.3" glob: dependency: transitive description: @@ -700,10 +700,10 @@ packages: dependency: transitive description: name: image_picker_ios - sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3 + sha256: "917a5cadd67d052554cfb258595e54217de53fac5b52939426e26319a02e6297" url: "https://pub.dev" source: hosted - version: "0.8.9+1" + version: "0.8.9+2" image_picker_linux: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 7c0dfaa..06c6dc1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 217.0.0+8 +version: 218.0.0+9 environment: sdk: '>=2.19.6 <3.0.0'