Storing data from the Flutter app → Google Sheets 📊 — Part 1

In this article, we’ll create a sample app which stores Feedback of user from the Flutter app into Google Sheets using AppScript.

Shreyas Patil
Jan 10, 2020 · 6 min read

💡 Introduction:

Hello everyone, This is my first ever article on Flutter. Google Sheets is a very powerful tool 🔥 if we look deep in it. It provides us with an interface using Google AppScript so that we can do various types of operations on Google Spreadsheet. We can perform all types of operations like Reading/Inserting/Updating/Deleting using AppScript on Google Sheets. It’s so much powerful and capable than we can even use Google Sheets as a back-end of our application 📲. Here we’ll develop a sample flutter application, which simply takes user User Feedback, makes HTTP request to Google AppScript and then stores that feedback in Google Sheets. So, let’s start. 😃

⚡️ Setting up Google Sheets:

  • Sign in with your Google Account.
  • Go to your Google Drive and create a new ‘Google Sheets’ document where you want to store your responses and Open that.
  • Setup header columns of sheet and you’ll see like this.
Initialized Google Sheet. (Selected Part of URL is Sheet ID).
Launching AppScript Editor.

⚡️ Setting up Google AppScript:

  • After the above steps, you’ll see AppScript Editor will be launched in the New Tab of your browser. You’ll see Code window like below.
AppScript Editor
Code.gs Implementation
Deploying the Web app
Proceed this…
Review and allow permissions.

⚡️ Setting up Flutter 💙 App:

  • Init a flutter directory using flutter create PROJECT_NAME .
  • In pubspec.yaml, add the following dependency.
dependencies:
flutter:
sdk: flutter
http: ^0.12.0+3
form.dart
Flutter App Response
Google Sheet

Part 2 — Getting data from Google Sheets into Flutter App

Here’s the link for the Part 2 of this article where we’ll see how to get data from Google Sheets into the flutter app.

If you found this project useful, then please consider giving it a ⭐️ on GitHub and sharing it with your friends via social media.

Sharing is Caring!

Thank You! 😃

MindOrks

Our community publishes stories worth reading on Android…