WhatsHelper: A utility app for sending WhatsApp messages

A flutter application that sends Whatsapp messages directly to the contact number without saving contact in the contact directory.

Harsh Chhabra
4 min readMar 8, 2022

“Hey, 909*****40 is my number please ping on on WhatsApp so that I could send you your bill.”

  • // in mind// “Saving a number and then sending a message just for a bill, uh lots of work.”
  • “Look on your face shows that you don’t know about a new app where you could send WhatsApp to people who aren’t in your contact list.”
  • “OMG, please tell me about it!”

Saving numbers of people with whom you down have connection could be a leak to your privacy, as those people could also see the stories you shared for the people you know. So here is an application that will help you to WhatsApp anyone, without saving their number on your phone, here you could just enter the number you want to send a message on WhatsApp, and our application with directly take you to WhatsApp and open the chat of the person whose number you entered.

Our application is totally safe to use as we don’t save any of the information you enter or the numbers that you provide.

We will be building a single-paged flutter application, it will ask for a phone number that is registered on WhatsApp and below that would be a button that will lead directly to WhatsApp where you could send the message to the person who isn’t in your contact list. It will look as follow:

Entering the mobile number
Option to select the respective country
Searching for the desired Country

Link to the Github Repo here:

Now let’s start the interesting part(coding):

Importing the needed packages:

Add the following dependencies in the pubspec.yaml

dependencies:

url_launcher: 6.0.3

fluttertoast:

intl_phone_number_input:

clipboard: ^0.1.3

As it is a single screen app we completed it in the main file, just to keep it simple and short.

main.dart

import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:intl_phone_number_input/intl_phone_number_input.dart';
import 'package:url_launcher/url_launcher.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blueGrey,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget { @override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> { TextEditingController phnController = TextEditingController();
String initialCountry = "IN";
PhoneNumber number = PhoneNumber(isoCode: 'IN');
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey.shade200,
appBar: AppBar(
title: Text('WhatsHelper'),
),
body: Column(
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
child: Padding(
padding: const EdgeInsets.only(right: 8, bottom: 8, left: 16, top: 8),
child: InternationalPhoneNumberInput(
searchBoxDecoration: InputDecoration(
icon: Icon(Icons.map)
),
spaceBetweenSelectorAndTextField: 0,
onInputChanged: (val){
number = val;
},
selectorConfig: SelectorConfig(
selectorType: PhoneInputSelectorType.DIALOG,
useEmoji: true,
),
initialValue: number,
textFieldController: phnController,
inputBorder: OutlineInputBorder(),
),
),
),
),
ElevatedButton(onPressed: ()=>whatsAppOpen(number), child: Text('Go to WhatsApp'))
],
),
),
],
),
);
}
void whatsAppOpen(PhoneNumber number) async {
await launch("whatsapp://send?phone=${number.phoneNumber}"); }
}

Apk File of this app: https://drive.google.com/file/d/1sfKETS3TZgTN6DttDw7efXN7MoEjIykt/view?usp=sharing

SDK Version used in this app:

SDK version of pubspec.yaml file

Usage of this app:

  • There is no option in the Whatsapp app to directly message a number.
  • So while sending the message, we first have to save that number and then only we are able to message the desired number.
  • But sometimes we have to message a person only once or we don’t want to save that number because it increases the number of contacts saved, in that case our app is the ultimate solution of this problem.
  • In this way we can directly send a message to a number on Whatsapp without saving their contact details.

That’s all, it is a very simple and utmost useful app.
I hope it helps. Happy Fluttering!

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Harsh Chhabra
Harsh Chhabra

Written by Harsh Chhabra

Founder at Codeflow | Google DSC Lead NIT Kurukshetra | Beta Microsoft Learn Student Ambassador | AWS Community Builder | Postman Student Leader

No responses yet

Write a response