Wednesday, May 18th, 2022

Creating a Mobile App with Flutter and Laravel

I’ve been developing a mobile app at work over the past few months using Flutter and absolutely love it. It is a UI framework developed by Google that compiles to native code for iOS and Android. It makes the developing mobile layout feel like Lego snapped together.

To learn Flutter (which uses the programming language Dart), I built a normal “to do” app, just like I did when learning Laravel and React. The mobile app actually uses the same REST API (hosted at as the project, which is a really cool advantage of having a decoupled UI.

Here’s a brief overview video that shows how it works:

You can find the source code on GitHub. There are several example Flutter projects that use Firebase for authentication (which is great), but if you’re building something on top of Laravel or WordPress, it might be more helpful to have a look at this project as it’s a REST API uses it.

App includes:

  • log in
  • Registration
  • password reset
  • add to
  • toggle to
  • View to work (includes fetching from the paged API)
  • log out

For state management across multiple widgets (views) I use `provider` package. For storing user information and tokens, I use `shared_preferences` library.

If you’re just starting out and want to learn more about Flutter, I recommend watching the Flutter in Focus series.

Source link