Erweiterungen
This commit is contained in:
1 parent
ed5761a847
commit
e0d66ce3b1
6 files changed
+84
-44
No files matched your search
@@ -38,7 +38,8 @@ class MainPage extends ContentViewWidget {
|
||||
Future<HeaderInfo> getHeaderInfo(BuildContext context) async {
|
||||
return HeaderInfo(
|
||||
titleWidget: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 3),
|
||||
height: 100,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 0),
|
||||
child: Column(children: [
|
||||
ValueListenableBuilder<String>(
|
||||
valueListenable: _zipValueNotifier,
|
||||
@@ -47,7 +48,7 @@ class MainPage extends ContentViewWidget {
|
||||
value,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18.0,
|
||||
fontSize: 25.0,
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -60,7 +61,7 @@ class MainPage extends ContentViewWidget {
|
||||
value,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18.0,
|
||||
fontSize: 25.0,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -92,6 +92,8 @@ class _TaskListPageState extends State<TaskListPage> {
|
||||
for (int i=0; i<_taskList.length; i++) {
|
||||
var taskInfo = _taskList[i];
|
||||
|
||||
var textColor = isTaskActive(i) ? Colors.black : const Color(0x33000000);
|
||||
|
||||
steps.add(
|
||||
ListTile(
|
||||
minVerticalPadding: 0,
|
||||
@@ -136,8 +138,8 @@ class _TaskListPageState extends State<TaskListPage> {
|
||||
Text(
|
||||
taskInfo.task.topic,
|
||||
textAlign: TextAlign.left,
|
||||
style: const TextStyle(
|
||||
color: Colors.blue,
|
||||
style: TextStyle(
|
||||
color: textColor,
|
||||
fontSize: 15.0,
|
||||
),
|
||||
),
|
||||
@@ -145,8 +147,8 @@ class _TaskListPageState extends State<TaskListPage> {
|
||||
Text(
|
||||
taskInfo.additionalText ?? '',
|
||||
textAlign: TextAlign.left,
|
||||
style: const TextStyle(
|
||||
color: Colors.blue,
|
||||
style: TextStyle(
|
||||
color: textColor,
|
||||
fontSize: 12.0,
|
||||
),
|
||||
),
|
||||
@@ -156,7 +158,9 @@ class _TaskListPageState extends State<TaskListPage> {
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
_processTask(taskInfo);
|
||||
if (isTaskActive(i)) {
|
||||
_processTask(taskInfo);
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
@@ -174,7 +178,7 @@ class _TaskListPageState extends State<TaskListPage> {
|
||||
taskInfo = TaskInfo();
|
||||
taskInfo.answer = null;
|
||||
taskInfo.additionalText = null;
|
||||
taskInfo.completed = task.opt as bool;
|
||||
taskInfo.completed = task.opt != null ? task.opt! : false;
|
||||
}
|
||||
|
||||
taskInfo.task = task;
|
||||
|
||||
@@ -98,19 +98,22 @@ class _TourListPageState extends State<TourListPage> {
|
||||
const SizedBox(width: 10),
|
||||
SizedBox(
|
||||
width: 100,
|
||||
child: ElevatedButton(
|
||||
style: ButtonStyle(
|
||||
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
side: const BorderSide(color: Colors.grey),
|
||||
child: Visibility(
|
||||
visible: widget.job.tours[0].pos != null,
|
||||
child: ElevatedButton(
|
||||
style: ButtonStyle(
|
||||
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
side: const BorderSide(color: Colors.grey),
|
||||
),
|
||||
),
|
||||
backgroundColor: MaterialStateProperty.all<Color>(Colors.lightGreen),
|
||||
foregroundColor: MaterialStateProperty.all<Color>(Colors.black),
|
||||
),
|
||||
backgroundColor: MaterialStateProperty.all<Color>(Colors.lightGreen),
|
||||
foregroundColor: MaterialStateProperty.all<Color>(Colors.black),
|
||||
),
|
||||
onPressed: () => { showMapPopup(context, widget.job.tours[0], widget.job.tours)},
|
||||
child: const Text("Karte")))
|
||||
onPressed: () => { showMapPopup(context, widget.job.tours[0], widget.job.tours)},
|
||||
child: const Text("Karte")),
|
||||
))
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
|
||||
+3
-3
@@ -136,11 +136,11 @@ class _MainState extends State<Main> {
|
||||
},
|
||||
child: Scaffold(
|
||||
appBar: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(70),
|
||||
preferredSize: const Size.fromHeight(100),
|
||||
child: ColoredSafeArea(
|
||||
key: const Key("appBar"),
|
||||
child: SizedBox(
|
||||
height: 80,
|
||||
height: 100,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Stack(
|
||||
@@ -198,7 +198,7 @@ class _MainState extends State<Main> {
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 60,
|
||||
height: 100,
|
||||
width: 300,
|
||||
child: Center(
|
||||
heightFactor: 1,
|
||||
|
||||
@@ -138,8 +138,8 @@ TourTask _tourTaskDeserialize(
|
||||
object.max = reader.readLongOrNull(offsets[0]);
|
||||
object.maxLen = reader.readLongOrNull(offsets[1]);
|
||||
object.min = reader.readLongOrNull(offsets[2]);
|
||||
object.opt = reader.readBool(offsets[3]);
|
||||
object.reenter = reader.readBool(offsets[4]);
|
||||
object.opt = reader.readBoolOrNull(offsets[3]);
|
||||
object.reenter = reader.readBoolOrNull(offsets[4]);
|
||||
object.rt = reader.readBoolOrNull(offsets[5]);
|
||||
object.sId = reader.readLong(offsets[6]);
|
||||
object.taskArrival = reader.readLongOrNull(offsets[7]);
|
||||
@@ -165,9 +165,9 @@ P _tourTaskDeserializeProp<P>(
|
||||
case 2:
|
||||
return (reader.readLongOrNull(offset)) as P;
|
||||
case 3:
|
||||
return (reader.readBool(offset)) as P;
|
||||
return (reader.readBoolOrNull(offset)) as P;
|
||||
case 4:
|
||||
return (reader.readBool(offset)) as P;
|
||||
return (reader.readBoolOrNull(offset)) as P;
|
||||
case 5:
|
||||
return (reader.readBoolOrNull(offset)) as P;
|
||||
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(
|
||||
bool value) {
|
||||
bool? value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
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(
|
||||
bool value) {
|
||||
bool? value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'reenter',
|
||||
@@ -1091,8 +1123,8 @@ TourTask _$TourTaskFromJson(Map<String, dynamic> json) => TourTask()
|
||||
..sId = json['s_id'] as int
|
||||
..type = json['type'] as int
|
||||
..topic = json['topic'] as String
|
||||
..opt = json['opt'] as bool
|
||||
..reenter = json['reenter'] as bool
|
||||
..opt = json['opt'] as bool?
|
||||
..reenter = json['reenter'] as bool?
|
||||
..min = json['min'] as int?
|
||||
..max = json['max'] as int?
|
||||
..maxLen = json['max_len'] as int?
|
||||
|
||||
Reference in new issue
Block a user