passwordfield 0.0.3 passwordfield: ^0.0.3 copied to clipboard
A new Flutter package project.
import 'package:flutter/material.dart';
import 'package:passwordfield/passwordfield.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: PasswordApp(),
);
}
}
class PasswordApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey,
body: Padding(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 20),
child: Center(
child: PasswordField(
hasFloatingPlaceholder: true,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5)
),
color: Colors.white,
inputStyle: TextStyle(
fontSize: 20,
),
hintText: "Password",
),
)));
}
}