Image for post
Image for post

Most mobile applications require a connection to the Internet through either a WiFi or cellular data network. You may want your application to react differently based on the type of network connection. For example, you can choose to disable images being downloaded when the user is using a cellular data network.

This tutorial will go over how you can check if the mobile device is connected to a network using the connectivity package. If the device is not connected to a WiFi network we are going to display an error page, which directs the user to connect to WiFi before…


Image for post
Image for post
Credit: Photo by Tobi Fischer on Unsplash

There are many different methods to manage state in Flutter. The recommended approach according to the Flutter documentation is to use Provider. This article addresses the basics of using Provider in your flutter application. If you are coming from a different mobile development background you may find it easier to get started with a state management solution you are more familiar with (Redux, BLoC, etc.).

Why do we need state management? Why is this such an important topic to address?

As your application scales, you will be faced with the need to share state amongst widgets or even pages. Sure…


Image for post
Image for post

Loading data only when needed is an important feature for any kind of software. Implementing this in your application will reduce the initial load time, conserve bandwidth, and use less system resources. This tutorial goes over how we can achieve this when displaying data from an API in a ListView.

When it comes to ListViews there are two popular choices, ListView.builder and ListView.separated. For those not familiar with the difference between the two, ListView.separated is an extension of ListView.builder which allows for a separator to be built between the item build widgets.

This allows us to dynamically create widgets within…


Image for post
Image for post

A major component of any applications user experience lies in how pages are transitioned. This quick tutorial goes over how to easily apply page transitions to your entire application.

Brief Overview of Routing

When pushing on a new page that replaces the screen entirely we are likely to use CupertinoPageRoute, MaterialPageRoute, or PageRouteBuilder as our Route<T> parameter in the navigator push function.

By default CupertinoPageRoute uses native iOS transitions and MaterialPageRoute uses routes defined in PageTransitionsTheme in ThemeData. When the PageTransitionsTheme is not set, the MaterialPageRoute uses a page sliding up and fading for Android, and page sliding from the right for iOS.


Image for post
Image for post

This tutorial is an expansion of How To Access Contacts On Your Flutter App. If you do not already have access to your phones contacts in a flutter app, please refer the tutorial mentioned above first.

However you can modify the code mentioned below to manually input a number instead of using your devices contacts.

Use Cases

  • Call users from your app
  • Send SMS messages
  • Send bulk SMS messages
  • Send your contacts a direct link to download your app
  • Share a direct link to a page on your app via SMS

Getting Started

For this tutorial we are going to use the flutter_sms(2.0.0) package…


Image for post
Image for post

If you do not already have a Flutter project set up please refer to our introductory Flutter tutorial for details.

Getting Started

For this tutorial we are going to use the contact_service(0.3.10) package to import our contacts and permission_handler(5.0.0) to attain the permissions required to access your contacts. Add these dependencies to your pubspec.yaml file.

dependencies:
permission_handler: ^5.0.0
contacts_service: ^0.3.10

There are also platform specific set up that needs to be done.

Android Set Up

Please ensure that your Android project is upgraded to support AndroidX. As of permission handler version 3.1.0 and above you need to ensure your Android project is upgraded. To do…

Arvinth

Software Engineer, Flutter Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store