flexible_text_editing_controller

Last updated:

0 purchases

flexible_text_editing_controller Image
flexible_text_editing_controller Images
Add to Cart

Description:

flexible text editing controller

flexible_text_editing_controller_flutter #
An extended text editing controller that supports different inline styles for custom regex.
a text editing controller that can display suggestion text after input, and style input and suggestion ( can be configured to look to a like a code editor )

demo: https://github.com/monki1/flutter_flexible_text_editing_controller_demo
Getting Started #
1.Depend on it #
$ flutter pub add flexible_text_editing_controller

copied to clipboard
or add to yaml file manually
flexible_text_editing_controller:
git:
url: https://github.com/monki1/flexible_text_editing_controller_flutter
ref: 71a61c1
copied to clipboard
2. Install it #
flutter pub get
copied to clipboard
3. Import it #
import'flexible_text_editing_controller/flexible_text_editing_controller.dart';
copied to clipboard
Usage #
TextSpan styler(String text, TextStyle? defaultStyle) {
List<TextSpan> children = [];
for (int i = 0; i < text.length; i++) {
i % 2 == 0
? children.add(TextSpan(
text: text.substring(i, i + 1),
///red for even,
style: TextStyle(color: Colors.red)))
: children.add(TextSpan(
text: text.substring(i, i + 1),
///blue for odd
style: TextStyle(color: Colors.blue)));
}
return TextSpan(style: defaultStyle, children: children);
}
///see demo for functional example
copied to clipboard
Versioning #

V1.0.0+2 - added demo.

Authors #
monki1 - Github
License #
This project is licensed under the MIT License - see the LICENSE file for details
flexible_text_editing_controller_flutter #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.