79 lines
2.4 KiB
Dart
79 lines
2.4 KiB
Dart
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";
|
|
}
|
|
|
|
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) {
|
|
return SizedBox(
|
|
key: GlobalKey(),
|
|
height: 350,
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
child: Container(
|
|
height: 100,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(10),
|
|
color: Colors.white,
|
|
border: Border.all(
|
|
color: Colors.grey,
|
|
width: 1,
|
|
),
|
|
),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(12.0),
|
|
child: Column(
|
|
children: [
|
|
Expanded(child: Text(text, textAlign: TextAlign.left)),
|
|
getDefaultButton(
|
|
'OK',
|
|
() => {Navigator.pop(context)},
|
|
),
|
|
],
|
|
),
|
|
),
|
|
)
|
|
);
|
|
},
|
|
);
|
|
} |