Erweiterungen
This commit is contained in:
1 parent
96544ca924
commit
def0f3fc2f
136 files changed
+4172
-499
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import 'package:dart_mq/dart_mq.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:stadtbote/content_views/tour_list_page.dart';
|
||||
@@ -25,7 +26,7 @@ class AcceptedJobsPage extends ContentViewWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class _AcceptedJobsPageState extends State<AcceptedJobsPage> {
|
||||
class _AcceptedJobsPageState extends State<AcceptedJobsPage> with ProducerMixin {
|
||||
late List<Job> _jobs;
|
||||
|
||||
late bool _initCompleted = false;
|
||||
@@ -85,7 +86,7 @@ class _AcceptedJobsPageState extends State<AcceptedJobsPage> {
|
||||
children: <Widget>[
|
||||
Text(
|
||||
DateFormat('dd.MM.yyyy HH:mm').format(DateTime.parse(job.ordertime).toLocal()).toString(),
|
||||
style: TextStyle(backgroundColor: isJobInFuture(job) ? Colors.yellow : Colors.transparent),
|
||||
style: TextStyle(backgroundColor: isJobInFuture(job) ? Colors.red : Colors.transparent),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
Text(
|
||||
@@ -132,7 +133,13 @@ class _AcceptedJobsPageState extends State<AcceptedJobsPage> {
|
||||
}
|
||||
|
||||
void _clicked(Job job) async {
|
||||
await MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: TourListPage(job: job));
|
||||
// TODO MESSAGING
|
||||
sendMessage(
|
||||
routingKey: Constants.messageTopicPushContentView,
|
||||
payload: TourListPage(job: job),
|
||||
);
|
||||
|
||||
//await MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: TourListPage(job: job));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +148,7 @@ class _HeaderWidget extends StatefulWidget {
|
||||
State<_HeaderWidget> createState() => _HeaderWidgetState();
|
||||
}
|
||||
|
||||
class _HeaderWidgetState extends State<_HeaderWidget> {
|
||||
class _HeaderWidgetState extends State<_HeaderWidget> with ProducerMixin {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -171,7 +178,13 @@ class _HeaderWidgetState extends State<_HeaderWidget> {
|
||||
child: FittedBox(
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
|
||||
// TODO MESSAGING
|
||||
sendMessage(
|
||||
routingKey: Constants.messageTopicPopContentView,
|
||||
payload: PopContentViewMessage(count: 1),
|
||||
);
|
||||
|
||||
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
|
||||
},
|
||||
child: const CircleAvatar(
|
||||
radius: 10,
|
||||
@@ -194,7 +207,13 @@ class _HeaderWidgetState extends State<_HeaderWidget> {
|
||||
child: FittedBox(
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
|
||||
// TODO MESSAGING
|
||||
sendMessage(
|
||||
routingKey: Constants.messageTopicPopContentView,
|
||||
payload: PopContentViewMessage(count: 1),
|
||||
);
|
||||
|
||||
//await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
|
||||
},
|
||||
child: const CircleAvatar(
|
||||
backgroundColor: Constants.colorPrimary,
|
||||
|
||||
Reference in new issue
Block a user