From 4e2083de258d9ce4f6c29e7ccce9ed2f94c039dc Mon Sep 17 00:00:00 2001 From: Sailesh Dahal Date: Fri, 22 Mar 2024 12:07:34 +0545 Subject: [PATCH] feat: mutate bottom sheet and dialog builders --- lib/src/bottom_sheet/bottom_sheet_service.dart | 2 +- lib/src/dialog/dialog_service.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/bottom_sheet/bottom_sheet_service.dart b/lib/src/bottom_sheet/bottom_sheet_service.dart index 759bcc6..940cd13 100644 --- a/lib/src/bottom_sheet/bottom_sheet_service.dart +++ b/lib/src/bottom_sheet/bottom_sheet_service.dart @@ -20,7 +20,7 @@ class BottomSheetService { Map? _sheetBuilders; void setCustomSheetBuilders(Map builders) { - _sheetBuilders = builders; + _sheetBuilders = {...?_sheetBuilders, ...builders}; } Future showBottomSheet({ diff --git a/lib/src/dialog/dialog_service.dart b/lib/src/dialog/dialog_service.dart index 39bfb13..6e1cdbc 100644 --- a/lib/src/dialog/dialog_service.dart +++ b/lib/src/dialog/dialog_service.dart @@ -23,7 +23,7 @@ class DialogService { Map? _dialogBuilders; void registerCustomDialogBuilders(Map builders) { - _dialogBuilders = builders; + _dialogBuilders = {...?_dialogBuilders, ...builders}; } Map _customDialogBuilders =