diff_util library

Constants

red → const String
ANSI escape codes for color highlighting
reset → const String

Functions

diffsToHtml(List<Diff> diffs, {required String title, required String subtitle}) String
expectEqualStrings(String actual, String expected, {String? reason}) → void
Finds the first difference between two strings and highlights it in red.
generateHtmlFormattedDiff(String actual, String expected, {String title = 'String Comparison', String subtitle = 'Diff report between two strings'}) String
Generates an HTML diff between two XML strings using the DiffMatchPatch package with color-coded formatting (additions in green, deletions in red)
htmlEscape(String text) String
Simple HTML escaping function