This commit is contained in:
Sven committed 2024-09-11 09:37:02 +02:00
1 parent f89ca690c8
commit 96544ca924
22 files changed
+1026 -381

No files matched your search

+92 -16
View File
@@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
import 'package:isar/isar.dart';
import 'package:stadtbote/content_views/tour_list_page.dart';
import 'package:stadtbote/content_views/utils/content_view_widget.dart';
import 'package:stadtbote/content_views/utils/header_info.dart';
import 'package:intl/intl.dart';
import 'package:stadtbote/messages/pop_content_view_message.dart';
import 'package:stadtbote/tools/message_service.dart';
import '../main.dart';
@@ -18,21 +18,10 @@ class AcceptedJobsPage extends ContentViewWidget {
State<AcceptedJobsPage> createState() => _AcceptedJobsPageState();
@override
Future<HeaderInfo> getHeaderInfo(BuildContext context) async {
return HeaderInfo(
titleWidget: const Text(
'Angenommene Aufträge',
style: TextStyle(
color: Colors.white,
fontSize: 20.0,
),
),
rightButtonEnabled: false,
rightButtonVisible: false,
rightButtonImage: null,
rightButtonOnPressed: () async {
//BroadcastReceiver().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: EmployeeEditProfileWidget());
});
Future<Widget> getHeaderWidget(BuildContext context) async {
await Future.delayed(const Duration(microseconds: 0));
return _HeaderWidget();
}
}
@@ -146,3 +135,90 @@ class _AcceptedJobsPageState extends State<AcceptedJobsPage> {
await MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: TourListPage(job: job));
}
}
class _HeaderWidget extends StatefulWidget {
@override
State<_HeaderWidget> createState() => _HeaderWidgetState();
}
class _HeaderWidgetState extends State<_HeaderWidget> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
var cellWidth = (MediaQuery.of(context).size.width - 60 - 60 - 25) / 2;
return Padding(
padding: const EdgeInsets.all(8),
child: Stack(
alignment: Alignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Visibility(
visible: true,
child: Container(
width: 60,
height: 60,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
),
child: FittedBox(
child: GestureDetector(
onTap: () async {
await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
radius: 10,
backgroundColor: Constants.colorPrimary,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.arrow_back, size: 20.0, color: Colors.white)),
),
),
),
),
),
Visibility(
visible: false,
child: Container(
width: 60,
height: 60,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.red,
),
child: FittedBox(
child: GestureDetector(
onTap: () async {
await MessageService().publish<PopContentViewMessage>(Constants.messageTopicPopContentView, arguments: PopContentViewMessage(count: 1));
},
child: const CircleAvatar(
backgroundColor: Constants.colorPrimary,
radius: 10,
child: Padding(padding: EdgeInsets.all(1.0), child: Icon(Icons.info_outline, size: 20.0, color: Colors.white))),
),
),
),
),
],
),
SizedBox(
height: 100,
width: cellWidth * 2,
child: const Center(
child: Text(
textAlign: TextAlign.center,
"Angenommene Aufträge",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.white),
),
),
),
],
),
);
}
}