diff --git a/lib/src/keyboard.dart b/lib/src/keyboard.dart index 4dd7ee5..682a64c 100644 --- a/lib/src/keyboard.dart +++ b/lib/src/keyboard.dart @@ -35,6 +35,9 @@ class VirtualKeyboard extends StatefulWidget { /// Font size for keyboard keys. final double fontSize; + /// Font Weight for keyboard keys. + final FontWeight? fontWeight; + /// the custom layout for multi or single language final VirtualKeyboardLayoutKeys? customLayoutKeys; @@ -69,6 +72,7 @@ class VirtualKeyboard extends StatefulWidget { this.height = _virtualKeyboardDefaultHeight, this.textColor = Colors.black, this.fontSize = 14, + this.fontWeight, this.alwaysCaps = false}) : super(key: key); @@ -97,6 +101,7 @@ class _VirtualKeyboardState extends State { double? width; late Color textColor; late double fontSize; + FontWeight? fontWeight; late bool alwaysCaps; late bool reverseLayout; late VirtualKeyboardLayoutKeys customLayoutKeys; @@ -245,6 +250,7 @@ class _VirtualKeyboardState extends State { width = widget.width; textColor = widget.textColor; fontSize = widget.fontSize; + fontWeight = widget.fontWeight; alwaysCaps = widget.alwaysCaps; reverseLayout = widget.reverseLayout; textController = widget.textController; @@ -256,6 +262,7 @@ class _VirtualKeyboardState extends State { textStyle = TextStyle( fontSize: fontSize, color: textColor, + fontWeight: fontWeight ); }); } @@ -284,12 +291,14 @@ class _VirtualKeyboardState extends State { height = widget.height; textColor = widget.textColor; fontSize = widget.fontSize; + fontWeight = widget.fontWeight; alwaysCaps = widget.alwaysCaps; reverseLayout = widget.reverseLayout; // Init the Text Style for keys. textStyle = TextStyle( fontSize: fontSize, color: textColor, + fontWeight: fontWeight ); }