@@ -234,37 +234,40 @@ extension ExtensionDialog on GetInterface {
234
234
}
235
235
}
236
236
237
- Widget baseAlertDialog = AlertDialog (
238
- titlePadding: titlePadding ?? const EdgeInsets .all (8 ),
239
- contentPadding: contentPadding ?? const EdgeInsets .all (8 ),
240
-
241
- backgroundColor: backgroundColor ?? theme.dialogBackgroundColor,
242
- shape: RoundedRectangleBorder (
243
- borderRadius: BorderRadius .all (Radius .circular (radius))),
244
- title: Text (title, textAlign: TextAlign .center, style: titleStyle),
245
- content: Column (
246
- crossAxisAlignment: CrossAxisAlignment .center,
247
- mainAxisSize: MainAxisSize .min,
248
- children: [
249
- content ??
250
- Text (middleText,
251
- textAlign: TextAlign .center, style: middleTextStyle),
252
- const SizedBox (height: 16 ),
253
- ButtonTheme (
254
- minWidth: 78.0 ,
255
- height: 34.0 ,
256
- child: Wrap (
257
- alignment: WrapAlignment .center,
258
- spacing: 8 ,
259
- runSpacing: 8 ,
260
- children: actions,
261
- ),
262
- )
263
- ],
264
- ),
265
- // actions: actions, // ?? <Widget>[cancelButton, confirmButton],
266
- buttonPadding: EdgeInsets .zero,
267
- );
237
+ Widget baseAlertDialog = Builder (builder: (context) {
238
+ return AlertDialog (
239
+ titlePadding: titlePadding ?? const EdgeInsets .all (8 ),
240
+ contentPadding: contentPadding ?? const EdgeInsets .all (8 ),
241
+
242
+ backgroundColor:
243
+ backgroundColor ?? DialogTheme .of (context).backgroundColor,
244
+ shape: RoundedRectangleBorder (
245
+ borderRadius: BorderRadius .all (Radius .circular (radius))),
246
+ title: Text (title, textAlign: TextAlign .center, style: titleStyle),
247
+ content: Column (
248
+ crossAxisAlignment: CrossAxisAlignment .center,
249
+ mainAxisSize: MainAxisSize .min,
250
+ children: [
251
+ content ??
252
+ Text (middleText,
253
+ textAlign: TextAlign .center, style: middleTextStyle),
254
+ const SizedBox (height: 16 ),
255
+ ButtonTheme (
256
+ minWidth: 78.0 ,
257
+ height: 34.0 ,
258
+ child: Wrap (
259
+ alignment: WrapAlignment .center,
260
+ spacing: 8 ,
261
+ runSpacing: 8 ,
262
+ children: actions! ,
263
+ ),
264
+ )
265
+ ],
266
+ ),
267
+ // actions: actions, // ?? <Widget>[cancelButton, confirmButton],
268
+ buttonPadding: EdgeInsets .zero,
269
+ );
270
+ });
268
271
269
272
return dialog <T >(
270
273
onWillPop != null
0 commit comments