Erweiterungen

This commit is contained in:
Sven committed 2024-01-16 12:23:52 +01:00
1 parent ed5761a847
commit e0d66ce3b1
6 files changed
+73 -33

No files matched your search

+4 -3
View File
@@ -38,7 +38,8 @@ class MainPage extends ContentViewWidget {
Future<HeaderInfo> getHeaderInfo(BuildContext context) async { Future<HeaderInfo> getHeaderInfo(BuildContext context) async {
return HeaderInfo( return HeaderInfo(
titleWidget: Container( titleWidget: Container(
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 3), height: 100,
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 0),
child: Column(children: [ child: Column(children: [
ValueListenableBuilder<String>( ValueListenableBuilder<String>(
valueListenable: _zipValueNotifier, valueListenable: _zipValueNotifier,
@@ -47,7 +48,7 @@ class MainPage extends ContentViewWidget {
value, value,
style: const TextStyle( style: const TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 18.0, fontSize: 25.0,
), ),
); );
}, },
@@ -60,7 +61,7 @@ class MainPage extends ContentViewWidget {
value, value,
style: const TextStyle( style: const TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 18.0, fontSize: 25.0,
), ),
); );
}, },
+9 -5
View File
@@ -92,6 +92,8 @@ class _TaskListPageState extends State<TaskListPage> {
for (int i=0; i<_taskList.length; i++) { for (int i=0; i<_taskList.length; i++) {
var taskInfo = _taskList[i]; var taskInfo = _taskList[i];
var textColor = isTaskActive(i) ? Colors.black : const Color(0x33000000);
steps.add( steps.add(
ListTile( ListTile(
minVerticalPadding: 0, minVerticalPadding: 0,
@@ -136,8 +138,8 @@ class _TaskListPageState extends State<TaskListPage> {
Text( Text(
taskInfo.task.topic, taskInfo.task.topic,
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: const TextStyle( style: TextStyle(
color: Colors.blue, color: textColor,
fontSize: 15.0, fontSize: 15.0,
), ),
), ),
@@ -145,8 +147,8 @@ class _TaskListPageState extends State<TaskListPage> {
Text( Text(
taskInfo.additionalText ?? '', taskInfo.additionalText ?? '',
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: const TextStyle( style: TextStyle(
color: Colors.blue, color: textColor,
fontSize: 12.0, fontSize: 12.0,
), ),
), ),
@@ -156,7 +158,9 @@ class _TaskListPageState extends State<TaskListPage> {
), ),
), ),
onTap: () { onTap: () {
if (isTaskActive(i)) {
_processTask(taskInfo); _processTask(taskInfo);
}
}, },
), ),
); );
@@ -174,7 +178,7 @@ class _TaskListPageState extends State<TaskListPage> {
taskInfo = TaskInfo(); taskInfo = TaskInfo();
taskInfo.answer = null; taskInfo.answer = null;
taskInfo.additionalText = null; taskInfo.additionalText = null;
taskInfo.completed = task.opt as bool; taskInfo.completed = task.opt != null ? task.opt! : false;
} }
taskInfo.task = task; taskInfo.task = task;
+4 -1
View File
@@ -98,6 +98,8 @@ class _TourListPageState extends State<TourListPage> {
const SizedBox(width: 10), const SizedBox(width: 10),
SizedBox( SizedBox(
width: 100, width: 100,
child: Visibility(
visible: widget.job.tours[0].pos != null,
child: ElevatedButton( child: ElevatedButton(
style: ButtonStyle( style: ButtonStyle(
shape: MaterialStateProperty.all<RoundedRectangleBorder>( shape: MaterialStateProperty.all<RoundedRectangleBorder>(
@@ -110,7 +112,8 @@ class _TourListPageState extends State<TourListPage> {
foregroundColor: MaterialStateProperty.all<Color>(Colors.black), foregroundColor: MaterialStateProperty.all<Color>(Colors.black),
), ),
onPressed: () => { showMapPopup(context, widget.job.tours[0], widget.job.tours)}, onPressed: () => { showMapPopup(context, widget.job.tours[0], widget.job.tours)},
child: const Text("Karte"))) child: const Text("Karte")),
))
], ],
), ),
Expanded( Expanded(
+3 -3
View File
@@ -136,11 +136,11 @@ class _MainState extends State<Main> {
}, },
child: Scaffold( child: Scaffold(
appBar: PreferredSize( appBar: PreferredSize(
preferredSize: const Size.fromHeight(70), preferredSize: const Size.fromHeight(100),
child: ColoredSafeArea( child: ColoredSafeArea(
key: const Key("appBar"), key: const Key("appBar"),
child: SizedBox( child: SizedBox(
height: 80, height: 100,
child: Padding( child: Padding(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: Stack( child: Stack(
@@ -198,7 +198,7 @@ class _MainState extends State<Main> {
], ],
), ),
SizedBox( SizedBox(
height: 60, height: 100,
width: 300, width: 300,
child: Center( child: Center(
heightFactor: 1, heightFactor: 1,
+40 -8
View File
@@ -138,8 +138,8 @@ TourTask _tourTaskDeserialize(
object.max = reader.readLongOrNull(offsets[0]); object.max = reader.readLongOrNull(offsets[0]);
object.maxLen = reader.readLongOrNull(offsets[1]); object.maxLen = reader.readLongOrNull(offsets[1]);
object.min = reader.readLongOrNull(offsets[2]); object.min = reader.readLongOrNull(offsets[2]);
object.opt = reader.readBool(offsets[3]); object.opt = reader.readBoolOrNull(offsets[3]);
object.reenter = reader.readBool(offsets[4]); object.reenter = reader.readBoolOrNull(offsets[4]);
object.rt = reader.readBoolOrNull(offsets[5]); object.rt = reader.readBoolOrNull(offsets[5]);
object.sId = reader.readLong(offsets[6]); object.sId = reader.readLong(offsets[6]);
object.taskArrival = reader.readLongOrNull(offsets[7]); object.taskArrival = reader.readLongOrNull(offsets[7]);
@@ -165,9 +165,9 @@ P _tourTaskDeserializeProp<P>(
case 2: case 2:
return (reader.readLongOrNull(offset)) as P; return (reader.readLongOrNull(offset)) as P;
case 3: case 3:
return (reader.readBool(offset)) as P; return (reader.readBoolOrNull(offset)) as P;
case 4: case 4:
return (reader.readBool(offset)) as P; return (reader.readBoolOrNull(offset)) as P;
case 5: case 5:
return (reader.readBoolOrNull(offset)) as P; return (reader.readBoolOrNull(offset)) as P;
case 6: case 6:
@@ -398,8 +398,24 @@ extension TourTaskQueryFilter
}); });
} }
QueryBuilder<TourTask, TourTask, QAfterFilterCondition> optIsNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNull(
property: r'opt',
));
});
}
QueryBuilder<TourTask, TourTask, QAfterFilterCondition> optIsNotNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNotNull(
property: r'opt',
));
});
}
QueryBuilder<TourTask, TourTask, QAfterFilterCondition> optEqualTo( QueryBuilder<TourTask, TourTask, QAfterFilterCondition> optEqualTo(
bool value) { bool? value) {
return QueryBuilder.apply(this, (query) { return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo( return query.addFilterCondition(FilterCondition.equalTo(
property: r'opt', property: r'opt',
@@ -408,8 +424,24 @@ extension TourTaskQueryFilter
}); });
} }
QueryBuilder<TourTask, TourTask, QAfterFilterCondition> reenterIsNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNull(
property: r'reenter',
));
});
}
QueryBuilder<TourTask, TourTask, QAfterFilterCondition> reenterIsNotNull() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(const FilterCondition.isNotNull(
property: r'reenter',
));
});
}
QueryBuilder<TourTask, TourTask, QAfterFilterCondition> reenterEqualTo( QueryBuilder<TourTask, TourTask, QAfterFilterCondition> reenterEqualTo(
bool value) { bool? value) {
return QueryBuilder.apply(this, (query) { return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo( return query.addFilterCondition(FilterCondition.equalTo(
property: r'reenter', property: r'reenter',
@@ -1091,8 +1123,8 @@ TourTask _$TourTaskFromJson(Map<String, dynamic> json) => TourTask()
..sId = json['s_id'] as int ..sId = json['s_id'] as int
..type = json['type'] as int ..type = json['type'] as int
..topic = json['topic'] as String ..topic = json['topic'] as String
..opt = json['opt'] as bool ..opt = json['opt'] as bool?
..reenter = json['reenter'] as bool ..reenter = json['reenter'] as bool?
..min = json['min'] as int? ..min = json['min'] as int?
..max = json['max'] as int? ..max = json['max'] as int?
..maxLen = json['max_len'] as int? ..maxLen = json['max_len'] as int?
+13 -13
View File
@@ -173,10 +173,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.2" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@@ -748,10 +748,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
mgrs_dart: mgrs_dart:
dependency: transitive dependency: transitive
description: description:
@@ -1113,18 +1113,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
stream_transform: stream_transform:
dependency: transitive dependency: transitive
description: description:
@@ -1153,10 +1153,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.0" version: "0.6.1"
time: time:
dependency: transitive dependency: transitive
description: description:
@@ -1321,10 +1321,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.4-beta" version: "0.3.0"
web_socket_channel: web_socket_channel:
dependency: transitive dependency: transitive
description: description:
@@ -1382,5 +1382,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.1.0 <4.0.0" dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.13.0" flutter: ">=3.13.0"