This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class PaletteSample extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
MaterialColor primarySwatch = generateMaterialColor(Palette.primary); | |
return Column( | |
crossAxisAlignment: CrossAxisAlignment.stretch, | |
children: <Widget>[ | |
Container( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
MaterialColor generateMaterialColor(Color color) { | |
return MaterialColor(color.value, { | |
50: tintColor(color, 0.5), | |
100: tintColor(color, 0.4), | |
200: tintColor(color, 0.3), | |
300: tintColor(color, 0.2), | |
400: tintColor(color, 0.1), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsernameForm extends StatefulWidget { | |
final Function onSuccess; | |
UsernameForm(this.onSuccess); | |
@override | |
_UsernameFormState createState() => _UsernameFormState(onSuccess); | |
} | |
class _UsernameFormState extends State<UsernameForm> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Prisma } from './../generated/prisma'; | |
import { readFileSync } from 'fs'; | |
// add to yarn: | |
// "seed": "dotenv -e .env -- ts-node ./src/seed/seed.ts" | |
const prisma = new Prisma({ | |
endpoint: process.env.PRISMA_ENDPOINT, // the endpoint of the Prisma DB service (value is set in .env) | |
secret: process.env.PRISMA_SECRET, // taken from database/prisma.yml (value is set in .env) | |
debug: false // log all GraphQL queries & mutations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache |