hashtagable 0.0.8 copy "hashtagable: ^0.0.8" to clipboard
hashtagable: ^0.0.8 copied to clipboard

outdated

Widget and function to implement hashtag-decorated EditableText and RichText. Decorate the words which start with `#`

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:hashtagable/hashtagable.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: <Widget>[
          RichText(
            text: getHashTagTextSpan(
              TextStyle(fontSize: 14, color: Colors.red),
              TextStyle(fontSize: 14, color: Colors.black),
              "#Hello world. Hello #world",
              (text) {
                print(text);
              },
            ),
          ),
          HashTagEditableText(
            decoratedStyle: TextStyle(fontSize: 14, color: Colors.black),
            basicStyle: TextStyle(fontSize: 14, color: Colors.blue),
            cursorColor: Theme.of(context).cursorColor,
            controller: TextEditingController(),
          ),
          HashTagEditableTextWithHintText(
            hintText: "THIS IS HINT TEXT",
            hintTextStyle:
                TextStyle(fontSize: 14, color: Theme.of(context).hintColor),
            basicStyle: TextStyle(fontSize: 14, color: Colors.black),
            decoratedStyle: TextStyle(fontSize: 14, color: Colors.blue),
            cursorColor: Theme.of(context).cursorColor,
          ),
        ],
      ),
    );
  }
}
134
likes
0
pub points
87%
popularity

Publisher

verified publisherbookm.me

Widget and function to implement hashtag-decorated EditableText and RichText. Decorate the words which start with `#`

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, provider

More

Packages that depend on hashtagable