Skip to content

Instantly share code, notes, and snippets.

View cpboyd's full-sized avatar
🏳️‍🌈

Christopher Boyd cpboyd

🏳️‍🌈
View GitHub Profile
@cpboyd
cpboyd / builder.dart
Created April 21, 2021 04:17
Dart/Flutter directory list build_runner
/// Configuration for using `package:build`-compatible build systems.
///
/// See:
/// * [build_runner](https://pub.dev/packages/build_runner)
///
/// This library is **not** intended to be imported by typical end-users unless
/// you are creating a custom compilation pipeline. See documentation for
/// details, and `build.yaml` for how these builders are configured by default.
import 'package:build/build.dart';
@cpboyd
cpboyd / simple_cupertino_modal_route.dart
Created October 6, 2020 15:39
Cupertino Bottom Sheet Route for Router/Navigation 2.0
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
const double _behind_widget_visible_height = 10;
const Radius _default_top_radius = Radius.circular(12);
/// Cupertino Bottom Sheet Container
///
/// Clip the child widget to rectangle with top rounded corners and adds
@cpboyd
cpboyd / material_with_modal_page.dart
Created October 6, 2020 04:36
modal_bottom_sheet Router 2.0 support
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
/// A page that creates a material style [PageRoute].
///
/// {@macro flutter.material.materialRouteTransitionMixin}
///
/// By default, when the created route is replaced by another, the previous
/// route remains in memory. To free all the resources when this is not
@cpboyd
cpboyd / Ncontracts Code Challenge.cs
Last active September 3, 2020 03:02 — forked from chainavawongse/Ncontracts Code Challenge.cs
Ncontracts - Code Challenge
// Ncontracts Code Challenge
// Please take a look at the code below and refactor it to your liking.
// Please spend no more than 40 minutes on this exercise.
// If you finish early, try adding another calculation for "Office Supply" category.
// Once done, please send me a link to your gists.
using System;
using System.Collections.Generic;
namespace CodingChallenge.Shopping