Created with <3 with dartpad.dev.
Last active
August 9, 2022 17:59
-
-
Save victor-carv/b80599ccac7e318d9404990d1b5244aa to your computer and use it in GitHub Desktop.
ensorcelled-gorge-9177
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
const appTitle = 'Form Styling Demo'; | |
return MaterialApp( | |
title: appTitle, | |
home: Scaffold( | |
appBar: AppBar( | |
title: const Text(appTitle), | |
), | |
body: const MyCustomForm(), | |
), | |
); | |
} | |
} | |
class MyCustomForm extends StatelessWidget { | |
const MyCustomForm({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
const Padding( | |
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16), | |
child: TextField( | |
decoration: InputDecoration( | |
border: OutlineInputBorder(), | |
hintText: '[email protected]', | |
labelText: "Enter your username", | |
), | |
), | |
), | |
], | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment