mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-23 09:47:54 +00:00
asset added of success icon
This commit is contained in:
@@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -733,6 +733,10 @@ class Assets {
|
||||
static const String playIcon = "assets/icons/play_ic.svg";
|
||||
static const String gatewayIcon = "assets/icons/gateway_icon.svg";
|
||||
|
||||
//assets/icons/success-white.svg
|
||||
//assets for success white image
|
||||
static const String assetsSuccessWhite ="assets/icons/success-white.svg";
|
||||
|
||||
/// Assets for assetsImagesAutomation
|
||||
/// assets/images/automation.jpg
|
||||
static const String assetsImagesAutomation = "assets/images/automation.jpg";
|
||||
@@ -1029,4 +1033,5 @@ class Assets {
|
||||
|
||||
static const String assetsPresenceState =
|
||||
"assets/icons/functions_icons/automation_functions/presence_state.svg";
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user