linkwell 0.1.9

  • Readme
  • Changelog
  • Example
  • Installing
  • 73

LinkWell #

LinkWell is Text Plugin that detects URLs and Emails in a String and when tapped opens in user browsers,

linkwell pub package #

GitHub

ScreenShots #

Basic UsageNamed Links

Usage #

Basic:

import 'package:linkwell/linkwell.dart';
LinkWell(
    "Hi here's my email: samuelezedi@gmail.com and website: https://samuelezedi.com"
);

Add Styling #

To add style to links

LinkWell(
    "Hi here's my email: samuelezedi@gmail.com and website: https://samuelezedi.com",
    linkStyle: TextStyle(color: Colors.blue,fontSize: 17)
);

To add style to non links

LinkWell(
    "Hi here's my email: samuelezedi@gmail.com and website: https://samuelezedi.com",
    style: TextStyle(color: Colors.black,fontSize: 17)
);

If you would like to name the links

LinkWell(
    "By registering you agree to our samuelezedi.com/terms and samuelezedi.com/privacy",
    listOfNames: {
        'samuelezedi.com/terms' : 'Terms',
        'samuelezedi.com/privacy' : 'Privacy Policy'
    },
);

Why I made this plugin #

I was building a chat application and I needed to detect when users posted links and emails so I went online and found a couple plugin but then, only one fit the need, I imported it and discovered that it could not detect emails and long urls correctly and I could not name URLs or emails, So I built LinkWell. I hope this is what you are looking for and it solves your link problems.

Kindly follow me on #

twitter medium instagram

[0.1.9] #

  • Corrected a error, text after every last link was not captured, FIXED

[0.1.6] #

  • Commented on all LinkWell propeties and methods
  • Added Readme.md
  • Formatted Code
  • Fixed Bug Issues

[0.1.2] #

  • Commented on all LinkWell propeties and methods
  • Added Readme.md
  • Formatted Code
  • Fixed Bug Issues

[0.1.1+5] #

  • Created more properties in the LinkWell Class
  • Added Example project

[0.1.1+2] #

  • Error in LinkWell Class fixed

[0.1.1+1] #

  • Made a few corrections, not critical, previous version does not show text when no link detected

[0.1.1] #

  • Initial release,

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:linkwell/linkwell.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'LinkWell Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'LinkWell Example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  
  
  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      
      body: Container(
        child:  Center(
          child: Column(
              crossAxisAlignment: CrossAxisAlignment.center,
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[

                  SizedBox(
                    height: 10,
                  ),
                  LinkWell(
                    "Hi here's my email: samuelezedi@gmail.com and website: https://pronoun.com.ng",
                  )
                ],
              ),
        ),


      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  linkwell: ^0.1.9

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:linkwell/linkwell.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
46
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
73
Learn more about scoring.

We analyzed this package on Jul 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform windows

Because of import path [package:linkwell/linkwell.dart, package:url_launcher/url_launcher.dart] that declares support for platforms: android, ios, linux, macos, web

Package not compatible with SDK dart

because of import path [linkwell] that is in a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
url_launcher ^5.4.5 5.5.0
Transitive dependencies
collection 1.14.12 1.14.13
flutter_web_plugins 0.0.0
meta 1.1.8 1.2.1
platform_detect 1.4.0
plugin_platform_interface 1.0.2
pub_semver 1.4.4
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
url_launcher_linux 0.0.1+1
url_launcher_macos 0.0.1+7
url_launcher_platform_interface 1.0.7
url_launcher_web 0.1.2
vector_math 2.0.8
Dev dependencies
flutter_test