2022-09-30
2981
#flutter#python
Damilare Jolayemi
134942
Sep 30, 2022 â‹… 10 min read

Integrating Flask and Flutter apps

Damilare Jolayemi Damilare is an enthusiastic problem-solver who enjoys building whatever works on the computer. He has a knack for slapping his keyboards till something works. When he's not talking to his laptop, you'll find him hopping on road trips and sharing moments with his friends, or watching shows on Netflix.

Recent posts:

what are the event loop and call stack in JavaScript

What are the event loop and call stack in JavaScript?

Learn how the call stack, event loop, and various queues help JavaScript handle asynchronous operations while maintaining its single-threaded nature.

Ikeh Akinyemi
Feb 18, 2025 â‹… 6 min read
how and when to use JavaScript arrow functions

How and when to use JavaScript arrow functions

Arrow functions have a simpler syntax than standard functions, and there are some important differences in how they behave.

Joe Attardi
Feb 17, 2025 â‹… 5 min read
javascript is null or empty function

How to check for null, undefined, or empty values in JavaScript

In most languages, we only have to cater to null. But in JavaScript, we have to cater to both null and undefined. How do we do that?

Lewis Cianci
Feb 14, 2025 â‹… 4 min read
MERN Stack: Overview With Examples

What is the MERN stack? Overview with examples

Discover how the MERN stack (MongoDB, Express.js, React, Node.js) enables developers to build dynamic, performant, modern websites and apps.

Nefe Emadamerho-Atori
Feb 13, 2025 â‹… 20 min read
View all posts

One Reply to "Integrating Flask and Flutter apps"

  1. Hey!
    I really appreciated this example!
    Thank you so much, I was able to reproduce it and learned a lot along the way 🙂
    I would like to leave some typos I found just in case somebody else might want to try it too, if I may.

    @lib/widgets/tasks.dart:
    49 FutureBuilder(
    50 future: Provider.of(context, listen: false).getTodos,
    51 builder: (ctx, snapshot) => snapshot.connection state == ConnectionState.waiting

    In line 51, instead of snapshot.connection state, it is snapshot.connectionState == …

    51 builder: (ctx, snapshot) => snapshot.connectionState == ConnectionState.waiting

    @lib/providers/todo_provider.dart:
    23 final todo = TodoItem(
    24 id: responsePayload[“id”],
    25 itemName: responsePayload[“name”],
    26 isExecuted: responsePayload[“is_executed”],
    27 );
    29 getTodos;
    30 }
    31

    In line 26, I added isExecuted: responsePayload[“is_executed”] as it was required and also called getTodos in order to update the list after a new Entry has been created.

    The files in flutter are located in
    lib/models/todo_item.dart, lib/providers/todo_provider.dart and lib/widgets/tasks.dart.

    It took me some time to figure this out, that is why I thought about sharing it.

    Thank you again for the nice example 🙂

Leave a Reply