AdaptiveCard.asset constructor

AdaptiveCard.asset({
  1. Key? key,
  2. Widget? placeholder,
  3. CardRegistry? cardRegistry,
  4. required String assetPath,
  5. String? hostConfigPath,
  6. Map<String, dynamic>? hostConfigMap,
  7. void onSubmit(
    1. Map<String, dynamic> map
    )?,
  8. void onOpenUrl(
    1. String url
    )?,
  9. bool showDebugJson = true,
  10. bool approximateDarkThemeColors = true,
  11. bool isAsync = true,
})

Implementation

AdaptiveCard.asset({
  Key? key,
  this.placeholder,
  CardRegistry? cardRegistry,
  required String assetPath,
  String? hostConfigPath,
  Map<String, dynamic>? hostConfigMap,
  this.onSubmit,
  this.onOpenUrl,
  this.showDebugJson = true,
  this.approximateDarkThemeColors = true,
  this.isAsync = true,
})  : assert(
        hostConfigPath != null || hostConfigMap != null,
        'Either hostConfigPath or hostConfig must be provided.',
      ),
      adaptiveCardContentProvider = AssetAdaptiveCardContentProvider(
  path: assetPath,
  hostConfigPath: hostConfigPath,
  hostConfig: hostConfigMap,
),
      map = null,
      hostConfig = null,
      cardRegistry = cardRegistry ?? const CardRegistry(),
      super(key: key);