Skip to content

Instantly share code, notes, and snippets.

View nosmirck's full-sized avatar
🎯
Focusing

Luis Pulido nosmirck

🎯
Focusing
View GitHub Profile
@nosmirck
nosmirck / main.dart
Created January 9, 2022 00:06
Flutter - Lightning simulation on 9 spheres
// Lightning simulation using just box decoration
// Looks like 9 spheres being illuminated by a light source
// following the mouse cursor, just for fun.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@nosmirck
nosmirck / main.dart
Last active November 30, 2023 08:27
Retro Race
// A "pure widgets" implementation for the classic Retro Race Games
// Pseudo-3D tracks with curves and background scrolling.
import 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@nosmirck
nosmirck / main.dart
Last active November 30, 2023 08:27
Widgetstein
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@nosmirck
nosmirck / main.dart
Created May 27, 2020 17:50
StopMotionWidget
import 'package:flutter/material.dart';
import 'dart:core';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@nosmirck
nosmirck / main.dart
Last active July 29, 2022 09:25
Async where and examples for List<T>
void main(List<String> arguments) async {
var list = List.generate(10, (i) => i)..addAll(List.generate(10, (i) => i));
//Normal Where
print(list.where(foo).toList());
//Async Where
print((await list.whereAsync(fooAsync)).toList());
//Normal UniqueWhere
print(list.uniqueWhere(foo).toList());
//Async UniqueWhere
print((await list.uniqueWhereAsync(fooAsync)).toList());
@nosmirck
nosmirck / main.dart
Created March 8, 2020 02:41
Auto-generated Widgets
// 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

A Guide to Code Reviews

Code reviews are an integral part of our development process as they serve to ensure two key goals: the learning and growth of team members and the delivery of healthy code. While we use various tooling to help us programmatically catch errors and formatting preferences, they are by no means a replacement for extra pairs of eyes.

The code review process should be collaborative and inclusive for the author and reviewers as well as any other teams members wishing to understand the scope of the changes that were made. Most importantly, code reviews are not about being right or wrong but should focus on knowledge transfer and ensuring that requirements are met.

Authors

As on author, the most important rule is to be respectful of the reviewers' time. The easier it is for someone else to read your PR, the quicker and more likely that PR is to be reviewed. While not all PRs are equal, where possible, consider the following to improve the changes you submit:

1. Keep it small

So, t

@nosmirck
nosmirck / main.dart
Last active November 30, 2023 08:27
Flutter Minimal Game Loop using Widgets
//Modified Example from https://www.reddit.com/r/dartlang/comments/69luui/minimal_flutter_game_loop/
import 'dart:math' as math;
import 'dart:ui';
import 'package:flutter/material.dart';
main() {
runApp(MyApp());
}