-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor FFont & support errors in FTextField (#36)
* Refactor FFont & add error colors * Refactor FTextField to support errors
- Loading branch information
Showing
63 changed files
with
587 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
include: package:flint/analysis_options.flutter.yaml | ||
analyzer: | ||
errors: | ||
diagnostic_describe_all_properties: ignore | ||
public_member_api_docs: ignore | ||
unused_result: ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,20 +17,66 @@ class Application extends StatelessWidget { | |
data: FThemes.zinc.light, | ||
child: Scaffold( | ||
backgroundColor: FThemes.zinc.light.colorScheme.background, | ||
body: const Padding( | ||
padding: EdgeInsets.all(16), | ||
child: ExampleWidget(), | ||
body: const Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
ExampleWidget(), | ||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
|
||
/// The example widget. | ||
class ExampleWidget extends StatelessWidget { | ||
/// Creates an example widget. | ||
class ExampleWidget extends StatefulWidget { | ||
const ExampleWidget({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) => ListView(); | ||
State<ExampleWidget> createState() => _ExampleWidgetState(); | ||
} | ||
|
||
class _ExampleWidgetState extends State<ExampleWidget> { | ||
late WidgetStatesController controller; | ||
late TextEditingController textController; | ||
|
||
@override | ||
void initState() { | ||
super.initState(); | ||
controller = WidgetStatesController(); | ||
textController = TextEditingController()..addListener(() {}); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) => Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: Column( | ||
children: [ | ||
// FCard(title: 'Email'), | ||
FTextField( | ||
// enabled: false, | ||
labelText: 'Email', | ||
hintText: '[email protected]', | ||
helpText: 'This is your public display name.', | ||
// errorText: 'Error', | ||
// statesController: controller, | ||
controller: textController, | ||
), | ||
// const TextField( | ||
// // enabled: false, | ||
// decoration: InputDecoration( | ||
// labelText: 'Material TextField', | ||
// hintText: 'Email', | ||
// errorText: 'Error text', | ||
// ), | ||
// ), | ||
], | ||
), | ||
); | ||
|
||
@override | ||
void dispose() { | ||
super.dispose(); | ||
controller.dispose(); | ||
textController.dispose(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.