@@ -431,6 +431,78 @@ class Field {
431
431
}
432
432
}
433
433
434
+ /// Field.capitalizeWords is a constructor that helps in managing capitalizeWords fields
435
+ Field .capitalizeWords (
436
+ this .key, {
437
+ this .value,
438
+ this .validate,
439
+ this .autofocus = false ,
440
+ this .dummyData,
441
+ this .header,
442
+ this .footer,
443
+ this .titleStyle,
444
+ this .style,
445
+ this .metaData = const {},
446
+ this .hidden = false ,
447
+ Widget ? prefixIcon,
448
+ bool clearable = false ,
449
+ Widget ? clearIcon,
450
+ }) : cast = FormCast .capitalizeWords (
451
+ prefixIcon: prefixIcon,
452
+ clearable: clearable,
453
+ clearIcon: clearIcon,
454
+ ) {
455
+ if (style == null ) return ;
456
+
457
+ metaData = {};
458
+ if (style is String ) {
459
+ style = style;
460
+ return ;
461
+ }
462
+ if (style is Map ) {
463
+ style as Map <String , dynamic >;
464
+ metaData! ["decoration_style" ] =
465
+ (style as Map <String , dynamic >).entries.first.value;
466
+ style = (style as Map <String , dynamic >).entries.first.key;
467
+ }
468
+ }
469
+
470
+ /// Field.capitalizeSentences is a constructor that helps in managing capitalizeSentences fields
471
+ Field .capitalizeSentences (
472
+ this .key, {
473
+ this .value,
474
+ this .validate,
475
+ this .autofocus = false ,
476
+ this .dummyData,
477
+ this .header,
478
+ this .footer,
479
+ this .titleStyle,
480
+ this .style,
481
+ this .metaData = const {},
482
+ this .hidden = false ,
483
+ Widget ? prefixIcon,
484
+ bool clearable = false ,
485
+ Widget ? clearIcon,
486
+ }) : cast = FormCast .capitalizeSentences (
487
+ prefixIcon: prefixIcon,
488
+ clearable: clearable,
489
+ clearIcon: clearIcon,
490
+ ) {
491
+ if (style == null ) return ;
492
+
493
+ metaData = {};
494
+ if (style is String ) {
495
+ style = style;
496
+ return ;
497
+ }
498
+ if (style is Map ) {
499
+ style as Map <String , dynamic >;
500
+ metaData! ["decoration_style" ] =
501
+ (style as Map <String , dynamic >).entries.first.value;
502
+ style = (style as Map <String , dynamic >).entries.first.key;
503
+ }
504
+ }
505
+
434
506
/// Field.picker is a constructor that helps in managing picker fields
435
507
Field .picker (
436
508
this .key, {
0 commit comments