Skip to content

Instantly share code, notes, and snippets.

View barriehadfield's full-sized avatar

Barrie Hadfield barriehadfield

  • Norwich, UK
View GitHub Profile
enum EngagementType { unknown, newsItem, coachingTip, facilitation, surveyEngagement, videoMessage, textMessage, reflection, }
/// this one extension provides all the central policy logic for all EngagementTypes
extension EngagementManagement on EngagementType {
String get displayName {
switch (this) {
case EngagementType.reflection:
return 'Reflection';
case EngagementType.textMessage:
return 'Text Message';
@barriehadfield
barriehadfield / analysis_options.yaml
Last active August 7, 2020 12:12
Vis.JS interop with Flutter Web (Dart) see https://visjs.org/ for Vis usage
analyzer:
errors:
undefined_prefixed_name: ignore
<div id="root-node"></div>
main() {
CurrentHuman.age = 5;
CurrentHuman.name = "Bob";
CurrentHuman.name = "Sally";
CurrentHuman.name = "Alfie";
print('Hello, ${CurrentHuman.name} age ${CurrentHuman.age}');
CurrentHuman.instance = Human()
..name = "Jack"
..age = 100;
@barriehadfield
barriehadfield / firestore_animated_list.dart
Created January 18, 2020 17:58 — forked from slightfoot/firestore_animated_list.dart
Firestore Animated List implementation.
// Copyright 2017, the Flutter 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:async';
import 'dart:collection';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';