Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/src/keyboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -97,6 +101,7 @@ class _VirtualKeyboardState extends State<VirtualKeyboard> {
double? width;
late Color textColor;
late double fontSize;
FontWeight? fontWeight;
late bool alwaysCaps;
late bool reverseLayout;
late VirtualKeyboardLayoutKeys customLayoutKeys;
Expand Down Expand Up @@ -245,6 +250,7 @@ class _VirtualKeyboardState extends State<VirtualKeyboard> {
width = widget.width;
textColor = widget.textColor;
fontSize = widget.fontSize;
fontWeight = widget.fontWeight;
alwaysCaps = widget.alwaysCaps;
reverseLayout = widget.reverseLayout;
textController = widget.textController;
Expand All @@ -256,6 +262,7 @@ class _VirtualKeyboardState extends State<VirtualKeyboard> {
textStyle = TextStyle(
fontSize: fontSize,
color: textColor,
fontWeight: fontWeight
);
});
}
Expand Down Expand Up @@ -284,12 +291,14 @@ class _VirtualKeyboardState extends State<VirtualKeyboard> {
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
);
}

Expand Down