successAnimate static method
Widget
successAnimate(
{ - required String message,
- String source = AssetHelper.success,
- bool useButton = false,
})
Implementation
static Widget successAnimate({
required String message,
String source = AssetHelper.success,
bool useButton = false,
}) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(15.r),
),
color: Get.theme.colorScheme.background,
),
padding: EdgeInsets.all(20.spMin),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: Alignment.center,
child: Lottie.asset(
source,
height: 100.h,
),
),
Padding(
padding: EdgeInsets.only(top: 10.h),
child: Align(
alignment: Alignment.center,
child: Padding(
padding: EdgeInsets.only(top: 10.h),
child: Texts.subtitle2(
message,
textAlign: TextAlign.center,
textOverflow: TextOverflow.visible,
),
),
),
),
SizedBox(
height: 20.h,
),
useButton
? Align(
alignment: Alignment.center,
child: Buttons.defaultButton(
widget: Texts.subtitle2(
'OK',
),
handler: () {
Get.back();
},
),
)
: const SizedBox(),
],
),
);
}