Skip to content

Instantly share code, notes, and snippets.

@johnpryan
johnpryan / main.dart
Last active November 22, 2019 22:52 — forked from redbrogdon/main.dart
Sliding Square
// 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 'dart:ui' as ui;
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
debugShowCheckedModeBanner: false,
@johnpryan
johnpryan / main.dart
Created November 22, 2019 22:51 — forked from redbrogdon/main.dart
Todo App
// 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(TasksApp());
}
@johnpryan
johnpryan / main.dart
Last active November 19, 2019 18:47
Sliding Square
import 'package:flutter_web/material.dart';
import 'package:flutter_web_test/flutter_web_test.dart';
import 'package:flutter_web_ui/ui.dart' as ui;
Future main() async {
await ui.webOnlyInitializePlatform();
runApp(MaterialApp(
debugShowCheckedModeBanner: false,
home: AnimatedAlignDemo(),
theme: ThemeData.dark(),
@johnpryan
johnpryan / main.dart
Last active November 19, 2019 18:47
Todo App
import 'package:flutter_web/material.dart';
import 'package:flutter_web_test/flutter_web_test.dart';
import 'package:flutter_web_ui/ui.dart' as ui;
Future main() async {
await ui.webOnlyInitializePlatform();
runApp(TasksApp());
}
class Task {
@johnpryan
johnpryan / hint.txt
Last active July 18, 2019 21:28 — forked from redbrogdon/hint.txt
Flutter Codelab - 9 - SizedBox
The important thing here is to add a SizedBox in between the other two widgets, and use `width: 50` to set its width.
@johnpryan
johnpryan / hint.txt
Created May 31, 2019 21:00 — forked from legalcodes/hint.txt
Practice Using async and await
Did you remember to add the async keyword to the getChange function?
Did you remember to use the await keyword before invoking getDollarAmount?
Remember: 'getChange' needs to return a future!
@johnpryan
johnpryan / hello_world.dart
Last active November 19, 2019 18:46
flutter hello world
import 'package:flutter_web/material.dart';
import 'package:flutter_web_test/flutter_web_test.dart';
import 'package:flutter_web_ui/ui.dart' as ui;
Future main() async {
await ui.webOnlyInitializePlatform();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@johnpryan
johnpryan / principles.md
Last active August 28, 2024 16:12
Ray Dalio's Principles

Summary And Table Of Life Principles

Think for yourself to decide 1) what you want, 2) what is true, and 3) what you should do to achieve #1 in light of #2, and do that with humility and open-mindedness so that you consider the best thinking available to you.

Life Principles Introduction

Look to the patterns of those things that affect you in order to understand the cause-effect relationships that drive them and to learn principles for dealing with them effectively.

Part II: Life Principles

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@johnpryan
johnpryan / template.dart
Created January 9, 2018 21:34
IntelliJ templates for PolymerDart
@HtmlImport('${NAME}.html')
library ${NAME};
import 'package:polymer/polymer.dart';
import 'package:web_components/web_components.dart';
@PolymerRegister(${CLASS_NAME}.tag)
class ${CLASS_NAME} extends PolymerElement {
static const String tag = '${TAG_NAME}';