mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
[Bugfix] Alertdialog.adaptive was causing issues.
This commit is contained in:
parent
d362f1a039
commit
e0a2c8a3eb
15 changed files with 91 additions and 126 deletions
|
|
@ -10,7 +10,7 @@ Future<void> openOptionDialogue<T>(
|
|||
return showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog.adaptive(
|
||||
return AlertDialog(
|
||||
title: Text(label),
|
||||
content: SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.65,
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ Future<Duration?> showSimpleDurationPicker({
|
|||
Duration? duration;
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog.adaptive(
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(context.localized.selectTime),
|
||||
content: SimpleDurationPicker(
|
||||
initialValue: initialValue,
|
||||
|
|
@ -113,10 +113,8 @@ class SimpleDurationPicker extends ConsumerWidget {
|
|||
final parsedValue = int.parse(value);
|
||||
if (parsedValue >= 60) {
|
||||
secondsTextController.text = (parsedValue % 60).toString().padLeft(2, '0');
|
||||
minuteTextController.text = (int.parse(minuteTextController.text) + parsedValue / 60)
|
||||
.floor()
|
||||
.toString()
|
||||
.padLeft(2, '0');
|
||||
minuteTextController.text =
|
||||
(int.parse(minuteTextController.text) + parsedValue / 60).floor().toString().padLeft(2, '0');
|
||||
}
|
||||
onChanged(
|
||||
Duration(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue