Sitemap
KNNX Corp.

KNNX is a global leader in the development and deployment of innovative enterprise solutions using distributed ledger technology.

Create a Login Screen with Provider Pattern

6 min readMay 18, 2022

--

Press enter or click to view image in full size

When Flutter was launched, the architecture pattern initially followed was called the ‘Bloc’ pattern. This is still widely used in the Flutter community today. In this article, we will look at creating a login screen. However, instead of using the Bloc pattern, we will use the Provider pattern to achieve this, which is also popular in the Flutter community.

Why use the Provider pattern?

The answer lies in its simplicity. It is both easier to understand and implement. We do not need streams and observables in the Provider pattern as is the case with RxDart in the Bloc pattern.

Press enter or click to view image in full size
Simplicity is the Provider pattern’s trump card | Source

Prerequisites

  • To implement the Bloc pattern, we must install the latest bloc package from pub dev, which is version 6.1.1
  • To implement the Provider pattern, the latest version of the provider package from pub dev must be installed, i.e., version 4.3.3

Before beginning, here are all the key topics that will be addressed as we proceed with building our login screen:

  1. Defining widget states
  2. The consumer widget

--

--

KNNX Corp.
KNNX Corp.

Published in KNNX Corp.

KNNX is a global leader in the development and deployment of innovative enterprise solutions using distributed ledger technology.

KNNX Corp.
KNNX Corp.

Written by KNNX Corp.

KNNX is a global leader in Distributed Ledger Technology and Enterprise Products. To learn more, head over to: https://www.knnx.com/

No responses yet