topic_text 0.1.5 copy "topic_text: ^0.1.5" to clipboard
topic_text: ^0.1.5 copied to clipboard

topic text like webo

topic_text #

topic text like webo ## wrap text ,which can click,自动识别 微博话题/微博@人,链接,可以定制点击

Getting Started #

图片效果

import 'package:topic_text/topic_text.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';

class TopicTest extends StatefulWidget {
  @override
  _TopicTestState createState() => _TopicTestState();
}

class _TopicTestState extends State<TopicTest> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('话题控件测试'),
      ),
      body: ListView(
        children: <Widget>[
          Padding(
            padding: const EdgeInsets.all(8.0),
            child: Center(
                child: TopicText(
              '今年有http://www.tip.com?key=552&pa=122的好片#庆余年#方@范冰冰#2020好片#真心好看',
              onUrlTap: (str) {
                BotToast.showText(text: '$str被点击了');
              },
            )),
          ),
          Padding(
            padding: const EdgeInsets.all(8.0),
            child: Center(
                child: TopicText(
              '今年有http://www.tip.com?key=552&pa=122的好片#庆余年#方@范冰冰#2020好片#真心好看',
              atColor: Colors.pink,
              onAtTap: (str) {
                BotToast.showText(text: '$str被点击了');
              },
            )),
          ),
          Padding(
            padding: const EdgeInsets.all(8.0),
            child: Center(
              child: TopicText(
                '今年有http://www.tip.com?key=552&pa=122的好片#庆余年#方@范冰冰#2020好片#真心好看',
                onTopicTap: (str) {
                  BotToast.showText(text: '$str被点击了');
                },
              ),
            ),
          ),
        ],
      ),
    );
  }
}

1
likes
10
pub points
0%
popularity

Publisher

unverified uploader

topic text like webo

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on topic_text