passcode 0.1.0 copy "passcode: ^0.1.0" to clipboard
passcode: ^0.1.0 copied to clipboard

outdated

A Flutter widget for entering a passcode.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:passcode/passcode.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            PasscodeTextField(
              onTextChanged: (passcode) {
                print(passcode);
              },
              totalCharacters: 4,
              borderColor: Colors.black,
              passcodeType: PasscodeType.number,
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

verified publisherjoshi.dev

A Flutter widget for entering a passcode.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on passcode