Closed eprivacy-org closed 1 year ago
That's a feature that doesn't exist yet. Are the types of each button determined? Will the behavior change? If you let me know more details, I will consider it in the next update.
Hi @bosskmk , thanks for considering this!
Are the types of each button determined?
For our behaviour we only need three buttons Ok/Accept Reset/Revoke Cancel/Abort
Will the behaviour change?
Displayed button names could (in the respective language), methods per DialogType.
If you let me know more details, I will consider it in the next update.
As an example, here is a "dialog with buttons" screenshot:
I can imagine an implementation similar to AlertDialog:
AlertDialog( title: const Text('DialogName'), content: const Text('DialogContent'), actions: [ ElevatedButton( onPressed: () => Navigator.of(context).pop(), child: const Text("Cancel")), ElevatedButton( onPressed: () => doStuff(), child: const Text("Revert")), ElevatedButton( onPressed: () => sendToBackendAndPop(), child: const Text("Save")), ], );
I don't know the exact layout regarding the individual screen sizes or architectures.
@eprivacy-org Pluto-grid use it's own DateTimePicker widget. If you want a custom dialog, change your cell to render mode:
PlutoColumn(renderer: renderer);
Next, on your renderer widget, you can use a onTap
and call your Dialog showup.
Use a DateTimePicker widget on that dialog like this one:
FormBuilderDateTimePicker(
name: name,
timePickerInitialEntryMode: TimePickerEntryMode.input,
transitionBuilder: (BuildContext context, Widget? child) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(alwaysUse24HourFormat: true),
child: child ?? Container(),
);
},
initialTime:
TimeOfDay(hour: DateTime.now().hour, minute: DateTime.now().minute),
)
FormBuilder
will have a Key
to collect data when you call them.
Just reload your Pluto grid and load new data to the cell.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Hi, I'm not sure how to add or set buttons in the dialog.
The reason I need it is that I have several seniors working with my app. On Desktop and Mobile. I have a lot of requests for "Save", "Undo" and a "Reset" Buttons.
Thanks in advance.