wrap BaseAlertDialog content in Material (#3156)

malik1004x committed Apr 7, 2026 at 18:43 UTC a27e3215489c21ffced61bb29ea4674fa82a7398
1 file changed +42 -39
lib/src/widgets/base_alert_dialog.dart
+42 -39
@@ -210,45 +210,48 @@ class BaseAlertDialog extends StatelessWidget {
210 padding: const EdgeInsets.all(16.0),
211 child: GestureDetector(
212 onTap: () => null,
213 - child: Container(
214 - decoration: BoxDecoration(
215 - borderRadius: BorderRadius.circular(24),
216 - color: Theme.of(context).colorScheme.surface,
217 - ),
218 - child: Padding(
219 - padding: const EdgeInsets.all(24.0),
220 - child: Stack(
221 - clipBehavior: Clip.none,
222 - children: [
223 - if (headerImageUrl != null) headerImage(context, headerImageUrl!),
224 - Column(
225 - mainAxisSize: MainAxisSize.min,
226 - children: <Widget>[
227 - if (headerImageUrl != null) const SizedBox(height: 50),
228 - Column(
229 - crossAxisAlignment: CrossAxisAlignment.center,
230 - children: <Widget>[
231 - if (headerText?.isNotEmpty ?? false) headerTitle(context),
232 - titleText != null
233 - ? title(context)
234 - : SizedBox(height: 16),
235 - isDividerExists
236 - ? Padding(
237 - padding: EdgeInsets.only(top: 16, bottom: 8),
238 - child: const HorizontalSectionDivider(),
239 - )
240 - : Offstage(),
241 - Padding(
242 - padding: EdgeInsets.symmetric(vertical: 25),
243 - child: content(context),
244 - )
245 - ],
246 - ),
247 - // if (isBottomDividerExists) const HorizontalSectionDivider(),
248 - actionButtons(context)
249 - ],
250 - ),
251 - ],
213 + child: Material(
214 + borderRadius: BorderRadius.circular(24),
215 + child: Container(
216 + decoration: BoxDecoration(
217 + borderRadius: BorderRadius.circular(24),
218 + color: Theme.of(context).colorScheme.surface,
219 + ),
220 + child: Padding(
221 + padding: const EdgeInsets.all(24.0),
222 + child: Stack(
223 + clipBehavior: Clip.none,
224 + children: [
225 + if (headerImageUrl != null) headerImage(context, headerImageUrl!),
226 + Column(
227 + mainAxisSize: MainAxisSize.min,
228 + children: <Widget>[
229 + if (headerImageUrl != null) const SizedBox(height: 50),
230 + Column(
231 + crossAxisAlignment: CrossAxisAlignment.center,
232 + children: <Widget>[
233 + if (headerText?.isNotEmpty ?? false) headerTitle(context),
234 + titleText != null
235 + ? title(context)
236 + : SizedBox(height: 16),
237 + isDividerExists
238 + ? Padding(
239 + padding: EdgeInsets.only(top: 16, bottom: 8),
240 + child: const HorizontalSectionDivider(),
241 + )
242 + : Offstage(),
243 + Padding(
244 + padding: EdgeInsets.symmetric(vertical: 25),
245 + child: content(context),
246 + )
247 + ],
248 + ),
249 + // if (isBottomDividerExists) const HorizontalSectionDivider(),
250 + actionButtons(context)
251 + ],
252 + ),
253 + ],
254 + ),
255 ),
256 ),
257 ),