Skip to content

Commit

Permalink
Commit from GitHub Actions (Forui Samples Presubmit)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed Jun 30, 2024
1 parent 9566fa7 commit 25ed4a3
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions samples/lib/widgets/text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class FormTextFieldPage extends SampleScaffold {

@override
Widget child(BuildContext context) => const Padding(
padding: EdgeInsets.all(15.0),
child: LoginForm(),
);
padding: EdgeInsets.all(15.0),
child: LoginForm(),
);
}

class LoginForm extends StatefulWidget {
Expand All @@ -101,26 +101,26 @@ class _LoginFormState extends State<LoginForm> {

@override
Widget build(BuildContext context) => Form(
key: _formKey,
child: Column(
children: [
FTextField.email(
hint: '[email protected]',
help: const Text(''),
validator: (value) => (value?.contains('@') ?? false) ? null : 'Please enter a valid email.',
),
const SizedBox(height: 4),
FTextField.password(
hint: '',
help: const Text(''),
validator: (value) => 8 <= (value?.length ?? 0) ? null : 'Password must be at least 8 characters long.',
),
const SizedBox(height: 30),
FButton(
rawLabel: const Text('Login'),
onPress: () => _formKey.currentState!.validate(),
key: _formKey,
child: Column(
children: [
FTextField.email(
hint: '[email protected]',
help: const Text(''),
validator: (value) => (value?.contains('@') ?? false) ? null : 'Please enter a valid email.',
),
const SizedBox(height: 4),
FTextField.password(
hint: '',
help: const Text(''),
validator: (value) => 8 <= (value?.length ?? 0) ? null : 'Password must be at least 8 characters long.',
),
const SizedBox(height: 30),
FButton(
rawLabel: const Text('Login'),
onPress: () => _formKey.currentState!.validate(),
),
],
),
],
),
);
);
}

0 comments on commit 25ed4a3

Please sign in to comment.