utils/security/text_security
library
Functions
-
safeTextCallback(VoidCallback? callback, {String context = 'Text callback'})
→ void
-
Safely executes a text tap callback with error handling.
-
validateDecorationThickness(double? thickness, {double defaultValue = 1.0, bool? enableSecurity})
→ double
-
Validates decoration thickness within configured bounds.
-
validateLetterSpacing(double? spacing, {double defaultValue = 0.0, bool? enableSecurity})
→ double
-
Validates letter spacing within configured bounds.
-
validateLineHeight(double? height, {double defaultValue = 1.2, bool? enableSecurity})
→ double
-
Validates line height within configured bounds.
-
validateMaxLines(int? maxLines, {int? defaultValue, bool? enableSecurity})
→ int
-
Validates max lines within configured bounds.
-
validateTextContent(String? text, {bool? enableSecurity})
→ String
-
Validates and sanitizes text content.
Returns the validated text string.
-
validateTextFontSize(double? fontSize, {required double defaultValue, bool? enableSecurity})
→ double
-
Validates font size within configured bounds.
-
validateTextScaleFactor(double? scaleFactor, {double defaultValue = 1.0, bool? enableSecurity})
→ double
-
Validates text scale factor within configured bounds.
-
validateTextShadows(List<Shadow>? shadows, {bool? enableSecurity})
→ List<Shadow>?
-
Validates and limits shadow list.
-
validateWordSpacing(double? spacing, {double defaultValue = 0.0, bool? enableSecurity})
→ double
-
Validates word spacing within configured bounds.