FLUTTER ECOSYSTEM

rohit1814/flutter_open_whatsapp

一个 Flutter 插件,用于打开 WhatsApp 并向单个号码发送消息。

flutter_open_whatsapp 项目封面
Stars
21
Forks
23
最近推送(UTC)
2021年11月9日
项目状态
未归档
Rohit Kesarwani GitHub avatar
GITHUB User

Rohit Kesarwani ↗

Indraprastha Institute of Information Technology
语言DartJavaSwiftRubyObjective-C

此仓库发布的插件

使用的依赖

依赖清单 2 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

Flutter Open WhatsApp

  A Flutter plugin to open WhatsApp and send message to single number in Android and iOS without saving user's number.

Installation

  To use the plugin, add 'flutter_open_whatsapp' as a dependency in your pubspec.yaml file.

Plugin package link

plug-in package

Usage

import 'package:flutter_open_whatsapp/flutter_open_whatsapp.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(
       appBar: AppBar(
         title: const Text('Plugin example app'),
       ),
       body: Center(
         child: MaterialButton(onPressed: (){
           FlutterOpenWhatsapp.sendSingleMessage("918179015345", "Hello");
         },
           child: Text('Running on: $_platformVersion\n'),
         )
       ),
     ),
   );
 }

}

Example

Refer to the example directory of flutter app.