Erweiterungen
This commit is contained in:
1 parent
31fe4c5a06
commit
98581c9a39
13 files changed
+2792
-996
No files matched your search
@@ -0,0 +1,53 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:stadtbote/model/task_info.dart';
|
||||
import 'package:stadtbote/tools/util.dart';
|
||||
|
||||
showZipPopup(BuildContext context, String text, String buttonText, Function(String) onFinished) async {
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
shadowColor: Colors.transparent,
|
||||
backgroundColor: Colors.white,
|
||||
content: StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
|
||||
TextEditingController textEditingController = TextEditingController();
|
||||
|
||||
return SizedBox(
|
||||
key: GlobalKey(),
|
||||
height: 280,
|
||||
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: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(35.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(text, style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
const SizedBox(height: 20),
|
||||
Util.getDefaultTextField('Postleitzahl',
|
||||
type: TextInputType.text,
|
||||
formatter: [FilteringTextInputFormatter.singleLineFormatter],
|
||||
controller: textEditingController,
|
||||
autofocus: true),
|
||||
const SizedBox(height: 20),
|
||||
getDefaultButton(buttonText, () => {
|
||||
Navigator.of(context).pop(),
|
||||
|
||||
onFinished(textEditingController.text)})
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
}));
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user