Image for post
Image for post

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.
Image for post
Image for post
Initialized Google Sheet. (Selected Part of URL is Sheet ID).
Image for post
Image for post
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.
Image for post
Image for post
AppScript Editor
Code.gs Implementation
Image for post
Image for post
Deploying the Web app
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Proceed this…
Image for post
Image for post
Review and allow permissions.
Image for post
Image for post

⚡️ 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
Image for post
Image for post
Flutter App Response
Image for post
Image for post
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…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store