mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 14:29:35 +00:00
媒体库上拉刷新,下拉加载
This commit is contained in:
parent
bdd85efcd8
commit
ebcbe1774a
20 changed files with 351 additions and 126 deletions
38
lib/shared/utils/custom_dialog.dart
Normal file
38
lib/shared/utils/custom_dialog.dart
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:vaani/generated/l10n.dart';
|
||||
|
||||
class DialogUtils {
|
||||
DialogUtils._();
|
||||
|
||||
// 自定义删除 dialog
|
||||
static deleteDialog(
|
||||
BuildContext context, {
|
||||
String? name,
|
||||
required Function() onPressed,
|
||||
}) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(S.of(context).delete),
|
||||
content: Text(S.of(context).deleteDialog(name ?? '')),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
onPressed();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(S.of(context).yes),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(S.of(context).no),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue