All Projects → santa112358 → detectable_text_field

santa112358 / detectable_text_field

Licence: MIT license
TextField and Text widget with detection features. You can detect hashtags, at sign, or anything you want.

Programming Languages

dart
5743 projects
HTML
75241 projects

Projects that are alternatives of or similar to detectable text field

Tweetme 2
Build a twitter-like app in Django, Bootstrap, Javascript, & React.js. Step-by-Step.
Stars: ✭ 247 (+751.72%)
Mutual labels:  twitter
BNTextField-Limit
No description or website provided.
Stars: ✭ 20 (-31.03%)
Mutual labels:  textfield
rich input
Rich input box, implement @Someone and subject with color highlighting
Stars: ✭ 58 (+100%)
Mutual labels:  textfield
Tweetfeels
Real-time sentiment analysis in Python using twitter's streaming api
Stars: ✭ 249 (+758.62%)
Mutual labels:  twitter
iOSUtilitiesSource
IOS Utilities Library for Swift
Stars: ✭ 46 (+58.62%)
Mutual labels:  textfield
AreaPickerView
areapicker in china, easy to use. 中国的地区选择器.简单易用.
Stars: ✭ 32 (+10.34%)
Mutual labels:  textfield
Hackathon Starter Kit
A Node-Typescript/Express Boilerplate with Authentication(Local, Github, Facebook, Twitter, Google, Dropbox, LinkedIn, Discord, Slack), Authorization, and CRUD functionality + PWA Support!
Stars: ✭ 242 (+734.48%)
Mutual labels:  twitter
chirps
Twitter bot powering @arichduvet
Stars: ✭ 35 (+20.69%)
Mutual labels:  twitter
ATGValidator
iOS validation framework with form validation support
Stars: ✭ 51 (+75.86%)
Mutual labels:  textfield
awesome-flutter-ui
10+ flutter(android, ios) UI design examples ⚡ - login, books, profile, food order, movie streaming, walkthrough, widgets
Stars: ✭ 848 (+2824.14%)
Mutual labels:  textfield
Egg Mode
a twitter api crate for rust
Stars: ✭ 249 (+758.62%)
Mutual labels:  twitter
FormToolbar
Simple, movable and powerful toolbar for UITextField and UITextView.
Stars: ✭ 85 (+193.1%)
Mutual labels:  textfield
compose-actors
🤖 Android app built with jetpack 🚀 compose follows new revamped guide to app architecture. Implemented with State, Coroutines ➰, ViewModels, Repository pattern, Light/Dark theme 🌈 MD3, Animations, Draw on canvas, Custom layouts, UI state handling, 🌀 Image loading with coil, Palette 🎨 usage and dynamic theming etc.
Stars: ✭ 80 (+175.86%)
Mutual labels:  textfield
Minimal Twitter
Minimal Theme for the new Twitter UI 🐦
Stars: ✭ 247 (+751.72%)
Mutual labels:  twitter
CHRTextFieldFormatter
Provides UITextField formatting masks. Such as phone number and credit card number formatters.
Stars: ✭ 52 (+79.31%)
Mutual labels:  textfield
Gatsby Remark Embedder
Gatsby Remark plugin to embed well known services by their URL.
Stars: ✭ 245 (+744.83%)
Mutual labels:  twitter
VPAutoComplete
A simple Auto Complete UITextField also support UITableView written in swift 4.2
Stars: ✭ 20 (-31.03%)
Mutual labels:  textfield
detweet
delete tweets en masse
Stars: ✭ 14 (-51.72%)
Mutual labels:  twitter
LMDFloatingLabelTextField
Customisable iOS TextField with floating placeholder
Stars: ✭ 23 (-20.69%)
Mutual labels:  textfield
react-native-element-textinput
A react-native TextInput, TagsInput and AutoComplete component easy to customize for both iOS and Android.
Stars: ✭ 28 (-3.45%)
Mutual labels:  textfield

detectable_text_field

pub package License: MIT

Text widgets with detection features. You can detect hashtags, at sign, url, or anything you want. Helps you develop Twitter like app.

Refinement of hashtagable.

final

Usage

As TextField

    DetectableTextField(
      detectionRegExp: detectionRegExp(),
      detectedStyle: TextStyle(
        fontSize: 20,
        color: Colors.blue,
      ),
      basicStyle: TextStyle(
        fontSize: 20,
      ),
    )
  • detectionRegExp decides the text to detect. detectedStyle is the textStyle for detected text. basicStyle is the textStyle for not detected text.

  • Other arguments are basically same as material TextField.

As ReadOnlyText

If you want to use detection feature in the text only to display, DetectableText will help you.

    DetectableText(
      text: "#HashTag and @AtSign and https://pub.dev/packages/detectable_text_field",
      detectionRegExp: detectionRegExp(),
      detectedStyle: TextStyle(
        fontSize: 20,
        color: Colors.blue,
      ),
      basicStyle: TextStyle(
        fontSize: 20,
      ),
      onTap: (tappedText){
        print(tappedText);
      },
    )

Usage of the arguments like detectionRegExp are same as the ones in DetectableTextField.

The argument onTap(String) is called when user tapped a detected text.

You can add some actions in this callback with the tapped text.

detectionRegExp()

The widgets and methods in this package is expected to be used with RegExp.

The function detectionRegExp() returns sample regExp depending om the boolean arguments: hashtag, atSign, and url.They are all true by default.

If you do NOT want to detect atSign, you need to set the argument like this: detectionRegExp(atSign:false). It is same for other arguments.

If you see the API reference, you will see the function just returns the sample regular expressions below. You can use them directly if you want.

sample regExp hashtag atSign url
hashTagRegExp × ×
atSignRegExp × ×
urlRegExp × ×
hashTagAtSignRegExp ×
hashTagUrlRegExp ×
AtSignUrlRegExp ×
hashTagAtSignUrlRegExp
  • The detection rules are almost same as twitter.
    1. It needs space before # or @.
    2. It stops # and @ detection if there's emoji or symbol.

  • The examples currently support six languages: English, Japanese, Korean, Spanish, Arabic, and Thai.

Customize with useful functions

  • Check if there are detections
   print(isDetected("Hello #World", hashTagRegExp));
   // true

   print(isDetected("Hello World", hashTagRegExp));
   // false
  • Extract detections from text
   final List<String> detections = extractDetections("#Hello World #Flutter Dart #Thank you", hashTagRegExp);
   // ["#Hello", "#Flutter", "#Thank"]

If you have any requests or questions, please feel free to ask on github.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].