openMiniapp static method

void openMiniapp(
  1. String appId, {
  2. Map<String, dynamic>? data,
  3. String? theme,
  4. Map<String, String>? extraUrlParams,
  5. String? urlSuffix,
  6. Map<String, String>? colors,
})

Implementation

static void openMiniapp(String appId,
    {Map<String, dynamic>? data,
    String? theme,
    Map<String, String>? extraUrlParams,
    String? urlSuffix,
    Map<String, String>? colors}) {
  _channel.invokeMethod("openMiniapp", {
    'app_id': appId,
    'data': data,
    'theme': theme == 'dark' || theme == 'light' || theme == 'system'
        ? theme
        : null,
    'extra_url_params': extraUrlParams,
    'url_suffix': urlSuffix,
    'colors': {
      "primary_color": colors?["primary_color"],
      "secondary_color": colors?["secondary_color"],
      "tertiary_color": colors?["tertiary_color"]
    }
  });
}