click_text_field 0.0.4 copy "click_text_field: ^0.0.4" to clipboard
click_text_field: ^0.0.4 copied to clipboard

A flutter TextField which is able to click the highlight text part, by setting the regex. Also a string callBack function can be set.

INTRODUCE #

A flutter TextField which is able to click the highlight text part, by setting the regex. Also a string callBack function can be set.

INSTALL #

    dev_dependencies:
        click_text_field: ^last_version

USAGE #

  1. use ClickTextEditingController
    import 'package:click_text_field/click_text_field.dart';
    
    class _MyHomePageState extends State<MyHomePage> {
    
      final ClickTextEditingController textEditingController = ClickTextEditingController();
    
      @override
      void initState() {
        ······
        textEditingController.setRegExp(RegExp(r'people'));
        textEditingController.setOnTapEvent((strCallBack) => {
          debugPrint('U click the highlight text $strCallBack'),
        });
      }
    
      @override
      Widget build(BuildContext context) {
        return 
            ······
            TextField(
              controller: textEditingController,
              maxLines: null,
            ),
            ······
      }
    }

  1. use ClickTextField
    ClickTextField(
        regExp: RegExp(r'people c'),
        onTapText: (clickCallBack) => {
           debugPrint('U click the highlight text $clickCallBack'),
        }
    )
  1. source code: https://github.com/shAdow-XJY/click_text_field

  2. pub: https://pub.dev/packages/click_text_field

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A flutter TextField which is able to click the highlight text part, by setting the regex. Also a string callBack function can be set.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, string_scanner

More

Packages that depend on click_text_field