43 lines
1.4 KiB
Dart
43 lines
1.4 KiB
Dart
import 'package:business_panel/core/config/app_colors.dart';
|
|
import 'package:business_panel/gen/assets.gen.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
Future<void> showSuccessDialog(
|
|
BuildContext context, {
|
|
required String message,
|
|
}) async {
|
|
await showDialog(
|
|
context: context,
|
|
builder: (BuildContext context) {
|
|
return Dialog(
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(24.0),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
SvgPicture.asset(Assets.icons.tickCircle, height: 80, color: AppColors.confirm),
|
|
const SizedBox(height: 24),
|
|
Text(
|
|
"موفقیتآمیز!",
|
|
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
|
),
|
|
const SizedBox(height: 16),
|
|
Text(
|
|
message,
|
|
textAlign: TextAlign.center,
|
|
style: const TextStyle(fontSize: 16, color: Colors.black54),
|
|
),
|
|
const SizedBox(height: 24),
|
|
ElevatedButton(
|
|
onPressed: () => Navigator.of(context).pop(),
|
|
child: const Text("فهمیدم"),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
} |