import 'package:flutter/services.dart'; // Service to manage call-related operations class CallService { static const MethodChannel _channel = MethodChannel('call_service'); // Function to make a GSM call Future makeGsmCall(String phoneNumber) async { try { await _channel.invokeMethod('makeGsmCall', {"phoneNumber": phoneNumber}); } catch (e) { print("Error making call: $e"); rethrow; } } // Function to hang up the current call Future hangUpCall() async { try { await _channel.invokeMethod('hangUpCall'); } catch (e) { print("Error hanging up call: $e"); rethrow; } } }