linksaplicativos 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 58

linksaplicativos #

linksaplicativos é um plugin que permite você usar serviços de email,whastsapp,apple maps, google maps, chamadas telefônicas e site no navegador.

Instalação #

Para instalar basta abrir o arquivo pubspec.yaml e adicionar a seguinte dependência.

dependencies:
  linksaplicativos: ^1.0.0

Como Usar #

Configurações Obrigatórias iOS #

add em infos.plist

<key>LSApplicationQueriesSchemes</key>
        <array>
            <string>whatsapp</string>
            <string>comgooglemaps</string>
        </array>

Pagina Web #

obs: pode ser passado protocolo http no lugar de https

Linksaplicativos.paginaWeb("https://www.sitedesejado.com.br");

Telefone #

obs: não pode conter máscaras.

Linksaplicativos.telefone("número");

Whatsapp #

obs: não pode conter máscaras e caso não queira enviar mensagem passa um valor vazio ex: "".

Linksaplicativos.whatsapp("número", "mensagem desejada");

Mapa #

obs: A ação é somente para o Android, pode ser definida como "iniciar" ou vazio "".

Linksaplicativos.mapa("latitude", "longitude", "nome do local", "Ação");

E-mail #

obs: Se não querer enviar nenhuma mensagem e título basta passar o valor "" vazio.

Linksaplicativos.email("email", "titulo", "mensagem");

Projeto Exemplo #

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


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


class Aplicativo extends StatelessWidget
{
  @override
  Widget build(BuildContext context)
  {
    // TODO: implement build
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Home(),
    );
  }
}

class Home extends StatefulWidget
{
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home>
{
  @override
  Widget build(BuildContext context)
  {
    return Scaffold(
      appBar: AppBar(
        title: Text("Exemplo"),
      ),
      body: Center(
          child: Container(
            child: Column(
              children: <Widget>[
                RaisedButton(
                  child: Text("Pagina Web", style: TextStyle(color: Colors.white)),
                  color: Colors.blue,
                  onPressed: ()
                  {
                    Linksaplicativos.paginaWeb("https://www.sitedesejado.com.br");
                  },
                ),
                RaisedButton(
                  child: Text("Telefone", style: TextStyle(color: Colors.white)),
                  color: Colors.blue,
                  onPressed: ()
                  {
                    Linksaplicativos.telefone("1223334455");
                  },
                ),
                RaisedButton(
                  child: Text("Whatsapp", style: TextStyle(color: Colors.white)),
                  color: Colors.blue,
                  onPressed: ()
                  {
                    Linksaplicativos.whatasapp("00122334455", "Olá Mundo");
                  },
                ),
                RaisedButton(
                  child: Text("mapa", style: TextStyle(color: Colors.white)),
                  color: Colors.blue,
                  onPressed: ()
                  {
                    Linksaplicativos.mapa("-8.413441", "-55.600508", "Local Name", "iniciar");
                  },
                ),
                RaisedButton(
                  child: Text("email", style: TextStyle(color: Colors.white)),
                  color: Colors.blue,
                  onPressed: ()
                  {
                    Linksaplicativos.email("email@gmail.com", "teste", "Olá Mundo");
                  },
                ),
              ],
            ),
          )
      ),
    );
  }
}

Contribuições #

Sugestões e ideias são bem vindas para futuras versões.

licença #

MIT

0.1.0 #

  • TODO: Describe initial release.

0.1.1 #

modification in the README.md file.

0.1.2 #

Correções.

1.0.0 #

vesão 1.0.0

example/lib/main.dart

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


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


class Aplicativo extends StatelessWidget
{
  @override
  Widget build(BuildContext context)
  {
    // TODO: implement build
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Home(),
    );
  }
}

class Home extends StatefulWidget
{
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home>
{
  @override
  Widget build(BuildContext context)
  {
    return Scaffold(
      appBar: AppBar(
        title: Text("Exemplo"),
      ),
      body: Center(
          child: Container(
            child: Column(
              children: <Widget>[
                RaisedButton(
                  child: Text("Pagina Web", style: TextStyle(color: Colors.white)),
                  color: Colors.blue,
                  onPressed: ()
                  {
                    Linksaplicativos.paginaWeb("https://www.sitedesejado.com.br");
                  },
                ),
                RaisedButton(
                  child: Text("Telefone", style: TextStyle(color: Colors.white)),
                  color: Colors.blue,
                  onPressed: ()
                  {
                    Linksaplicativos.telefone("1223334455");
                  },
                ),
                RaisedButton(
                  child: Text("Whatsapp", style: TextStyle(color: Colors.white)),
                  color: Colors.blue,
                  onPressed: ()
                  {
                    Linksaplicativos.whatasapp("00122334455", "Olá Mundo");
                  },
                ),
                RaisedButton(
                  child: Text("mapa", style: TextStyle(color: Colors.white)),
                  color: Colors.blue,
                  onPressed: ()
                  {
                    Linksaplicativos.mapa("-8.413441", "-55.600508", "Local Name", "iniciar");
                  },
                ),
                RaisedButton(
                  child: Text("email", style: TextStyle(color: Colors.white)),
                  color: Colors.blue,
                  onPressed: ()
                  {
                    Linksaplicativos.email("email@gmail.com", "teste", "Olá Mundo");
                  },
                ),
              ],
            ),
          )
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  linksaplicativos: ^1.0.0

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:linksaplicativos/linksaplicativos.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
17
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
58
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because:

  • package:linksaplicativos/linksaplicativos.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:linksaplicativos/linksaplicativos.dart that declares support for platforms: android, ios

Package does not support Flutter platform web

Because:

  • package:linksaplicativos/linksaplicativos.dart that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because:

  • package:linksaplicativos/linksaplicativos.dart that declares support for platforms: android, ios

Package not compatible with SDK dart

Because:

  • linksaplicativos that is a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

8 out of 8 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/linksaplicativos.dart.

Run flutter format to format lib/linksaplicativos.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test