config.dart 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import 'package:flutter/material.dart';
  2. import 'package:kmpdfkit_demo/widgets/constains.dart';
  3. import 'package:kmpdfkit_demo/widgets/extension/color_extension.dart';
  4. ///default configuration options
  5. Map<String, dynamic> applyNormalConfiguration() => {
  6. 'scrollDirection' : ScrollDirection.vertical,
  7. 'isDoublePage' : false,
  8. 'isContinueMode' : true,
  9. 'isCoverPageMode' : false,
  10. 'isCropPageMode' : false,
  11. 'readBackgroundColor' : Colors.white.toHex(),
  12. 'annotAttribute' : {
  13. 'highlight' : {
  14. 'color' : Colors.red.toHex(),
  15. 'alpha' : 255
  16. },
  17. 'strikeout' : {
  18. 'color' : Colors.green.toHex(),
  19. 'alpha' : 255
  20. },
  21. 'underline' : {
  22. 'color' : Colors.blue.toHex(),
  23. 'alpha' : 255
  24. },
  25. 'squiggly' : {
  26. 'color' : Colors.purple.toHex(),
  27. 'alpha' : 255
  28. },
  29. 'ink' :{
  30. 'color' : Colors.pink.toHex(),
  31. 'alpha' : 255,
  32. 'borderWidth' : 10
  33. },
  34. 'shape' : {
  35. 'borderColor' : Colors.red.toHex(),
  36. 'borderColorAlpha' : 255,
  37. 'fillColor' : Colors.red.toHex(),
  38. 'fillColorAlpha' : 0,
  39. 'borderWidth' : 2
  40. },
  41. 'freetext' : {
  42. 'fontBold' : false,
  43. 'fontItalic' : false,
  44. 'textColor' : Colors.black.toHex(),
  45. 'textColorAlpha' : 255,
  46. 'fontSize' : 40,
  47. 'fontType' : FontType.helvetica.name
  48. }
  49. }
  50. };