iosWebViewFix/lib/src/debug_logging_settings.dart

33 lines
1.0 KiB
Dart
Raw Normal View History

import 'package:flutter/foundation.dart';
import 'in_app_webview/webview.dart';
import 'chrome_safari_browser/chrome_safari_browser.dart';
2022-10-05 11:53:24 +00:00
import 'in_app_browser/in_app_browser.dart';
2022-10-05 11:53:24 +00:00
///Class that represents the debug logging settings used by [WebView], [InAppBrowser] and [ChromeSafariBrowser].
class DebugLoggingSettings {
///Enables debug logging info.
///
///The default value is the same value of [kDebugMode],
///so it is enabled by default when the application is compiled in debug mode
///and disabled when it is not.
bool enabled;
///Filters used to exclude some logs from logging.
List<RegExp> excludeFilter;
///Max length of the log message.
///Set to `-1` to indicate that the log message needs to display the full content.
///
///The default value is `-1`.
int maxLogMessageLength;
///Use [print] instead of `developer.log` to log messages.
bool usePrint;
2022-10-11 14:19:36 +00:00
DebugLoggingSettings(
{this.enabled = kDebugMode,
this.excludeFilter = const [],
this.maxLogMessageLength = -1,
this.usePrint = false});
}