Skip to content

Instantly share code, notes, and snippets.

@Khanin-devmode
Last active December 11, 2023 04:36
Show Gist options
  • Save Khanin-devmode/9226a69aff7d49b1ef094dcd9ef30a84 to your computer and use it in GitHub Desktop.
Save Khanin-devmode/9226a69aff7d49b1ef094dcd9ef30a84 to your computer and use it in GitHub Desktop.
WidgetbookUseCase(
name: 'Usecase1',
builder: (BuildContext context) {
final width = context.knobs.double.slider(
label: 'width', min: 10, max: 100, initialValue: 50);
final height = context.knobs.double.slider(
label: 'height', min: 10, max: 100, initialValue: 50);
return Scaffold(
body: Center(
child: Container(
color: Colors.purpleAccent,
width: width,
height: height,
),
),
);
},
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment