You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.1 KiB
Dart
30 lines
1.1 KiB
Dart
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",
|
|
"username":"Aamir",
|
|
"isSimulationModeEnabled":false,
|
|
"isShowUserName":true,
|
|
"isUpdateUserLocationSmoothly":true,
|
|
"isEnableReportIssue":true,
|
|
"languageCode":"en",
|
|
"clientKey": "UGVuZ3VpbklOX1Blbk5hdl9QSUY=",
|
|
"mapBoxKey": "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
|
|
});
|
|
} on PlatformException catch (e) {
|
|
print("Failed to launch storyboard: '${e.message}'.");
|
|
}
|
|
}
|
|
}
|