Skip to content

Instantly share code, notes, and snippets.

View flutter-painter's full-sized avatar

Flutter Painter flutter-painter

View GitHub Profile
@flutter-painter
flutter-painter / sandbox_bag_color.dart
Last active March 1, 2022 11:28
sandbox bag color
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@flutter-painter
flutter-painter / stitch webhook example to import data from spreadsheet
Created January 29, 2020 14:03
stitch webhook example to import data from spreadsheet
exports = async function(payload) {
const mongodb = context.services.get("mongodb-atlas");
//const {flavor} = payload.query;
const flavor = 'test';
const myDB = mongodb.db(`YOURDB`);//TODO: replace
const myCollection = myDB.collection(`myCollection`); //TODO: replace
const body = payload.body.text();
const reqBody = JSON.parse(body);
console.log("Request body:", reqBody);
console.log(body);
@flutter-painter
flutter-painter / spreadsheet_2_Stitch.txt
Last active January 29, 2020 14:02
spreadsheet to Stitch mongoDB
// Create an object which contains keys for each column in the spreadsheet
var columns = { // 0 indexed
id :0,
property1 : 1,
property2 : 2,
}
/****
* This function runs automatically and adds a menu item to Google Sheets