2026-05-21 00:42:19 +02:00
|
|
|
import 'app_logger.dart';
|
|
|
|
|
import 'platform_detector.dart';
|
|
|
|
|
|
|
|
|
|
class TextInputDiagnostics {
|
2026-08-17 01:50:31 +02:00
|
|
|
/// Compile-time switch: run with
|
|
|
|
|
/// `--dart-define=PLEZY_TEXT_INPUT_DIAGNOSTICS=true` to enable. Const so the
|
|
|
|
|
/// guarded branches (and their log-string interpolation) compile out of
|
|
|
|
|
/// every normal build.
|
|
|
|
|
static const bool enabled = bool.fromEnvironment('PLEZY_TEXT_INPUT_DIAGNOSTICS');
|
2026-05-21 00:42:19 +02:00
|
|
|
|
|
|
|
|
static void log(String source, String message) {
|
|
|
|
|
if (!enabled || !PlatformDetector.isTV()) return;
|
|
|
|
|
appLogger.i('TextInputDiag $source: $message');
|
|
|
|
|
}
|
|
|
|
|
}
|