|
|
|
|
@ -4,7 +4,6 @@ import 'package:shimmer/shimmer.dart';
|
|
|
|
|
import 'package:test_sa/extensions/context_extension.dart';
|
|
|
|
|
import 'package:test_sa/extensions/int_extensions.dart';
|
|
|
|
|
import 'package:test_sa/extensions/text_extensions.dart';
|
|
|
|
|
import 'package:test_sa/views/app_style/sizing.dart';
|
|
|
|
|
|
|
|
|
|
import '../new_views/app_style/app_color.dart';
|
|
|
|
|
|
|
|
|
|
@ -32,7 +31,10 @@ extension WidgetExtensions on Widget {
|
|
|
|
|
flushbarPosition: FlushbarPosition.TOP,
|
|
|
|
|
backgroundColor: backgroundColor ?? AppColor.green70,
|
|
|
|
|
title: title,
|
|
|
|
|
messageText: Text(message,style: AppTextStyles.heading6.copyWith(color: AppColor.white10),),
|
|
|
|
|
messageText: Text(
|
|
|
|
|
message,
|
|
|
|
|
style: AppTextStyles.heading6.copyWith(color: AppColor.white10),
|
|
|
|
|
),
|
|
|
|
|
duration: Duration(seconds: duration ?? 3),
|
|
|
|
|
flushbarStyle: FlushbarStyle.GROUNDED,
|
|
|
|
|
reverseAnimationCurve: Curves.easeInOut,
|
|
|
|
|
@ -79,14 +81,14 @@ extension WidgetExtensions on Widget {
|
|
|
|
|
).toShadowContainer(context)
|
|
|
|
|
: this;
|
|
|
|
|
|
|
|
|
|
Widget toShadowContainer(BuildContext context, {bool showShadow = true,Color? backgroundColor, double padding = 16}) => showShadow
|
|
|
|
|
Widget toShadowContainer(BuildContext context, {bool withoutShadow = true, bool showShadow = true, Color? backgroundColor, double padding = 16}) => withoutShadow
|
|
|
|
|
? Container(
|
|
|
|
|
padding: EdgeInsets.all(padding),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
decoration: ShapeDecoration(
|
|
|
|
|
color: backgroundColor?? AppColor.background(context),
|
|
|
|
|
color: backgroundColor ?? AppColor.background(context),
|
|
|
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
|
|
|
|
|
shadows: [boxShadowR14],
|
|
|
|
|
shadows: showShadow ? [boxShadowR14] : null,
|
|
|
|
|
),
|
|
|
|
|
child: this,
|
|
|
|
|
)
|
|
|
|
|
|