discord_form_flutter 0.0.1+1 discord_form_flutter: ^0.0.1+1 copied to clipboard
A simple, clean looking form that can save you time when creating a signup page for example. It is easy to use and also packed up with default style that is very similar to discord forms. Give it a try ✨
discord_form_flutter #
A simple, clean designed form. Similar to Discord's. ⚡
Getting Started #
Add this to your package's pubspec.yaml file: #
dependencies:
discord_form_flutter: ^0.0.1
Import the package #
import 'package:discord_form_flutter/discord_form_flutter.dart';
How to Use #
Call the DiscordForm
widget and pass the reqiured parameters.
You can use it as a complete page. ✔
final _emailController = TextEditingController();
final _formKey = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
return MaterialApp(
home: DiscordForm(
formKey: _formKey,
children: [
DiscordFormField(
hint: 'Email',
icon: Icon(Icons.email),
onChanged: (value) {
// handle textfield changes
},
controller: _emailController,
),
SizedBox(height: 35),
DiscordButton(
onPressed: () {
// handle button press
},
text: Text(
'Login',
),
),
],
),
);
}
Example #
You can find an example here