the49ltd / The49.Maui.BottomSheet

.NET MAUI library used to display pages as Bottom Sheets
MIT License
331 stars 35 forks source link

Java.Lang.NullPointerException: ' when attempting to reopen the same BottomSheet #71

Open roleemosh opened 1 year ago

roleemosh commented 1 year ago

I have a simple BottomSheet in xaml like this: `

    <the49:BottomSheet
        x:Key="sheet"
        x:Name="FilterSheet"
        Padding="8"
        BindingContext="{x:Reference this}"
        HandleColor="Black"
        HasBackdrop="True"
        HasHandle="True"
        IsCancelable="True">

        <the49:BottomSheet.Detents>
            <the49:AnchorDetent Anchor="{x:Reference Divider}" />
            <the49:FullscreenDetent />
        </the49:BottomSheet.Detents>

        <Grid ColumnDefinitions="*, Auto">

            <BoxView x:Name="Divider" HeightRequest="32" />

        </Grid>

    </the49:BottomSheet>`

When I tapped the button, I simply call this method: private async void ToolbarItem_Clicked(object sender, EventArgs e) { await FilterSheet.ShowAsync(); }

The BottomSheet displayed perfectly, but after closing and attempting to reopen it, I encountered the following error message:

image

.Net 7 Android 13

stgiaf commented 1 year ago

+1 Have the same issue

hansmbakker commented 11 months ago

Is this not a duplicate of #63, which is solved? (Note: there is no new NuGet release yet containing this change)