getAppVersionInfo method

  1. @override
Future<InappifyAppVersionInfo?> getAppVersionInfo()
override

Returns host application version information when available.

Implementation

@override
Future<InappifyAppVersionInfo?> getAppVersionInfo() async {
  final raw = await methodChannel.invokeMethod<Object?>('getVersionInfo');
  final normalized = InappifyChannelCodec.normalize(raw);
  if (normalized is! Map<String, Object?>) {
    throw const FormatException('getVersionInfo must return a map.');
  }
  return InappifyAppVersionInfo.fromMap(normalized.cast<String, dynamic>());
}