messenger_launcher 0.0.2 icon indicating copy to clipboard operation
messenger_launcher: ^0.0.2 copied to clipboard

A new flutter plugin project.

messenger_launcher #

A new flutter plugin project for launching messenger.

Installation #

First, add messenger_launcher as a dependency in your pubspec.yaml file.

iOS #

Add the following entry to your Info.plist file, located in

<key>LSApplicationQueriesSchemes</key>
<array>
  <string>fb-messenger</string>
</array>

Example #

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

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

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

class _MyAppState extends State<MyApp> {

  @override
  initState() {
    super.initState();
  }

  void openMessenger() async {
    await MessengerLauncher.launchMessenger("messengerId");
  }

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Plugin example app'),
        ),
        body: new Center(
          child: FlatButton(
            child: Text("Open Messenger"),
            onPressed: () {
              openMessenger();
            },
          )
        ),
      ),
    );
  }
}

4
likes
90
pub points
78%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Homepage

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on messenger_launcher