import 'dart:convert'; import 'package:flutter/foundation.dart'; import 'package:mnemo_cards_common/mnemo_cards_common.dart'; extension JsonStringExt on String { Future isolatedDecode([T Function(Map)? fromJson]) => compute( (_) => this.decode(fromJson), null, debugLabel: 'decode: $T', ); Future> isolatedDecodeList( [T Function(Map)? fromJson]) => compute( (_) => this.decodeList(fromJson), null, debugLabel: 'decodeList: $T', ); }