TextViewer class

Constructors

TextViewer.asset(String assetPath, {TextStyle textStyle = const TextStyle(), TextStyle? highLightTextStyle, TextStyle? focusTextStyle, Color highLightColor = Colors.yellow, Color focusColor = Colors.amber, bool ignoreCase = true, OnErrorCallback? onErrorCallback})
factory
TextViewer.file(String filePath, {TextStyle textStyle = const TextStyle(), TextStyle? highLightTextStyle, TextStyle? focusTextStyle, Color highLightColor = Colors.yellow, Color focusColor = Colors.amber, bool ignoreCase = true, OnErrorCallback? onErrorCallback})
factory
TextViewer.textValue(String textContent, {TextStyle textStyle = const TextStyle(), TextStyle? highLightTextStyle, TextStyle? focusTextStyle, Color highLightColor = Colors.yellow, Color focusColor = Colors.amber, bool ignoreCase = true, OnErrorCallback? onErrorCallback})
factory

Properties

assetPath String?
Provide the path of the file that need to load In this case you need to pass .txt file Provide asset path
final
filePath String?
Provide file path of i/o device Note: filePath doesn't support in flutter web since dart io is not support directly in web.For more read https://api.flutter.dev/flutter/dart-io/dart-io-library.html https://stackoverflow.com/questions/57182634/to-read-and-write-file-in-flutter-web
final
focusColor Color
Provide color of focus character / word
final
focusTextStyle TextStyle
Provide Focus TextStyle when you navigate from one search to another search text Default colors is Colors.yellow
final
hashCode int
The hash code for this object.
no setterinherited
highLightColor Color
Provide just the color of found character / word
final
highLightTextStyle TextStyle
Provide the style of character/word after search is found Default colors is Colors.blue
final
ignoreCase bool
Search text case is sensitive or not
final
onErrorCallback OnErrorCallback?
Search on error Callback
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textContent String?
Provide string content
final
textStyle TextStyle
Style the text value of the file
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited