formatFlowEntry method

String formatFlowEntry(
  1. String entry,
  2. String indentation, {
  3. required bool preferInline,
  4. required bool lastHadTrailing,
  5. required bool isNotFirst,
})
inherited

Formats a flow map/iterable entry before it is buffered.

Implementation

String formatFlowEntry(
  String entry,
  String indentation, {
  required bool preferInline,
  required bool lastHadTrailing,
  required bool isNotFirst,
}) =>
    '${!lastHadTrailing && isNotFirst ? ',' : ''}'
    '${preferInline ? (isNotFirst ? ' ' : '') : '\n$indentation'}$entry';