SignupVariant2Story top-level property
Story
SignupVariant2Story
getter/setter pair
Implementation
Story SignupVariant2Story = Story(
name: 'Sign Up Variant 2',
builder: (context) {
final logoType = context.knobs.options<LogoType>(
label: "Logo Shape",
initial: LogoType.square,
options: [
Option(label: 'Circle', value: LogoType.circle),
Option(label: 'Square', value: LogoType.square),
Option(label: 'Rectangle', value: LogoType.rectangle),
Option(
label: 'Rounded Rectangle', value: LogoType.roundedRectangle),
Option(label: 'Pilled', value: LogoType.pilled)
]);
final isLargeCircle =
context.knobs.boolean(label: 'IsLargeCircle', initial: true);
final logoAlignment = context.knobs.options(
label: "Logo Alignment",
initial: Alignment.topLeft,
options: [
Option(label: "Left", value: Alignment.topLeft),
Option(label: "Center", value: Alignment.topCenter),
Option(label: "Right", value: Alignment.topRight)
]);
final logoLink = context.knobs.text(
label: "Logo Link",
initial:
"",
description: "Image Link");
final heading =
context.knobs.text(label: 'Title', initial: "Create Account");
final businessName =
context.knobs.text(label: 'Business Name', initial: "Business Name");
final subHeading = context.knobs.text(
label: 'Welcome Message',
initial:
"We make your life easier by seamless integration. Get started now!");
final submitButtonName =
context.knobs.text(label: 'Submit Button Name', initial: "Sign In");
final isNameRequired =
context.knobs.boolean(label: 'Include Name Field', initial: true);
final passwordRegex = context.knobs.text(label: 'Password Regex');
final loginLink = context.knobs.text(label: 'Login link');
final namePlaceholdertext = context.knobs
.text(label: 'namePlaceholderText', initial: "Eg: Malik");
final emailPlaceholdertext = context.knobs
.text(label: 'emailPlaceholderText', initial: "Eg: Malik@gmail.com");
final passwordPlaceholdertext = context.knobs.text(
label: 'passwordPlaceholderText', initial: "Create your password");
final nameErrorMessage = context.knobs.text(label: 'Name Error Message');
final passwordErrorMessage =
context.knobs.text(label: 'Password Error Message');
final isFooterVisible =
context.knobs.boolean(label: 'Include Footer', initial: true);
final tandcLink = context.knobs
.text(label: "tandcLink", description: "Terms and Conditions Link");
final policyLink = context.knobs
.text(label: "policyLink", description: "Privacy Policy Link");
return Scaffold(
body: SafeArea(
child: Column(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: DDSSignUpVariant2(
logoAlignment: logoAlignment,
logoType: logoType,
isLargeCircle: isLargeCircle,
logoLink: logoLink,
onSubmit: () {},
heading: heading,
loginLink: loginLink,
businessName: businessName,
subHeading: subHeading,
isNameRequired: isNameRequired,
passwordRegex: passwordRegex,
namePlaceholdertext: namePlaceholdertext,
passwordPlaceholdertext: passwordPlaceholdertext,
emailPlaceholdertext: emailPlaceholdertext,
tandcLink: tandcLink,
policyLink: policyLink,
nameErrorMessage: nameErrorMessage,
passwordErrorMessage: passwordErrorMessage,
isFooterVisible: isFooterVisible,
submitButtonName: submitButtonName,
),
),
),
],
)),
);
});