Created
April 30, 2021 11:57
-
-
Save ashutoshkrris/5db1ab3bdec4469fcb98e87362092ae1 to your computer and use it in GitHub Desktop.
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'; | |
| class LoginForm extends StatefulWidget { | |
| @override | |
| _LoginFormState createState() => _LoginFormState(); | |
| } | |
| class _LoginFormState extends State<LoginForm> { | |
| bool _isHidden = true; | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| backgroundColor: Theme.of(context).secondaryHeaderColor, | |
| body: Center( | |
| child: Padding( | |
| padding: const EdgeInsets.all(20.0), | |
| child: TextField( | |
| obscureText: _isHidden, | |
| decoration: InputDecoration( | |
| hintText: 'Password', | |
| ), | |
| ), | |
| ), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment