-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
123 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
/// Class creates color scheme for highlighting mistakes | ||
class HighlightStyle { | ||
///Initial values | ||
static const double _initialBackgroundOpacity = 0.2; | ||
static const double _initialLineHeight = 1.5; | ||
|
||
/// Misspelling mistake highlight color | ||
final Color misspellingMistakeColor; | ||
|
||
/// Misspelling mistake highlight color | ||
final Color typographicalMistakeColor; | ||
|
||
/// Typographical mistake highlight color | ||
final Color grammarMistakeColor; | ||
|
||
/// Uncategorized mistake highlight color | ||
final Color uncategorizedMistakeColor; | ||
|
||
/// NonConformance mistake highlight color | ||
final Color nonConformanceMistakeColor; | ||
|
||
/// Style mistake highlight color | ||
final Color styleMistakeColor; | ||
|
||
/// Other mistake highlight color | ||
final Color otherMistakeColor; | ||
|
||
/// background opacity for mistake TextSpan | ||
final double backgroundOpacity; | ||
|
||
/// mistake TextSpan underline thickness | ||
final double mistakeLineThickness; | ||
|
||
///Color scheme constructor | ||
const HighlightStyle({ | ||
this.misspellingMistakeColor = Colors.red, | ||
this.typographicalMistakeColor = Colors.green, | ||
this.grammarMistakeColor = Colors.amber, | ||
this.uncategorizedMistakeColor = Colors.blue, | ||
this.nonConformanceMistakeColor = Colors.greenAccent, | ||
this.styleMistakeColor = Colors.deepPurpleAccent, | ||
this.otherMistakeColor = Colors.white60, | ||
this.backgroundOpacity = _initialBackgroundOpacity, | ||
this.mistakeLineThickness = _initialLineHeight, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters