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

outdated

A new Flutter package. custom text to detect '#'_'@'_'links' support may languages

example/main.dart

import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:hash_at_links_detector/hash_at_links_detector.dart';

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

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Padding(
          padding: EdgeInsets.symmetric(horizontal: 16),
          child: Center(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.center,
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                CustomSmartText(
                  text:
                      "@flutter test @hatem ragap #flutter #Dart \n https://pub.dev \n hi hello \n h hello \n s #فلاتر\n @حاتم",
                  atStyle: TextStyle(color: Colors.red),
                  disableAt: false,
                  onTagClick: (tag) {
                    if (tag == "Dart") {
                      print("Dart is  $tag");
                    } else {
                      print("tag is  $tag");
                    }
                  },
                  onUrlClicked: (open) {
                    // launch  url
                    print("opened $open");
                  },
                  onAtClick: (at) {
                    print("at is  $at");
                  },
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
21
likes
90
points
30
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter package. custom text to detect '#'_'@'_'links' support may languages

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on hash_at_links_detector