feat: přidat projekt
This commit is contained in:
commit
95b26b4063
42 changed files with 5261 additions and 0 deletions
24
lib/utils/really_delete.dart
Normal file
24
lib/utils/really_delete.dart
Normal file
|
@ -0,0 +1,24 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
showReallyDelete(BuildContext context, void Function() onPressed,
|
||||
{text = "Odstranit tuto položku?", bool doNavigatorPop = true}) async {
|
||||
if (doNavigatorPop) Navigator.of(context, rootNavigator: true).pop("dialog");
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: Text(text),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10.0),
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () =>
|
||||
Navigator.of(ctx, rootNavigator: true).pop("dialog"),
|
||||
child:
|
||||
const Text("Ne", style: TextStyle(color: Colors.blue))),
|
||||
TextButton(onPressed: onPressed, child: const Text("Ano"))
|
||||
],
|
||||
));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue