LCOV - code coverage report
Current view: top level - _google_cast_context - android_google_cast_context_method_channel.dart Coverage Total Hit
Test: lcov_cleaned.info Lines: 100.0 % 3 3
Test Date: 2025-06-20 10:50:47 Functions: - 0 0

            Line data    Source code
       1              : import 'package:flutter/services.dart';
       2              : import 'package:flutter_chrome_cast/entities/cast_options.dart';
       3              : 
       4              : import 'google_cast_context_platform_interface.dart';
       5              : 
       6              : /// Android-specific implementation of Google Cast context functionality.
       7              : ///
       8              : /// This class provides the Android platform implementation for initializing
       9              : /// and managing the Google Cast context using method channels.
      10              : class GoogleCastContextAndroidMethodChannel
      11              :     implements GoogleCastContextPlatformInterface {
      12              :   final _channel = const MethodChannel('com.felnanuke.google_cast.context');
      13              : 
      14            1 :   @override
      15              :   Future<bool> setSharedInstanceWithOptions(
      16              :       GoogleCastOptions castOptions) async {
      17              :     try {
      18              :       final result =
      19            3 :           await _channel.invokeMethod('setSharedInstance', castOptions.toMap());
      20            1 :       return result == true;
      21              :     } catch (e) {
      22              :       rethrow;
      23              :     }
      24              :   }
      25              : }
        

Generated by: LCOV version 2.3.1-1