SecureKeyboard class

A widget that implements a secure keyboard.

Inheritance

Constructors

SecureKeyboard({Key? key, required SecureKeyboardType type, ValueChanged<SecureKeyboardKey>? onKeyPressed, ValueChanged<List<int>>? onCharCodesChanged, required ValueChanged<List<int>> onDoneKeyPressed, required VoidCallback onCloseKeyPressed, StringKeyTouchStartCallback? onStringKeyTouchStart, StringKeyTouchEndCallback? onStringKeyTouchEnd, String? initText, String? hintText, String? inputTextLengthSymbol, String? doneKeyText, String? clearKeyText, String obscuringCharacter = '•', int? maxLength, bool alwaysCaps = false, bool obscureText = true, bool shuffleNumericKey = true, bool hideKeyInputMonitor = false, double height = kKeyboardDefaultHeight, double keyRadius = kKeyboardKeyDefaultRadius, double keySpacing = kKeyboardKeyDefaultSpacing, EdgeInsetsGeometry keyInputMonitorPadding = kKeyInputMonitorDefaultPadding, EdgeInsetsGeometry keyboardPadding = kKeyboardDefaultPadding, Color backgroundColor = kKeyboardDefaultBackgroundColor, Color stringKeyColor = kKeyboardDefaultStringKeyColor, Color actionKeyColor = kKeyboardDefaultActionKeyColor, Color doneKeyColor = kKeyboardDefaultDoneKeyColor, Color? activatedKeyColor, TextStyle keyTextStyle = kKeyboardDefaultKeyTextStyle, TextStyle inputTextStyle = kKeyboardDefaultInputTextStyle})
Constructs an instance of SecureKeyboard.
const

Properties

actionKeyColor Color
The color of the action key(shift, backspace, clear..). Default value is const Color(0xFF222222).
final
activatedKeyColor Color?
The key color when the shift action key is activated. If the value is null, doneKeyColor is used.
final
alwaysCaps bool
Whether to always display uppercase characters. Default value is false.
final
backgroundColor Color
The background color of the keyboard. Default value is const Color(0xFF0A0A0A).
final
clearKeyText String?
The text of the clear key.
final
doneKeyColor Color
The color of the done key. Default value is const Color(0xFF1C7CDC).
final
doneKeyText String?
The text of the done key.
final
hashCode int
The hash code for this object.
no setterinherited
height double
The height of the keyboard. Default value is 280.0.
final
hideKeyInputMonitor bool
Whether to hide the key input monitor. Default value is false.
final
hintText String?
The hint text to display when the input text is empty.
final
initText String?
The initial value of the input text.
final
inputTextLengthSymbol String?
The symbol to use when displaying the input text length.
final
inputTextStyle TextStyle
The text style of the text inside the key input monitor. Default value is const TextStyle(color: Colors.white, fontSize: 17.0, fontWeight: FontWeight.w500).
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardPadding EdgeInsetsGeometry
The padding of the keyboard. Default value is const EdgeInsets.symmetric(horizontal: 5.0).
final
keyInputMonitorPadding EdgeInsetsGeometry
The padding of the key input monitor. Default value is const EdgeInsets.only(left: 10.0, right: 5.0).
final
keyRadius double
The radius of the keyboard key. Default value is 4.0.
final
keySpacing double
The spacing between keyboard keys. Default value is 1.2.
final
keyTextStyle TextStyle
The text style of the text inside the keyboard key. Default value is const TextStyle(color: Colors.white, fontSize: 17.0, fontWeight: FontWeight.w500).
final
maxLength int?
The maximum length of text that can be entered.
final
obscureText bool
Whether to hide input text as secure characters. Default value is true.
final
obscuringCharacter String
The secure character to hide the input text. Default value is .
final
onCharCodesChanged ValueChanged<List<int>>?
Called when the character codes changed.
final
onCloseKeyPressed VoidCallback
Called when the close key is pressed.
final
onDoneKeyPressed ValueChanged<List<int>>
Called when the done key is pressed.
final
onKeyPressed ValueChanged<SecureKeyboardKey>?
Called when the key is pressed.
final
onStringKeyTouchEnd StringKeyTouchEndCallback?
Called when the string key touch is finished.
final
onStringKeyTouchStart StringKeyTouchStartCallback?
Called when the string key touch is started.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shuffleNumericKey bool
Whether to shuffle the position of the numeric keys. Default value is true.
final
stringKeyColor Color
The color of the string key(alphanumeric, numeric..). Default value is const Color(0xFF313131).
final
type SecureKeyboardType
The type of the secure keyboard.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _SecureKeyboardState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited