Flutter provider is always a nice solution for state management with Flutter. Provider is great for API request management, and also useful for plenty of other state management scenarios as well.

If we need to access the same data from two or more screens, I always recommend you to create a separate provider class to hold the data and functionalities you want. It will lead you to a maintainable, clean code.

For the package installation you can refer to my article below.

https://medium.com/@kmerandi25/handling-api-requests-with-flutter-provider-944e3258c5ca?sk=8f905497bc895ee8b2b2fe109d048528

If you know how to install the package, we can move to our simple demo. Here is…


When creating amazing UI screens with flutter, Container Widget plays a major role. I really like to add the Container widget in many places as it really helps me to create the desired UI easily and quickly.

I hope this article will be really helpful for the beginners.

Let’s see what we can do with Containers to make our UI more attractive.

To create a simple square or a rectangle we can create a Container for a given width and a height (you can see that this example has also avoid the use of an additional child widget).

The…


Photo by Markus Winkler on Unsplash

Sometimes we have to send emails through our mobile applications. If the application backend doesn’t support for email sending, we need to support sending emails directly through the device. flutter_email_sender is a good plugin which allows send emails from flutter using native platform functionality.

In android it opens default mail app via intent. In iOS MFMailComposeViewController is used to compose an email. Let’s create a small email sending screen for your app. If you need to add image attachments add image_picker package as well.

Installation

dependencies:   
flutter_email_sender: latest_version
image_picker: latest_version

Get packages with your editor or terminal

flutter pub get


Photo by Jess Bailey on Unsplash

State management is very important when we work with flutter. Flutter provider is much better way to handle state in Flutter. The provider package is easy to understand and it doesn’t use much code. It also uses concepts that are applicable in every other approach.

We don’t have to keep so many files to use provider and the implementation is really easy and simple.

Let’s get started. I will explain the api handling with a get request.

Let’s install the package. Always install the latest version of the package. Add the package in to your pubspec.yaml file.

dependencies:   
provider: ^4.3.2+2


Photo by Andrew Neel on Unsplash

Since app localization is very common with mobile app development I thought to write about one of my favorite flutter plugins. App internationalization is really fast and easy with easy_localization plugin. Specially with the latest update. I will guide you to create a simple app page with change language functionality.

To get started add the plugin dependency to your pubspec.yaml file and run packages get command.

dependencies:   
easy_localization: ^2.3.3

I used the above version. Always make sure you got the latest version of the plugin. Import the plugin to your dart file.

import 'package:easy_localization/easy_localization.dart';

In the main method add the…


When your are building a mobile app you may be need to create a detail view that doesn’t fit your device size. In such cases you can use a pdf to view your details. Let’s see how to generate a pdf view with your data in flutter.

We can use packages that created by the flutter community to make things easier.

To Get started install following packages in latest versions. These are the versions that I used.

pdf: ^1.3.24
flutter_full_pdf_viewer: ^1.0.6
path_provider: ^1.5.1

Using flutter_full_pdf_viewer create a PdfViewerPage for a given path as follows.

Next you can create your…


Sometimes Handling form validation in react can be really annoying and time consuming. But formik is a small library that helps you with the 3 most annoying parts:

  • Getting values in and out of form state
  • Validation and error messages
  • Handling form submission

This article will help you to manage your form validation in a simple way. This is just a example form created with Material UI to give you a clear idea on validating your material text fields.

Installation

You can simply install formik and yup libraries with npm or yarn. yup will make validation more easier with formik.

npm…


Flutter

Flutter is Google’s mobile app Software development kit for creating high quality native interfaces on iOS and android in record time. Flutter works with existing code which used by developers and organizations around the world. Flutter is free and open source. Flutter’s hot reload and modern reactive framework helps you to develop your app much faster and compose app UIs easily. Flutter lets you to reuse existing Java, Swift, ObjC code and access native features and SDKs on iOS and android.

Flutter has the tools and libraries to help you easily bring your ideas to life on iOS and Android…

Maneesha Erandi

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