pSetSettings function

Future<void> pSetSettings({
  1. required Color primaryColor,
  2. required Color secondaryColor,
  3. String baseUrlLive = '',
  4. String baseUrlTest = '',
  5. bool? useDefaultURl,
  6. bool isLive = true,
  7. String defaultImage = 'assets/default.png',
  8. bool defImageIsAsset = true,
  9. dynamic httpCallsDefaultResponse = true,
  10. double defaultFontSize = 14.0,
  11. double defaultRadius = 8.0,
  12. double defaultBtnHeight = 50,
  13. bool? txtInputHasBorder,
  14. bool txtInputHasLabel = false,
  15. bool txtInputHasLabelOnTop = false,
  16. bool txtInputHasLabelWithStar = true,
  17. bool defaultImageClick = true,
  18. EdgeInsetsGeometry? txtInoutDefaultContentPadding,
  19. bool httpCallsWithStream = false,
  20. bool httpResponseUtf8Convert = false,
  21. bool? showAPILogs,
  22. String? internetIssueMessage,
  23. String? localization,
  24. FontWeight? fontWeight,
  25. TextStyle? txtStyle,
  26. TextStyle? labelInputStyle,
  27. TextStyle? hintInputStyle,
  28. TextStyle? styleInput,
  29. TextStyle? prefixInputStyle,
  30. Color? txtColor,
  31. Color? txtInputColor,
  32. String? currencySymbol,
  33. String? currencyLocale,
  34. int? currencyDecimal,
  35. bool isCurrencyCompact = false,
  36. InputDecoration? inputDecoration,
  37. Map<String, String>? httpHeader,
  38. Map<String, String>? httpHeaderAddOns,
  39. InputBorder? txtInputEnabledBorder,
  40. InputBorder? txtInputFocusedBorder,
  41. InputBorder? txtInputErrorBorder,
  42. InputBorder? txtInputBorder,
  43. Color? txtInputBorderColor,
  44. double? txtInputLabelPadding,
  45. double? btnHeight,
  46. double? btnRadius,
  47. Color? btnBgColor,
  48. Color? btnTextColor,
  49. Color? btnBorderColor,
  50. bool? appDirectionLeftToRight,
  51. String? fontFamily,
  52. int stopDecodingFromErrorCode = 400,
  53. bool? defaultLoadingProIsIOS,
  54. Toast defaultToastLength = Toast.LENGTH_SHORT,
  55. int httpCallTimeoutInSec = 20,
  56. Matrix4? onHoverDefaultMatrix4,
  57. double? onHoverDefaultScale,
  58. Duration? onHoverDefaultAnimatedDuration,
  59. Color? webDialogBgColor,
  60. Duration? dialogAnimationDuration,
  61. String? defaultDateFormat,
  62. String? defaultDateTimeFormat,
  63. EdgeInsets? webDialogPadding,
  64. EdgeInsets? webDialogMargin,
  65. bool? isHintCapitalizeFirst,
  66. bool? usePreCheckFunctionInHttpCalls,
  67. dynamic onHttpCallError(
    1. dynamic error,
    2. dynamic response,
    3. bool? defaultResponse
    )?,
})

Implementation

