joinCauses property

String Function(String? first, String? second) joinCauses
getter/setter pair

Joins the given strings, such as the second is the reason for the first. Will return a message such as "first\n\nReason: second". You can change this variable to inject another way to join them.

Implementation

static var joinCauses = (
  String? first,
  String? second,
) {
  if (first == null || first.isEmpty) return second ?? "";
  if (second == null || second.isEmpty) return first;
  return "$first${defaultJoinString()}$second";
};