Skip to main content

Posts

Showing posts with the label Android Studio

Getting started with state management in Flutter (Part 2)

Getting started with state management in Flutter (Part 2) Introduction to the Provider package In part 1 of the introduction to state management, we introduced Flutter’s most basic constructs for state management. Using setState() and InheritedWidget 's gave us the ability to control how our application re-draws itself based on state changes in real time. In part 2, we will introduce the Provider package, adding another tool in our toolbox for managing state. Provider gives us "syntactic sugar" on top of the InheritedWidget and gives us an easy to use API that help us to remove the amount of boiler plate code that we have to write which is always a win. Referencing the Provider package in your Flutter application When building Flutter apps we make use of the Dart package management system pub.dev . Pub is very similar to other package managers from other languages. In order to install the Provider package into our project we will need to run the following command...

Getting started with state management in Flutter (Part 1)

Getting started with state management in Flutter (Part 1) Introduction Flutter is great for making beautiful cross-platform UIs with its everything is a widget concepts. But how do you actually move data around your application. State management is a huge part of any good application. State management is critical to providing a pleasurable user experience. We are going to dive into some of the basic state management concepts. Shift your design thinking to be declarative A huge paradigm shift when working in Flutter is thinking declaratively. The way most of our brains work make it easy to understand imperative programming concepts. When our code is organized as sequential steps we can follow the code for one branch of code to the next. When programming declaratively we describe what needs to be done and our system responds based on the action we describe. What does this mean for Flutter?  In Flutter we describe what should be done in our app and Flutter responds by drawing our...

Setting up your development environment for Flutter and Dart with VSCode

I have been working with Flutter for a few years now and have thoroughly enjoyed working with it to build complex UIs effortlessly in mobile and web. Flutter uses Dart as its programming language. Dart is a language that seems to take the best aspects of many programming languages and brings them all together to form an easy-to-use language. Dart is easy and familiar to adopt regardless of your development background or is easy to learn if you are starting out developing for the first time. More to come on Dart in future posts. The Flutter and Dart documentation provided by Google is vast, But with so much documentation out there is it can be hard to know where to start. This is why I am writing this "_getting started_" guide to try to help new developers get started with Flutter. When I am trying to help new brand new developers learn how to work with Flutter and Dart, the constant struggle is getting the development environment setup. My goal with this post is to get y...