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 PenguinMethodChannel {
|
|
static const MethodChannel _channel = MethodChannel('launch_penguin_ui');
|
|
|
|
static Future<void> launch(String storyboardName, String languageCode, String username) 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"
|
|
});
|
|
} on PlatformException catch (e) {
|
|
print("Failed to launch PenguinIn: '${e.message}'.");
|
|
}
|
|
}
|
|
}
|