Import sorgenti Flutter di Henflow (export da Nextcloud: lib/ + documenti di progetto)
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../app_language.dart';
|
||||
|
||||
Future<bool> showDeactivateDialog(BuildContext context) async {
|
||||
final t = TranslationService.t;
|
||||
return await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: Text(t('confirm_deactivation')),
|
||||
content: Text(t('deactivation_msg')),
|
||||
actions: [
|
||||
TextButton(onPressed: () => Navigator.pop(ctx, false), child: Text(t('cancel'))),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx, true),
|
||||
child: Text(t('deactivate'), style: const TextStyle(color: Colors.red)),
|
||||
),
|
||||
],
|
||||
),
|
||||
) ?? false;
|
||||
}
|
||||
|
||||
Future<bool> showConfirmDialog(BuildContext context) async {
|
||||
final t = TranslationService.t;
|
||||
return await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: Text(t('confirm_delete')),
|
||||
content: Text(t('delete_msg')),
|
||||
actions: [
|
||||
TextButton(onPressed: () => Navigator.pop(ctx, false), child: Text(t('cancel'))),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx, true),
|
||||
child: Text(t('delete'), style: const TextStyle(color: Colors.red)),
|
||||
),
|
||||
],
|
||||
),
|
||||
) ?? false;
|
||||
}
|
||||
Reference in New Issue
Block a user