Future<void> pSetSettings({
  required Color primaryColor,
  required Color secondaryColor,
  String baseUrlLive = '',
  String baseUrlTest = '',
  bool? useDefaultURl,
  bool isLive = true,
  String defaultImage = 'assets/default.png',
  bool defImageIsAsset = true,
  httpCallsDefaultResponse = true,
  double defaultFontSize = 14.0,
  double defaultRadius = 8.0,
  double defaultBtnHeight = 50,
  bool? txtInputHasBorder,
  bool txtInputHasLabel = false,
  bool txtInputHasLabelOnTop = false,
  bool txtInputHasLabelWithStar = true,
  bool defaultImageClick = true,
  EdgeInsetsGeometry? txtInoutDefaultContentPadding,
  bool httpCallsWithStream = false,
  bool httpResponseUtf8Convert = false,
  bool? showAPILogs,
  String? internetIssueMessage,
  String? localization,
  FontWeight? fontWeight,
  TextStyle? txtStyle,
  TextStyle? labelInputStyle,
  TextStyle? hintInputStyle,
  TextStyle? styleInput,
  TextStyle? prefixInputStyle,
  Color? txtColor,
  Color? txtInputColor,
  String? currencySymbol,
  String? currencyLocale,
  int? currencyDecimal,
  bool isCurrencyCompact = false,
  InputDecoration? inputDecoration,
  Map<String, String>? httpHeader,
  Map<String, String>? httpHeaderAddOns,
  InputBorder? txtInputEnabledBorder,
  InputBorder? txtInputFocusedBorder,
  InputBorder? txtInputErrorBorder,
  InputBorder? txtInputBorder,
  Color? txtInputBorderColor,
  double? txtInputLabelPadding,
  double? btnHeight,
  double? btnRadius,
  Color? btnBgColor,
  Color? btnTextColor,
  Color? btnBorderColor,
  bool? appDirectionLeftToRight,
  String? fontFamily,
  int stopDecodingFromErrorCode = 400,
  bool? defaultLoadingProIsIOS,
  Toast defaultToastLength = Toast.LENGTH_SHORT,
  int httpCallTimeoutInSec = 20,
  Matrix4? onHoverDefaultMatrix4,
  double? onHoverDefaultScale,
  Duration? onHoverDefaultAnimatedDuration,
  Color? webDialogBgColor,
  Duration? dialogAnimationDuration,
  String? defaultDateFormat,
  String? defaultDateTimeFormat,
  EdgeInsets? webDialogPadding,
  EdgeInsets? webDialogMargin,
  bool? isHintCapitalizeFirst,
  bool? usePreCheckFunctionInHttpCalls,
  Function(dynamic error,dynamic response, bool? defaultResponse)? onHttpCallError,
}) async {
  await Dates.initializeDateFormat();
  Clr.colorPrimary = primaryColor;
  Clr.colorSecondary = secondaryColor;
  HttpCalls.live = baseUrlLive;
  HttpCalls.showAPILogs = showAPILogs;
  HttpCalls.testing = baseUrlTest;
  HttpCalls.isLive = isLive;
  GetImage.defaultImage = defaultImage;
  GetImage.defImageIsAsset = defImageIsAsset;
  HttpCalls.httpCallsDefaultResponse = httpCallsDefaultResponse;
  Siz.defaultRadius = defaultRadius;
  Siz.defaultBtnHeight = defaultBtnHeight;
  HttpCalls.httpCallsWithStream = httpCallsWithStream;
  HttpCalls.httpResponseUtf8Convert = httpResponseUtf8Convert;
  if (internetIssueMessage != null) {
    HttpCalls.internetIssue = internetIssueMessage;
  }
  Static.txtInputHasBorder = txtInputHasBorder;
  Static.txtInputHasLabel = txtInputHasLabel;
  Static.txtInputHasLabelOnTop = txtInputHasLabelOnTop;
  Static.txtInputHasLabelWithStar = txtInputHasLabelWithStar;
  Static.txtInoutDefaultContentPadding = txtInoutDefaultContentPadding;
  Static.fontWeight = fontWeight;
  Static.defaultImageClick = defaultImageClick;
  Static.defaultFontSize = defaultFontSize;
  HttpCalls.localization = localization;
  HttpCalls.httpHeader = httpHeader;
  HttpCalls.headerAddOns = httpHeaderAddOns;
  Clr.colorTxt = txtColor ?? Clr.colorBlack;
  Clr.colorTxtInput = txtInputColor ?? Clr.colorBlack;
  Style.textStyle = txtStyle;
  Style.labelInputStyle = labelInputStyle;
  Style.hintInputStyle = hintInputStyle;
  Style.styleInput = styleInput;
  Style.prefixInputStyle = prefixInputStyle;
  Static.currencyLocale = currencyLocale;
  Static.currencySymbol = currencySymbol;
  Static.isCurrencyCompact = isCurrencyCompact;
  Static.inputDecoration = inputDecoration;
  Static.enabledBorder = txtInputEnabledBorder;
  Static.focusedBorder = txtInputFocusedBorder;
  Static.errorBorder = txtInputErrorBorder;
  Static.border = txtInputBorder;
  Static.borderColor = txtInputBorderColor;
  Static.labelPadding = txtInputLabelPadding;
  Static.btnHeight = btnHeight;
  Static.btnRadius = btnRadius;
  Static.btnBgColor = btnBgColor;
  Static.btnTextColor = btnTextColor;
  Static.btnBorderColor = btnBorderColor;
  Static.appDirectionLeftToRight = appDirectionLeftToRight;
  Static.useDefaultURl = useDefaultURl;
  Static.fontFamily = fontFamily;
  Static.stopDecodingFromErrorCode = stopDecodingFromErrorCode;
  Static.defaultLoadingProIsIOS = defaultLoadingProIsIOS;
  Static.toastLength = defaultToastLength;
  HttpCalls.httpCallTimeoutInSec = httpCallTimeoutInSec;
  Static.onHoverDefaultMatrix4 = onHoverDefaultMatrix4;
  Static.onHoverDefaultScale = onHoverDefaultScale;
  Static.onHoverDefaultAnimatedDuration = onHoverDefaultAnimatedDuration;
  Static.webDialogBgColor = webDialogBgColor;
  Static.dialogAnimationDuration = dialogAnimationDuration;
  Static.defaultDateFormat = defaultDateFormat;
  Static.defaultDateTimeFormat = defaultDateTimeFormat;
  Static.webDialogPadding = webDialogPadding;
  Static.webDialogMargin = webDialogMargin;
  HttpCalls.onHttpCallError = onHttpCallError;
  Static.isHintCapitalizeFirst = isHintCapitalizeFirst??false;
  Static.usePreCheckFunctionInHttpCalls = usePreCheckFunctionInHttpCalls;

}