From b3b8d0b057e97b14fef382bc75c9da0ab91f23e5 Mon Sep 17 00:00:00 2001
From: julian <julian@cypherstack.com>
Date: Mon, 31 Oct 2022 09:45:42 -0600
Subject: [PATCH] added more customization options to AppBarBackButton

---
 .../custom_buttons/app_bar_icon_button.dart   | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/lib/widgets/custom_buttons/app_bar_icon_button.dart b/lib/widgets/custom_buttons/app_bar_icon_button.dart
index eb926112a..9edc1ca5f 100644
--- a/lib/widgets/custom_buttons/app_bar_icon_button.dart
+++ b/lib/widgets/custom_buttons/app_bar_icon_button.dart
@@ -51,10 +51,14 @@ class AppBarBackButton extends StatelessWidget {
     Key? key,
     this.onPressed,
     this.isCompact = false,
+    this.size,
+    this.iconSize,
   }) : super(key: key);
 
   final VoidCallback? onPressed;
   final bool isCompact;
+  final double? size;
+  final double? iconSize;
 
   @override
   Widget build(BuildContext context) {
@@ -67,19 +71,20 @@ class AppBarBackButton extends StatelessWidget {
             )
           : const EdgeInsets.all(10),
       child: AppBarIconButton(
-        size: isDesktop
-            ? isCompact
-                ? 42
-                : 56
-            : 32,
+        size: size ??
+            (isDesktop
+                ? isCompact
+                    ? 42
+                    : 56
+                : 32),
         color: isDesktop
             ? Theme.of(context).extension<StackColors>()!.textFieldDefaultBG
             : Theme.of(context).extension<StackColors>()!.background,
         shadows: const [],
         icon: SvgPicture.asset(
           Assets.svg.arrowLeft,
-          width: isCompact ? 18 : 24,
-          height: isCompact ? 18 : 24,
+          width: iconSize ?? (isCompact ? 18 : 24),
+          height: iconSize ?? (isCompact ? 18 : 24),
           color: Theme.of(context).extension<StackColors>()!.topNavIconPrimary,
         ),
         onPressed: onPressed ?? Navigator.of(context).pop,