Skip to content

Commit d6aa931

Browse files
authored
Error popup changed to use theme colors (akvelon#223)
* error popup changed to use theme colors * null check added
1 parent 5e45b7b commit d6aa931

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/src/code_field/code_field.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ class _CodeFieldState extends State<CodeField> {
420420
final gutterStyle = widget.gutterStyle.copyWith(
421421
textStyle: lineNumberTextStyle,
422422
errorPopupTextStyle: widget.gutterStyle.errorPopupTextStyle ??
423+
CodeTheme.of(context)?.styles['root'] ??
423424
textStyle.copyWith(
424425
fontSize: DefaultStyles.errorPopupTextSize,
425426
backgroundColor: DefaultStyles.backgroundColor,

lib/src/gutter/error.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ class _GutterErrorWidgetState extends State<GutterErrorWidget> {
100100
),
101101
decoration: BoxDecoration(
102102
color: style.backgroundColor,
103-
border: Border.all(
104-
color: style.color!,
105-
),
103+
border: style.color != null
104+
? Border.all(
105+
color: style.color!,
106+
)
107+
: null,
106108
),
107109
child: Column(
108110
crossAxisAlignment: CrossAxisAlignment.start,

0 commit comments

Comments
 (0)