numeric-simple numeric keyboard
a simple numeric key board widget.
installation
add numeric_keyboard: ^1.0.0
in your pubspec.yaml
dependencies. and import it:
import 'package:numeric_keyboard/numeric_keyboard.dart';
how to use
simply create a numerickeyboard
widget and pass the required params:
numerickeyboard(
onkeyboardtap: _onkeyboardtap
)
_onkeyboardtap(string value) {
setstate(() {
text = text + value;
});
}
params
numerickeyboard(
onkeyboardtap: _onkeyboardtap,
textcolor: colors.red,
rightbuttonfn: () {
setstate(() {
text = text.substring(0, text.length - 1);
});
},
righticon: icon(icons.backspace, color: colors.red,),
leftbuttonfn: () {
print('left button clicked');
},
lefticon: icon(icons.check, color: colors.red,),
mainaxisalignment: mainaxisalignment.spaceevenly
)
for a more detail example please take a look at the example
folder.
example
numeric keyboard:
Comments are closed.