initWarmUp method

Future<bool> initWarmUp()

Implementation

Future<bool> initWarmUp() async {
  try {
    // Create a WebViewController
    final controller = WebViewController();

    // Try to load a blank page
    await controller.loadRequest(Uri.parse('about:blank'));

    // If we reach here without exceptions, WebView is supported
    return true;
  } catch (e) {
    TBLLogger.log('Error checking WebView support: $e');
    return false;
  }
}