ControlOptions constructor

ControlOptions({
  1. NsgSwitchHorizontalStyle nsgSwitchHorizontalStyle = const NsgSwitchHorizontalStyle(),
  2. NsgTableStyle nsgTableStyle = const NsgTableStyle(),
  3. double fileExchangeVersion = 1.0,
  4. EdgeInsets nsgInputMargin = const EdgeInsets.all(5),
  5. bool nsgInputFilled = false,
  6. bool nsgInputHintAlwaysOnTop = false,
  7. bool nsgInputHintHidden = false,
  8. Color nsgInputTextColor = const Color.fromARGB(255, 0, 0, 0),
  9. Color nsgInputHintColor = const Color.fromARGB(122, 70, 59, 11),
  10. Color nsgInputBorderColor = const Color.fromARGB(122, 70, 59, 11),
  11. Color nsgInputBorderActiveColor = const Color.fromARGB(255, 70, 59, 11),
  12. Color nsginputCloseIconColor = const Color.fromARGB(255, 70, 59, 11),
  13. Color nsginputCloseIconColorHover = const Color.fromARGB(122, 70, 59, 11),
  14. Color nsgInputDynamicListTextColor = const Color.fromARGB(255, 0, 0, 0),
  15. Color nsgInputDynamicListTextSelectedColor = const Color.fromARGB(255, 0, 0, 0),
  16. Color nsgInputDynamicListBackColor = const Color.fromARGB(255, 0, 0, 0),
  17. Color nsgInputDynamicListBackSelectedColor = const Color.fromARGB(255, 0, 0, 0),
  18. Color nsgInputColorFilled = Colors.transparent,
  19. Color nsgInputColorLabel = Colors.black,
  20. TextFormFieldType nsgInputOutlineBorderType = TextFormFieldType.underlineInputBorder,
  21. EdgeInsets nsgInputContentPadding = const EdgeInsets.all(5),
  22. bool nsgInputShowLabel = true,
  23. double appMaxWidth = 640,
  24. double appMinWidth = 320,
  25. double sizeH1 = 36,
  26. double sizeH2 = 32,
  27. double sizeH3 = 28,
  28. double sizeH4 = 24,
  29. double sizeXXL = 20,
  30. double sizeXL = 18,
  31. double sizeL = 16,
  32. double sizeM = 14,
  33. double sizeS = 12,
  34. double sizeXS = 10,
  35. double sizeXXS = 9,
  36. double nsgButtonHeight = 40,
  37. EdgeInsets nsgButtonMargin = const EdgeInsets.all(5),
  38. double borderRadius = 15.0,
  39. Map<String, List<Color>> gradients = const {'main' : [Color.fromRGBO(233, 200, 45, 1), Color.fromARGB(255, 153, 128, 16)]},
  40. Color colorModalBack = const Color.fromARGB(150, 0, 0, 0),
  41. Color colorMain = const Color.fromRGBO(233, 200, 45, 1),
  42. Color colorMainBack = const Color.fromRGBO(255, 255, 255, 1),
  43. Color colorMainText = const Color.fromARGB(255, 70, 59, 11),
  44. Color colorText = const Color.fromARGB(255, 70, 59, 11),
  45. Color colorInverted = const Color.fromRGBO(255, 255, 255, 1),
  46. Color colorMainOpacity = const Color.fromRGBO(242, 239, 253, 1),
  47. Color colorMainDark = const Color.fromARGB(255, 192, 163, 34),
  48. Color tableHeaderColor = const Color.fromARGB(255, 192, 163, 34),
  49. Color tableCellBackColor = const Color.fromRGBO(255, 255, 255, 1),
  50. Color tableHeaderArrowsColor = const Color.fromRGBO(255, 255, 255, 1),
  51. Color tableHeaderLinesColor = const Color.fromRGBO(233, 200, 45, 1),
  52. Color colorMainDarker = const Color.fromARGB(255, 153, 128, 16),
  53. Color colorMainLight = const Color.fromARGB(255, 255, 245, 201),
  54. Color colorMainLighter = const Color.fromARGB(255, 255, 245, 201),
  55. Color colorSecondaryDark = const Color.fromRGBO(255, 255, 255, 1),
  56. Color colorSecondaryLight = const Color.fromRGBO(255, 255, 255, 1),
  57. Color colorWhite = const Color.fromRGBO(255, 255, 255, 1),
  58. Color colorSecondaryText = const Color.fromARGB(255, 70, 59, 11),
  59. Color colorNormal = const Color.fromARGB(255, 29, 180, 95),
  60. Color colorError = const Color.fromRGBO(208, 8, 8, 1),
  61. Color colorWarning = const Color.fromARGB(255, 199, 101, 10),
  62. Color colorConfirmed = const Color.fromARGB(255, 31, 138, 75),
  63. Color colorBlue = const Color.fromRGBO(0, 88, 163, 1),
  64. Color colorGrey = const Color.fromARGB(255, 77, 77, 77),
  65. Color colorGreyLight = const Color.fromARGB(255, 150, 150, 150),
  66. Color colorGreyLighter = const Color.fromARGB(255, 230, 230, 230),
  67. Color colorGreyDark = const Color.fromARGB(255, 55, 55, 55),
  68. Color colorGreyDarker = const Color.fromARGB(255, 33, 33, 33),
  69. Color colorPrimary = const Color.fromRGBO(233, 200, 45, 1),
  70. Color colorPrimaryText = const Color.fromARGB(255, 33, 33, 33),
  71. Color colorSecondary = const Color.fromRGBO(255, 255, 255, 1),
  72. Color colorTertiary = const Color.fromRGBO(255, 255, 255, 1),
  73. Color colorNeutral = const Color.fromRGBO(255, 255, 255, 1),
  74. Color colorSuccess = const Color.fromARGB(255, 31, 138, 75),
  75. Color colorBase = const Color.fromRGBO(255, 255, 255, 1),
  76. Color colorOverlay = const Color.fromARGB(150, 0, 0, 0),
})

