refreshImageUris static method
Refreshes image file URIs of provided pages
.
For more details, please
check the section 'Persistence of Page Objects' in the documentation.
Implementation
static Future<List<Page>> refreshImageUris(List<Page> pages) async {
try {
final jsonPages = pages.map((page) => page.toJson()).toList();
final result =
await _channel.invokeMethod('refreshImageUris', {'pages': jsonPages});
final json = jsonDecode(result);
return (json['pages'] as List?)
?.map((p) => Page.fromJson(p as Map<String, dynamic>))
.toList() ??
<Page>[];
} catch (e) {
Logger.root.severe(e);
rethrow;
}
}