TF-4265 Refactor: Move Regex pattern generation to Main Thread to leverage static caching and reduce Isolate initialization overhead.

This commit is contained in:
dab246
2026-01-30 15:36:04 +07:00
committed by Dat H. Pham
parent 55e27c78ed
commit 74c0c75023
5 changed files with 32 additions and 29 deletions
@@ -4,12 +4,12 @@ import 'package:tmail_ui_user/features/composer/presentation/manager/keyword_fil
/// Isolates cannot share memory, so we package everything here.
class DetectionParams {
final String text;
final List<String> includeList; // Keywords to ADD to the search.
final String regexPattern;
final List<KeywordFilter> filters; // Filters to BLOCK specific matches.
DetectionParams({
required this.text,
required this.includeList,
required this.regexPattern,
required this.filters,
});
}