DartCodeViewer constructor

const DartCodeViewer(
  1. String data, {
  2. Key? key,
  3. TextStyle? baseStyle,
  4. TextStyle? classStyle,
  5. TextStyle? commentStyle,
  6. TextStyle? constantStyle,
  7. TextStyle? keywordStyle,
  8. TextStyle? numberStyle,
  9. TextStyle? punctuationStyle,
  10. TextStyle? stringStyle,
  11. Color? backgroundColor,
  12. Text? copyButtonText,
  13. bool? showCopyButton,
  14. double? height,
  15. 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);