Created with <3 with dartpad.dev.
Last active
August 24, 2022 17:26
-
-
Save victor-carv/8a91012df588940871b8a444ecea7f31 to your computer and use it in GitHub Desktop.
text input tests
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 = "Victor's test"; | |
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 email", | |
suffixIcon: const Icon(Icons.close), | |
), | |
), | |
), | |
], | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment