import 'package:flutter/services.dart'; class PenguinMethodChannel { static const MethodChannel _channel = MethodChannel('launch_penguin_ui'); static Future launch(String storyboardName, String languageCode, String username, {NavigationClinicDetails? details}) async { try { await _channel.invokeMethod('launchPenguin', { "storyboardName": storyboardName, "baseURL": "https://hmg.nav.penguinin.com", "dataURL": "https://hmg.nav.penguinin.com", "positionURL": "https://hmg.nav.penguinin.com", "dataServiceName": "api", "positionServiceName": "pe", "clientID": "HMG", "username": username, "isSimulationModeEnabled": false, "isShowUserName": false, "isUpdateUserLocationSmoothly": true, "isEnableReportIssue": true, "languageCode": languageCode, "clientKey": "UGVuZ3VpbklOX1Blbk5hdl9QSUY=", "mapBoxKey": "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg", "clinic_id": details?.clinicId ?? "", "patient_id": details?.patientId ?? "", "project_id": details?.projectId ?? "", }); } on PlatformException catch (e) { print("Failed to launch PenguinIn: '${e.message}'."); } } } class NavigationClinicDetails{ String? clinicId; String? patientId; String? projectId; }