Link Flutter and Strapi locally
Strapi locally does not work with Flutter Android but works with Flutter iOS on simulator.
To run strapi locally :
cd backend-strapi;
npm install -g npm
npm install
yarn develop;
You can also setup an online demo of strapi here. Instructions to setup this live demo below.
To run flutter :
cd frontend;
flutter run; # or F5 in vscode
https://medium.com/better-programming/how-to-use-graphql-in-flutter-7decd04a511f
https://github.com/zino-app/graphql-flutter
https://hasura.io/learn/graphql/flutter-graphql/introduction/
https://strapi.io/documentation/v3.x/plugins/graphql.html#query-api
https://www.youtube.com/watch?v=GxmQd8IaghE
VSCode :
- Prisma
- GraphQL
https://www.youtube.com/watch?v=M7PvukaN6PM
https://github.com/itsmaheshkariya/flutter-strapi-crud
I just use Android Studio to update GraphQL, follow guide :
https://medium.com/@v.ditsyak/ultimate-toolchain-to-work-with-graphql-in-flutter-13aef79c6484
https://flutter.dev/docs/development/data-and-backend/json#code-generation
A quick description of your strapi application
To launch the project, use
yarn develop
Then, from your browser, you can access :
https://strapi.io/documentation/v3.x/installation/cli.html
To create the project, I used
yarn create strapi-app my-project --quickstart
- Then, create an admin user on browser that just popup
- In your browser, localhost:1337/admin, go to "Content-Types Builder"
-
- Creta new collection type
- Display name : todo > continue
- Text > name > finish
- Save
- Todos > Add New todo > "Do sport", "Cooking pelmenis" and "Meditation" > save AND publish
- Marketplace > GraphQL > Download
- Settings > Roles > Public
- In Permissions, application > todos, add find and findone. Save
- In Permissions, users-permissions > user, add find and findone. Save