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,
  7. bool? enableSplash,
  8. bool? saveState,
  9. String? pageAnimation,
})

Implementation

static void openMiniapp(String appId,
    {Map<String, dynamic>? data,
    String? theme,
    Map<String, String>? extraUrlParams,
    String? urlSuffix,
    Map<String, String>? colors,
    bool? enableSplash,
    bool? saveState,
    String? pageAnimation}) {
  _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"]
    },
    'enable_splash': enableSplash,
    'save_state': saveState,
    'page_animation': pageAnimation == 'BOTTOM_TO_TOP' ||
        pageAnimation == 'TOP_TO_BOTTOM' ||
        pageAnimation == 'LEFT_TO_RIGHT' ||
        pageAnimation == 'RIGHT_TO_LEFT' ||
        pageAnimation == 'FADE_IN' ? pageAnimation : null
  });
}