feat: added insert image and more text commands
This commit is contained in:
31
lib/src/widgets/custom_dialog_template.dart
Normal file
31
lib/src/widgets/custom_dialog_template.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomDialogTemplate extends StatelessWidget {
|
||||
final List<Widget>? body;
|
||||
final Function? onDone;
|
||||
final Function? onCancel;
|
||||
|
||||
|
||||
CustomDialogTemplate({this.body, this.onDone, this.onCancel});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: body!,
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => onDone!(),
|
||||
child: Text('Done'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => onCancel!(),
|
||||
child: Text('Cancel'),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user