Cleanup
This commit is contained in:
1 parent
8e5462bc91
commit
e7409ac26b
13 files changed
+467
-88
No files matched your search
@@ -10,55 +10,55 @@ import 'package:stadtbote/tools/constants.dart';
|
||||
import 'package:stadtbote/tools/mqtt_core.dart';
|
||||
import 'package:stadtbote/tools/util.dart';
|
||||
import 'package:badges/badges.dart' as badges;
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
void showAcceptJobsPopup(BuildContext context) async {
|
||||
var entries = await _createListEntries();
|
||||
await _createListEntries().then((value) => {
|
||||
showPopupWindow(
|
||||
context,
|
||||
//childSize:Size(240, MediaQuery.of(context).size.width * 0.8),
|
||||
gravity: KumiPopupGravity.center,
|
||||
//curve: Curves.elasticOut,
|
||||
bgColor: Colors.grey.withOpacity(0.5),
|
||||
clickOutDismiss: true,
|
||||
clickBackDismiss: true,
|
||||
customAnimation: false,
|
||||
customPop: false,
|
||||
customPage: false,
|
||||
// targetRenderBox: (btnKey.currentContext.findRenderObject() as RenderBox),
|
||||
//needSafeDisplay: true,
|
||||
underStatusBar: false,
|
||||
underAppBar: false,
|
||||
//offsetX: -180,
|
||||
//offsetY: 50,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
onShowStart: (pop) {},
|
||||
onShowFinish: (pop) {},
|
||||
onDismissStart: (pop) {},
|
||||
onDismissFinish: (pop) {},
|
||||
onClickOut: (pop) {},
|
||||
onClickBack: (pop) {},
|
||||
childFun: (pop) {
|
||||
_createListEntries();
|
||||
|
||||
showPopupWindow(
|
||||
context,
|
||||
//childSize:Size(240, MediaQuery.of(context).size.width * 0.8),
|
||||
gravity: KumiPopupGravity.center,
|
||||
//curve: Curves.elasticOut,
|
||||
bgColor: Colors.grey.withOpacity(0.5),
|
||||
clickOutDismiss: true,
|
||||
clickBackDismiss: true,
|
||||
customAnimation: false,
|
||||
customPop: false,
|
||||
customPage: false,
|
||||
// targetRenderBox: (btnKey.currentContext.findRenderObject() as RenderBox),
|
||||
//needSafeDisplay: true,
|
||||
underStatusBar: false,
|
||||
underAppBar: false,
|
||||
//offsetX: -180,
|
||||
//offsetY: 50,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
onShowStart: (pop) {},
|
||||
onShowFinish: (pop) {},
|
||||
onDismissStart: (pop) {},
|
||||
onDismissFinish: (pop) {},
|
||||
onClickOut: (pop) {},
|
||||
onClickBack: (pop) {},
|
||||
childFun: (pop) {
|
||||
_createListEntries();
|
||||
|
||||
return SizedBox(
|
||||
key: GlobalKey(),
|
||||
height: MediaQuery.of(context).size.height * 0.85,
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
child: Container(
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.white,
|
||||
border: Border.all(
|
||||
color: Colors.grey,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: SingleChildScrollView(child: Column(children: entries)),
|
||||
));
|
||||
},
|
||||
return SizedBox(
|
||||
key: GlobalKey(),
|
||||
height: MediaQuery.of(context).size.height * 0.85,
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
child: Container(
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.white,
|
||||
border: Border.all(
|
||||
color: Colors.grey,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: SingleChildScrollView(child: Column(children: value)),
|
||||
));
|
||||
},
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ Future<List<Widget>> _createListEntries() async {
|
||||
"Weitere Infos....",
|
||||
style: TextStyle(fontSize: 15, color: Colors.black, fontWeight: FontWeight.bold),
|
||||
)),
|
||||
collapsed: SizedBox(),
|
||||
collapsed: const SizedBox(),
|
||||
expanded: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
@@ -135,7 +135,7 @@ Future<List<Widget>> _createListEntries() async {
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Text('asd asd asd asd asd asd asd asd asd asd asd asd asd asd asd '),
|
||||
child: const Text('asd asd asd asd asd asd asd asd asd asd asd asd asd asd asd '),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -144,7 +144,7 @@ Future<List<Widget>> _createListEntries() async {
|
||||
const SizedBox(height: 20),
|
||||
Row(children: [
|
||||
Expanded(
|
||||
child: getDefaultButton(!job.global ? 'Ablehnen' : 'Ignorieren', () => { _sendAnswer(job, !job.global ? 2: 3)}),
|
||||
child: getDefaultButton(!job.global ? 'Ablehnen' : 'Ignorieren', () => {_sendAnswer(job, !job.global ? 2 : 3)}),
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
Expanded(
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kumi_popup_window/kumi_popup_window.dart';
|
||||
import 'package:stadtbote/model/status.dart';
|
||||
import 'package:stadtbote/tools/util.dart';
|
||||
|
||||
void showInfosPopup(BuildContext context, Status? status) {
|
||||
var text = "Versionsnummer: a203\n";
|
||||
text += "Verbindungsstatus: Unbekannt\n";
|
||||
text += "GPS-Status: Unbekannt\n";
|
||||
text += "\n";
|
||||
text += "User Status:\n";
|
||||
if (status != null) {
|
||||
text += "cr_id: ${status.crId}\n";
|
||||
text += "cust_id: ${status.custId}\n";
|
||||
text += "sid: ${status.sid}\n";
|
||||
text += "vht_id: ${status.vhtId}\n";
|
||||
text += "server_version: ${status.serverVersion}\n";
|
||||
text += "server_instance: ${status.serverInstance}\n";
|
||||
text += "Version GPS: Unbekannt";
|
||||
} else {
|
||||
text += "Keine Informationen gefunden";
|
||||
}
|
||||
|
||||
void showInfosPopup(BuildContext context) {
|
||||
showPopupWindow(
|
||||
context,
|
||||
//childSize:Size(240, MediaQuery.of(context).size.width * 0.8),
|
||||
@@ -29,23 +48,27 @@ void showInfosPopup(BuildContext context) {
|
||||
childFun: (pop) {
|
||||
return SizedBox(
|
||||
key: GlobalKey(),
|
||||
height: MediaQuery.of(context).size.height * 0.6,
|
||||
height: 350,
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: Container(
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.red,
|
||||
color: Colors.white,
|
||||
border: Border.all(
|
||||
color: Colors.grey,
|
||||
width: 0.5,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(12.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Dies sind die Infos\nBla')
|
||||
Expanded(child: Text(text, textAlign: TextAlign.left)),
|
||||
getDefaultButton(
|
||||
'OK',
|
||||
() => {Navigator.pop(context)},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -107,7 +107,7 @@ KumiPopupWindow showScanBarcodesPopup(BuildContext context, TaskInfo taskInfo, F
|
||||
getDefaultButton('Hinzufügen', buttonHeight: 50, () => {
|
||||
scanBarcode()
|
||||
}),
|
||||
SizedBox(height: 10),
|
||||
const SizedBox(height: 10),
|
||||
getDefaultButton('Übernehmen', buttonHeight: 50, () => {
|
||||
onFinished(scannedBarcodes)
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user