String prettyJson(Map<String, dynamic> value) { if (value.isEmpty) { return '{}'; } return const JsonEncoder.withIndent(' ').convert(value); }