From cbad28333a999515b857db0777fe64b0d9913093 Mon Sep 17 00:00:00 2001 From: Pante Date: Tue, 2 Jul 2024 12:13:47 +0000 Subject: [PATCH] Commit from GitHub Actions (Forui Samples Presubmit) --- samples/lib/widgets/checkbox.dart | 88 +++++++++++++++---------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/samples/lib/widgets/checkbox.dart b/samples/lib/widgets/checkbox.dart index cc9340684..b3a46b631 100644 --- a/samples/lib/widgets/checkbox.dart +++ b/samples/lib/widgets/checkbox.dart @@ -1,6 +1,8 @@ -import 'package:auto_route/auto_route.dart'; import 'package:flutter/widgets.dart'; + +import 'package:auto_route/auto_route.dart'; import 'package:forui/forui.dart'; + import 'package:forui_samples/sample_scaffold.dart'; @RoutePage() @@ -14,31 +16,29 @@ class CheckboxPage extends SampleScaffold { @override Widget child(BuildContext context) => Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 30), - child: FCheckbox( - enabled: enabled, - ), - ), - ], - ); + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 30), + child: FCheckbox( + enabled: enabled, + ), + ), + ], + ); } @RoutePage() class FormCheckboxPage extends SampleScaffold { - FormCheckboxPage({ @queryParam super.theme, }); @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 { @@ -58,35 +58,35 @@ class _LoginFormState extends State { @override Widget build(BuildContext context) => Form( - key: _formKey, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - FTextField.email( - hint: 'janedoe@foruslabs.com', - 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: 4), - Row( + key: _formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - const FCheckbox(), - const SizedBox(width: 7), - Text('Remember password?', style: context.theme.typography.sm), + FTextField.email( + hint: 'janedoe@foruslabs.com', + 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: 4), + Row( + children: [ + const FCheckbox(), + const SizedBox(width: 7), + Text('Remember password?', style: context.theme.typography.sm), + ], + ), + const SizedBox(height: 30), + FButton( + label: const Text('Login'), + onPress: () => _formKey.currentState!.validate(), + ), ], ), - const SizedBox(height: 30), - FButton( - label: const Text('Login'), - onPress: () => _formKey.currentState!.validate(), - ), - ], - ), - ); + ); }