n_pin_board 0.0.6+3 copy "n_pin_board: ^0.0.6+3" to clipboard
n_pin_board: ^0.0.6+3 copied to clipboard

Configurable and easy-to-use cross-platform pin board.

Neil's Pin Board #

Controller properties #

nPinController.length -> int
nPinController.isFull -> bool
nPinController.inputs -> List<int>
nPinController.reset()
  1. Create a controller and add a listener
NPinController nPinController = NPinController(
    shuffle   : true,
    hideInputs: false
);

@override
void initState() {
    super.initState();
    nPinController.addListener(()=> printControllerData());
}
  1. Use the widget ;D
NPinBoard(
    leftButtonTap   : () => debugPrint("hi"),
    controller      : nPinController,
    boardStyle      : BoardStyle(),
    pinInputStyle   :
    PinInputStyle()
    ..height          = 40
    ..width           = 40
    ..borderWidth     = 1
    ..borderColor     = Colors.green
    ..emptyBackground = Colors.grey.withOpacity(0.5)
    ..textStyle       = const TextStyle(fontSize: 20, color: Colors.black)
    ..borderRadius    = const Radius.circular(20),
    pinButtonStyle :
    PinButtonStyle()
    ..height          = 70
    ..overHeight      = 75
    ..width           = 70
    ..overWidth       = 75
    ..borderWidth     = 1
    ..borderColor     = Colors.grey
    ..overBorderColor = Colors.red
    ..overBackground  = Colors.red
    ..overAlignment   = Alignment.topCenter
    ..borderRadius    = const Radius.circular(20)
    ..iconStyle       = PinIconStyle(color: Colors.blue,  size: 20)
    ..iconOverStyle   = PinIconStyle(color: Colors.white, size: 15)
    ..numberStyle     = const TextStyle( fontSize: 15, color: Colors.grey  )
    ..numberOverStyle = const TextStyle( fontSize: 20, color: Colors.white )
    ..leftIcon        = Icons.abc
    ..rightIcon       = Icons.backspace_outlined,
),

4
likes
0
pub points
61%
popularity

Publisher

unverified uploader

Configurable and easy-to-use cross-platform pin board.

Repository (GitHub)
View/report issues

Topics

#pin #board #cross-platform

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on n_pin_board