You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**enableLongPressUppercase** | no | false | writes an uppercase when long pressing on the keys
49
51
**highlightColor** | no | - | color when pressed
50
52
**splashColor** | no | - | color when pressed (material style)
53
+
54
+
## Contribution
55
+
### Languages
56
+
To add a new language or a keyboad layout to the package you only need to modify the language.dart file. The following steps will show you how to do that.
57
+
58
+
1. Add the short name form of your new language to the `Language` enum.
59
+
```
60
+
enum Language {
61
+
EN,
62
+
FR,
63
+
DE,
64
+
<yournewlanguage>,
65
+
}
66
+
```
67
+
2. Add your layout name to the `Layout` enum if not present.
68
+
```
69
+
enum Layout {
70
+
QWERTY,
71
+
QWERTZ,
72
+
AZERTY,
73
+
<newlayout>,
74
+
}
75
+
```
76
+
3. Create a new map variable called `<language name>Config`. The keys of this map will be the layouts from the `Layout` enum (e.g: Layout.QWERTY), and the values will be maps with types `<String, String>` that contain the core configuration. These latter maps must contain four fields o:
77
+
1. `layout`: The full text layout of the keyboard.
78
+
2. `horizontalSpacing`: A floating number which will represent the spaceing between each key.
79
+
3. `topLength`: The lenght of the top/first row of keys. In other words, the number of keys to display in the top row.
80
+
4. `middleLength`: The number of keys in the middle row.
81
+
82
+
(The bottom/last row will just take the remaining keys).
83
+
84
+
example:
85
+
```
86
+
var frenchConfig = {
87
+
Layout.QWERTY: <String, String>{
88
+
'layout': 'qwertyuiopasdfghjklzxcvbnm',
89
+
'horizontalSpacing': '6.0',
90
+
'topLength': '10',
91
+
'middleLength': '9',
92
+
},
93
+
Layout.AZERTY: <String, String>{
94
+
'layout': 'azertyuiopqsdfghjklmwxcvbn',
95
+
'horizontalSpacing': '6.0',
96
+
'topLength': '10',
97
+
'middleLength': '9',
98
+
},
99
+
};
100
+
```
101
+
4. And finally your new language config map to the `languageConfig` map, with the key as the short language name from the `Language` enum.
0 commit comments