Skip to content

Commit b161ad0

Browse files
committed
Update README.
Add Dart language styling to the code snippets.
1 parent f74222b commit b161ad0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ Option | Required | By default | Description
5656
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.
5757

5858
1. Add the short name form of your new language to the `Language` enum.
59-
```
59+
```dart
6060
enum Language {
6161
EN,
6262
FR,
6363
DE,
64-
<your new language>,
64+
<your language>,
6565
}
6666
```
6767
2. Add your layout name to the `Layout` enum if not present.
68-
```
68+
```dart
6969
enum Layout {
7070
QWERTY,
7171
QWERTZ,
7272
AZERTY,
73-
<new layout>,
73+
<your layout>,
7474
}
7575
```
7676
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:
@@ -82,24 +82,24 @@ enum Layout {
8282
(The bottom/last row will just take the remaining keys).
8383

8484
example:
85-
```
85+
```dart
8686
var frenchConfig = {
8787
Layout.QWERTY: <String, String>{
8888
'layout': 'qwertyuiopasdfghjklzxcvbnm',
89-
'horizontalSpacing': '6.0',
90-
'topLength': '10',
91-
'middleLength': '9',
89+
'horizontalSpacing': '6.0', // space between keys
90+
'topLength': '10', // number of keys
91+
'middleLength': '9', // number of keys
9292
},
9393
Layout.AZERTY: <String, String>{
9494
'layout': 'azertyuiopqsdfghjklmwxcvbn',
95-
'horizontalSpacing': '6.0',
96-
'topLength': '10',
97-
'middleLength': '9',
95+
'horizontalSpacing': '6.0', // space between keys
96+
'topLength': '10', // number of keys
97+
'middleLength': '9', // number of keys
9898
},
9999
};
100100
```
101101
4. And finally your new language config map to the `languageConfig` map, with the key as the short language name from the `Language` enum.
102-
```
102+
```dart
103103
var languageConfig = {
104104
Language.EN: englishConfig,
105105
Language.FR: frenchConfig,

0 commit comments

Comments
 (0)