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…
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…
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.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…
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.
When pushing on a new page that replaces the screen entirely we are likely to use
PageRouteBuilder as our
Route<T> parameter in the navigator push function.
CupertinoPageRoute uses native iOS transitions and
MaterialPageRoute uses routes defined 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.
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.
For this tutorial we are going to use the flutter_sms(2.0.0) package…
If you do not already have a Flutter project set up please refer to our introductory Flutter tutorial for details.
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
There are also platform specific set up that needs to be done.
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…
Software Engineer, Flutter Enthusiast