feat(app): diffs colour added lines and +N green, removed lines and -N red

This commit is contained in:
2026-10-23 18:34:59 +01:00
parent cd1faea3ce
commit d46b10d7f6
6 changed files with 92 additions and 14 deletions
@@ -94,10 +94,11 @@ void main() {
final context = tester.element(find.byType(Scaffold));
final add = diffLineColors(context, ChangeLineKind.add);
final remove = diffLineColors(context, ChangeLineKind.remove);
expect(add.background, isNull);
expect(remove.background, isNull);
// Additions are green and removals red, each line on a light tint.
expect(add.background, isNotNull);
expect(remove.background, isNotNull);
expect(add.text, isNot(remove.text), reason: '$brightness text');
expect(add.text, Theme.of(context).colorScheme.primary);
expect(add.text.g, greaterThan(add.text.r), reason: 'green addition');
expect(remove.text, Theme.of(context).colorScheme.error);
}
},