I hope that when using GFAlert and showDialog together, GFAlert can be vertically centered.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reproducing the supplied showDialog example with GFAlert, then inspect GFAlert and GFFloatingWidget behavior around alignment and their container requirements. Done means GFAlert is vertically centered when used with showDialog and the requested Material dialog usage is supported without requiring the extra floating widget.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem? Please describe.
It seems that the native GFAlert needs to be used with GFFloatingWidget because it requires providing some containers, masks, etc. This is too complicated and inflexible for popping up dialogs on other pages. Therefore, I want to use showDialog with Material to simplify the use of GFAlert. However, I found that GFAlert cannot be vertically centered even if I set the alignment of GFAlert to center. I also tried wrapping GFAlert with a layer of GFFloatingWidget, but it still doesn't work. So, I came here to ask questions, haha.
Describe the solution you'd like
just like:
static void showCustomDialog(BuildContext context,
{required Widget widget, bool refuseBack = true, String? title, VoidCallback? onOk}) {
showDialog(
context: context,
barrierDismissible: false,
barrierColor: Colors.black54,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async => !refuseBack,
child: GFAlert(
title: title,
content: widget,
alignment: Alignment.center,
onTapOk: () {
onOk?.call();
Navigator.pop(context);
},
onTapCancel: () {
Navigator.pop(context);
},
),
);
},
);
}
Describe alternatives you've considered
static void showCustomDialog(BuildContext context,
{required Widget widget, bool refuseBack = true, String? title, VoidCallback? onOk}) {
showDialog(
context: context,
barrierDismissible: false,
barrierColor: Colors.black54,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async => !refuseBack,
child: GFFloatingWidget(
body: GFAlert(
title: title,
content: widget,
alignment: Alignment.center,
onTapOk: () {
onOk?.call();
Navigator.pop(context);
},
onTapCancel: () {
Navigator.pop(context);
},
),
),
);
},
);
}
Additional context
none
- Lingua principale
- Dart
- Stelle
- 4.8k
- Fork
- 649
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ionicfirebaseapp/getwidget
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ionicfirebaseapp/getwidget#378 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
ionicfirebaseapp/getwidget#377 ·
-
GFToggle Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
ionicfirebaseapp/getwidget#355 ·
-
GfDatePicker Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
ionicfirebaseapp/getwidget#353 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
ionicfirebaseapp/getwidget#351 ·
Tutte le issue di ionicfirebaseapp/getwidget
Issue simili
-
[Super Editor][Chat] - Floating editor scaffold does not reset panel height after closing panel Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
a2ui-project/a2ui#2763 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
AOSSIE-Org/Ell-ena#332 ·
-
ui/ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
HemantKArya/BloomeeTunes#489 ·