DartCodeViewer constructor
const
DartCodeViewer(
- String data, {
- Key? key,
- TextStyle? baseStyle,
- TextStyle? classStyle,
- TextStyle? commentStyle,
- TextStyle? constantStyle,
- TextStyle? keywordStyle,
- TextStyle? numberStyle,
- TextStyle? punctuationStyle,
- TextStyle? stringStyle,
- Color? backgroundColor,
- Text? copyButtonText,
- bool? showCopyButton,
- double? height,
- double? width,
DartCodeViewer requires a String that will be the code shown within the code viewer. This should be dart code and it is preferable if you use a raw string by adding an r before the string.
Implementation
const DartCodeViewer(
this.data, {
Key? key,
this.baseStyle,
this.classStyle,
this.commentStyle,
this.constantStyle,
this.keywordStyle,
this.numberStyle,
this.punctuationStyle,
this.stringStyle,
this.backgroundColor,
this.copyButtonText,
this.showCopyButton,
this.height,
this.width,
}) : super(key: key);