import 'package:flutter/services.dart';

class NativePluginLauncher {
  static const MethodChannel _channel = MethodChannel('com.aamir/launch_penguin_ui');

  static Future<void> launchStoryboard(String storyboardName) 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",
        "clientKey": "UGVuZ3VpbklOX1Blbk5hdl9QSUY=",
        "mapBoxKey": "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
      });
    } on PlatformException catch (e) {
      print("Failed to launch storyboard: '${e.message}'.");
    }
  }
}
