hashtagable_text 0.0.2 copy "hashtagable_text: ^0.0.2" to clipboard
hashtagable_text: ^0.0.2 copied to clipboard

Text widgets that can detect hashtags with callback when a user tap on the hashtag.

hashtag_text #

Text widgets that can detect hashtags with callback when a user tap on the hashtag.

import 'package:hashtagable_text/hashtag_text.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: Scaffold(
          body: SafeArea(
              child: Padding(
        padding: const EdgeInsets.all(8.0),
        child: HashTagText(
          text: "This is a #text with a some #hashtags for #testing.",
          onHashTagTap: (hastTag) {
            debugPrint(hastTag);
          },
        ),
      ))),
    );
  }
}
0
likes
150
points
23
downloads

Publisher

unverified uploader

Weekly Downloads

Text widgets that can detect hashtags with callback when a user tap on the hashtag.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on hashtagable_text