@@ -24,6 +24,9 @@ public class SdkConfig {
24
24
@ JsonProperty (Property .FONT_COLOUR )
25
25
private final String fontColour ;
26
26
27
+ @ JsonProperty (Property .DARK_MODE )
28
+ private final String darkMode ;
29
+
27
30
@ JsonProperty (Property .LOCALE )
28
31
private final String locale ;
29
32
@@ -57,6 +60,7 @@ public class SdkConfig {
57
60
String secondaryColour ,
58
61
String fontColour ,
59
62
String locale ,
63
+ String darkMode ,
60
64
String presetIssuingCountry ,
61
65
String successUrl ,
62
66
String errorUrl ,
@@ -71,6 +75,7 @@ public class SdkConfig {
71
75
this .secondaryColour = secondaryColour ;
72
76
this .fontColour = fontColour ;
73
77
this .locale = locale ;
78
+ this .darkMode = darkMode ;
74
79
this .presetIssuingCountry = presetIssuingCountry ;
75
80
this .successUrl = successUrl ;
76
81
this .errorUrl = errorUrl ;
@@ -104,7 +109,7 @@ public String getPrimaryColour() {
104
109
}
105
110
106
111
/**
107
- * The primary colour for the dark mode
112
+ * The primary colour for dark mode, configured for the session
108
113
*
109
114
* @return the primary colour
110
115
*/
@@ -139,6 +144,15 @@ public String getLocale() {
139
144
return locale ;
140
145
}
141
146
147
+ /**
148
+ * The dark mode option configured for the session
149
+ *
150
+ * @return the dark mode
151
+ */
152
+ public String getDarkMode () {
153
+ return darkMode ;
154
+ }
155
+
142
156
/**
143
157
* The preset issuing country
144
158
*
@@ -222,6 +236,7 @@ public static class Builder {
222
236
private String secondaryColour ;
223
237
private String fontColour ;
224
238
private String locale ;
239
+ private String darkMode ;
225
240
private String presetIssuingCountry ;
226
241
private String successUrl ;
227
242
private String errorUrl ;
@@ -317,6 +332,47 @@ public Builder withLocale(String locale) {
317
332
return this ;
318
333
}
319
334
335
+ /**
336
+ * Sets the dark mode to be used by the web/native client
337
+ *
338
+ * @param darkMode the dark mode, e.g. "ON"
339
+ * @return the builder
340
+ */
341
+ public Builder withDarkMode (String darkMode ) {
342
+ this .darkMode = darkMode ;
343
+ return this ;
344
+ }
345
+
346
+ /**
347
+ * Sets the dark mode to 'ON' to be used by the web/native client
348
+ *
349
+ * @return the builder
350
+ */
351
+ public Builder withDarkModeOn () {
352
+ this .darkMode = DocScanConstants .ON ;
353
+ return this ;
354
+ }
355
+
356
+ /**
357
+ * Sets the dark mode to 'OFF' to be used by the web/native client
358
+ *
359
+ * @return the builder
360
+ */
361
+ public Builder withDarkModeOff () {
362
+ this .darkMode = DocScanConstants .OFF ;
363
+ return this ;
364
+ }
365
+
366
+ /**
367
+ * Sets the dark mode to 'AUTO' to be used by the web/native client
368
+ *
369
+ * @return the builder
370
+ */
371
+ public Builder withDarkModeAuto () {
372
+ this .darkMode = DocScanConstants .AUTO ;
373
+ return this ;
374
+ }
375
+
320
376
/**
321
377
* Sets the preset issuing country used by the web/native client
322
378
*
@@ -436,6 +492,7 @@ public SdkConfig build() {
436
492
secondaryColour ,
437
493
fontColour ,
438
494
locale ,
495
+ darkMode ,
439
496
presetIssuingCountry ,
440
497
successUrl ,
441
498
errorUrl ,
@@ -455,6 +512,7 @@ private static final class Property {
455
512
private static final String PRIMARY_COLOUR_DARK_MODE = "primary_colour_dark_mode" ;
456
513
private static final String SECONDARY_COLOUR = "secondary_colour" ;
457
514
private static final String FONT_COLOUR = "font_colour" ;
515
+ private static final String DARK_MODE = "dark_mode" ;
458
516
private static final String LOCALE = "locale" ;
459
517
private static final String PRESET_ISSUING_COUNTRY = "preset_issuing_country" ;
460
518
private static final String SUCCESS_URL = "success_url" ;
0 commit comments