textfieldBooknew method
WidgetbookUseCase
textfieldBooknew()
Implementation
WidgetbookUseCase textfieldBooknew() {
return WidgetbookUseCase(
name: "METextField",
builder: (context) => Container(
width: double.infinity,
height: double.infinity,
color: Colors.white,
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 20, left: 10),
child: SizedBox(
width: context.knobs.double.slider(
label: "width",
description: "Mengubah panjang textfield",
initialValue: 300,
max: 1000,
min: 50),
height: context.knobs.double.slider(
label: "height",
description: "Mengubah lebar textfield",
initialValue: 35,
max: 80,
min: 20),
child: METextfield(
enabled: context.knobs
.boolean(label: "enabled", initialValue: true),
hintText: context.knobs.string(
label: "hintText",
description:
"Untuk menentukan placeholder pada textfield",
initialValue: "Placeholder..."),
borderRadius: context.knobs
.double.input(label: "borderRadius", initialValue: 6)
.toDouble(),
prefixIcon: context.knobs
.list(label: "prefixIcon", options: iconTemp),
suffixIcon: context.knobs
.list(label: "suffixIcon", options: suffixIcon),
)),
),
),
));
}