A simple and easy to use flutter package to add a passwordfield to your Flutter project.

Getting Started

Installation

  • Add the dependency
dependencies:
  passwordfield: ^0.0.4
  flutter:
  • Import the package
import 'package:passwordfield/passwordfield.dart';
  • Voila! use the Widget
PasswordField();

Note : The widget must be included in a Material Widget normally in a Scaffold,Card,Drawer etc

  • Example
          PasswordField(
                  border: OutlineInputBorder(
                      borderRadius: BorderRadius.circular(5),
                      borderSide: BorderSide(
                        color: Colors.white,
                        width: 2,
                      )),
                  suffixIconEnabled: true,
                  hasFloatingPlaceholder: false,
                  focusedBorder: OutlineInputBorder(
                      borderRadius: BorderRadius.circular(25),
                      borderSide: BorderSide(color: Colors.white, width: 3)),
                  color: Colors.black,
                  inputStyle: TextStyle(
                    color: Colors.white,
                    fontSize: 20,
                  ),
                  hintText: "Password",
                ),
    return Scaffold(
        backgroundColor: Colors.green,
        body: Padding(
            padding: EdgeInsets.symmetric(horizontal: 20, vertical: 20),
            child: Center(
              child: PasswordField(
                color: Colors.white,
                inputStyle: TextStyle(fontSize: 30),
                hintText: "password field",
              ),
            )));

Libraries

passwordfield

Dart

VM

dart:ffi
Foreign Function Interface for interoperability with the C programming language. [...]

Web

dart:html
HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
dart:js
Low-level support for interoperating with JavaScript. [...]
dart:js_util
Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.