Implementation

ControlOptions({
  this.nsgSwitchHorizontalStyle = const NsgSwitchHorizontalStyle(),
  this.nsgTableStyle = const NsgTableStyle(),
  this.fileExchangeVersion = 1.0,
  this.nsgInputMargin = const EdgeInsets.all(5),
  this.nsgInputFilled = false,
  this.nsgInputHintAlwaysOnTop = false,
  this.nsgInputHintHidden = false,
  this.nsgInputTextColor = const Color.fromARGB(255, 0, 0, 0),
  this.nsgInputHintColor = const Color.fromARGB(122, 70, 59, 11),
  this.nsgInputBorderColor = const Color.fromARGB(122, 70, 59, 11),
  this.nsgInputBorderActiveColor = const Color.fromARGB(255, 70, 59, 11),
  this.nsginputCloseIconColor = const Color.fromARGB(255, 70, 59, 11),
  this.nsginputCloseIconColorHover = const Color.fromARGB(122, 70, 59, 11),
  this.nsgInputDynamicListTextColor = const Color.fromARGB(255, 0, 0, 0),
  this.nsgInputDynamicListTextSelectedColor = const Color.fromARGB(255, 0, 0, 0),
  this.nsgInputDynamicListBackColor = const Color.fromARGB(255, 0, 0, 0),
  this.nsgInputDynamicListBackSelectedColor = const Color.fromARGB(255, 0, 0, 0),
  this.nsgInputColorFilled = Colors.transparent,
  this.nsgInputColorLabel = Colors.black,
  this.nsgInputOutlineBorderType = TextFormFieldType.underlineInputBorder,
  this.nsgInputContentPadding = const EdgeInsets.all(5),
  this.nsgInputShowLabel = true,
  this.appMaxWidth = 640,
  this.appMinWidth = 320,
  this.sizeH1 = 36,
  this.sizeH2 = 32,
  this.sizeH3 = 28,
  this.sizeH4 = 24,
  this.sizeXXL = 20,
  this.sizeXL = 18,
  this.sizeL = 16,
  this.sizeM = 14,
  this.sizeS = 12,
  this.sizeXS = 10,
  this.sizeXXS = 9,
  this.nsgButtonHeight = 40,
  this.nsgButtonMargin = const EdgeInsets.all(5),
  this.borderRadius = 15.0,
  this.gradients = const {
    'main': [Color.fromRGBO(233, 200, 45, 1), Color.fromARGB(255, 153, 128, 16)],
  },
  //@Deprecated('Old variable. Use colorOverlay')
  this.colorModalBack = const Color.fromARGB(150, 0, 0, 0),
  //@Deprecated('Old variable. Use colorPrimary')
  this.colorMain = const Color.fromRGBO(233, 200, 45, 1),
  //@Deprecated('Old variable. Use colorBase')
  this.colorMainBack = const Color.fromRGBO(255, 255, 255, 1),
  //@Deprecated('Old variable. Use colorBase[int]')
  this.colorMainText = const Color.fromARGB(255, 70, 59, 11),
  //@Deprecated('Old variable. Use colorBase[int]f')
  this.colorText = const Color.fromARGB(255, 70, 59, 11),
  //@Deprecated('Old variable. Use colorBase[int]')
  this.colorInverted = const Color.fromRGBO(255, 255, 255, 1),
  this.colorMainOpacity = const Color.fromRGBO(242, 239, 253, 1),
  //    @Deprecated('Old variable. Use colorPrimary[int]')
  this.colorMainDark = const Color.fromARGB(255, 192, 163, 34),
  this.tableHeaderColor = const Color.fromARGB(255, 192, 163, 34),
  this.tableCellBackColor = const Color.fromRGBO(255, 255, 255, 1),
  this.tableHeaderArrowsColor = const Color.fromRGBO(255, 255, 255, 1),
  this.tableHeaderLinesColor = const Color.fromRGBO(233, 200, 45, 1),
  //@Deprecated('Old variable. Use colorPrimary[int]')
  this.colorMainDarker = const Color.fromARGB(255, 153, 128, 16),
  //@Deprecated('Old variable. Use colorPrimary[int]')
  this.colorMainLight = const Color.fromARGB(255, 255, 245, 201),
  //@Deprecated('Old variable. Use colorPrimary[int]')
  this.colorMainLighter = const Color.fromARGB(255, 255, 245, 201),

  //@Deprecated('Old variable. Use colorSecondary[int]')
  this.colorSecondaryDark = const Color.fromRGBO(255, 255, 255, 1),
  //@Deprecated('Old variable. Use colorSecondary[int]')
  this.colorSecondaryLight = const Color.fromRGBO(255, 255, 255, 1),
  this.colorWhite = const Color.fromRGBO(255, 255, 255, 1),
  //@Deprecated('Old variable. Use colorSecondary')
  this.colorSecondaryText = const Color.fromARGB(255, 70, 59, 11),
  this.colorNormal = const Color.fromARGB(255, 29, 180, 95),
  this.colorError = const Color.fromRGBO(208, 8, 8, 1),
  this.colorWarning = const Color.fromARGB(255, 199, 101, 10),
  //@Deprecated('Old variable. Use colorSuccess')
  this.colorConfirmed = const Color.fromARGB(255, 31, 138, 75),
  this.colorBlue = const Color.fromRGBO(0, 88, 163, 1),
  this.colorGrey = const Color.fromARGB(255, 77, 77, 77),
  this.colorGreyLight = const Color.fromARGB(255, 150, 150, 150),
  this.colorGreyLighter = const Color.fromARGB(255, 230, 230, 230),
  this.colorGreyDark = const Color.fromARGB(255, 55, 55, 55),
  this.colorGreyDarker = const Color.fromARGB(255, 33, 33, 33),
  this.colorPrimary = const Color.fromRGBO(233, 200, 45, 1),
  this.colorPrimaryText = const Color.fromARGB(255, 33, 33, 33),
  this.colorSecondary = const Color.fromRGBO(255, 255, 255, 1),
  this.colorTertiary = const Color.fromRGBO(255, 255, 255, 1),
  this.colorNeutral = const Color.fromRGBO(255, 255, 255, 1),
  this.colorSuccess = const Color.fromARGB(255, 31, 138, 75),
  this.colorBase = const Color.fromRGBO(255, 255, 255, 1),
  this.colorOverlay = const Color.fromARGB(150, 0, 0, 0),
}) {
  NsgApiException.showExceptionDefault = NsgErrorWidget.showError;

  // Дефолтная функция с диалоговым окном при закрытии страницы на которой были сделаны изменения (например, в текстовой форме)
  NsgBaseController.saveOrCancelDefaultDialog = NsgDialogSaveOrCancel.saveOrCancel;
  NsgBaseController.showErrorByString = NsgErrorWidget.showErrorByString;
}