getSyncStatus method

  1. @override
Future<Map<String, dynamic>> getSyncStatus()
override

Returns the current sync session status.

Returns a map with:

  • hasResumableSession: bool - whether there's an interrupted sync to resume
  • sentCount: int - number of records already sent in this session
  • isFullExport: bool - whether this is a full export or incremental sync
  • createdAt: String? - ISO8601 timestamp when the sync session started

Implementation

@override
Future<Map<String, dynamic>> getSyncStatus() async {
  final result = await _channel.invokeMethod<Map<Object?, Object?>>('getSyncStatus');
  if (result == null) return {};
  return result.map((key, value) => MapEntry(key as String, value));
}