PreviewLabGallery
A Composable function that catalogs and displays a list of Previews. The left sidebar actually displays the list of Previews, and the selected Preview is displayed in the center of the screen.
Parameters
CollectedPreviews collected from gradle plugins, etc. Note that CollectedPreviews not specified here will not be displayed.
Modifier to be applied to the root layout of the PreviewLabGallery.
PreviewLabGalleryState to manage the state of the PreviewLabGallery. Preserves the state of the selected Preview, etc. By default, remember is used (i.e., the composition of the call to Composable is the scope of the state), but the scope (storage period) of the state can be adjusted by moving it to a state holder, such as ViewModel, if necessary.
By specifying OpenFileHandler, you can display a "Source Code" button that displays the source code corresponding to the Preview.
Map of group names to file paths for organizing previews into featured categories. Files matching these paths will be grouped under their respective category names in the preview list.