BackdropScaffold in Jetpack

Updated 28 February 2022

Save

BackdropScaffold provides Api to put several components together to build the screen by ensuring proper layout strategy for them and collecting necessary data so that these components will work together.

BackdropScaffold uses some components/ parameters, in which below are the main.

backLayerContent – Back layer Content
Mainly used to show top content of the or main menu items.
frontLayerContent – Front Layer Content
Shows the content corresponding to the selected menu item of the back layer.
appBar – App bar for the back layer.
Can we use to show some menu options like cart and search.
To handle the visibility of the app when the back layer is revealed set “persistentAppBar” to false/true.
scaffoldState- The state of the scaffold.
It uses BackdropScaffoldState to manage the state.


Example Of BackdropScaffold

Let’s take a simple example to show a backdrop with a back layer and a front layer.

Use scaffoldState.reveal() and scaffoldState.conceal() to show or hide back layer on alick event.

Result :

backdropscaffold.png
Backdrop
backdropscaffold.png
Back Drop


Conclusion:

In this blog, you have learned about the BackdropScaffold in Jetpack.

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home