mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
asset added of success icon
This commit is contained in:
53
lib/features/shared_widgets/success_dialog.dart
Normal file
53
lib/features/shared_widgets/success_dialog.dart
Normal file
@ -0,0 +1,53 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
|
||||
|
||||
class SuccessDialog extends StatelessWidget {
|
||||
final double dialogWidth;
|
||||
final String message;
|
||||
|
||||
const SuccessDialog(
|
||||
{super.key, this.dialogWidth = 160, required this.message});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
||||
child: Container(
|
||||
width: dialogWidth,
|
||||
height: 120,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.7),
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Positioned(
|
||||
top: 20,
|
||||
child: SvgPicture.asset(
|
||||
Assets.assetsSuccessWhite,
|
||||
width: 50,
|
||||
height: 50,
|
||||
)),
|
||||
Positioned(
|
||||
bottom: 20,
|
||||
child: Text(
|
||||
message,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: FontSize.s16,
|
||||
fontFamily: FontsManager.fontFamily,
|
||||
fontWeight: FontsManager.regular,
|
||||
letterSpacing: 0.16,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user