Skip to content

Instantly share code, notes, and snippets.

@victor-carv
Last active August 24, 2022 17:26
Show Gist options
  • Save victor-carv/8a91012df588940871b8a444ecea7f31 to your computer and use it in GitHub Desktop.
Save victor-carv/8a91012df588940871b8a444ecea7f31 to your computer and use it in GitHub Desktop.
text input tests
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