Skip to content

Instantly share code, notes, and snippets.

Matt Sullivan mjohnsullivan

Block or report user

Report or block mjohnsullivan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rubber_range_picker.dart
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/scheduler.dart';
void main() => runApp(ExampleApp());
class ExampleApp extends StatelessWidget {
@override
@mjohnsullivan
mjohnsullivan / smiley.dart
Created Feb 5, 2019
A custom painter that draws a smiley face in Flutter
View smiley.dart
// Copyright 2019 The Chromium Authors. 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';
import 'dart:math' as Math;
void main() => runApp(MyApp());
@mjohnsullivan
mjohnsullivan / book_list.dart
Last active Jun 27, 2019
A simple book list Flutter example using the Google Books API
View book_list.dart
/*
Copyright 2018 The Chromium Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
@mjohnsullivan
mjohnsullivan / rows_columns.dart
Created Jul 13, 2018
Using rows and columns to create an asymmetric grid-like layout
View rows_columns.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
@mjohnsullivan
mjohnsullivan / scroll_detection.dart
Created Jul 11, 2018
Detect when a scrollable widget starts or stops scrolling
View scroll_detection.dart
// Copyright 2018 The Chromium Authors. 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
@mjohnsullivan
mjohnsullivan / incrementer_snackbar.dart
Created Jul 3, 2018
The classic Flutter incrementer app with added SnackBar
View incrementer_snackbar.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Snackbars',
theme: ThemeData(
@mjohnsullivan
mjohnsullivan / quote.dart
Created Jun 25, 2018
Simple Flutter app to retrieve and display a quote of the day
View quote.dart
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@mjohnsullivan
mjohnsullivan / particles.dart
Last active Jun 19, 2019
Demonstrates drawing and animating simple shapes in Flutter
View particles.dart
// Adapted from https://github.com/nhancv/nc_flutter_util
import 'dart:math';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/animation.dart';
import 'package:flutter/material.dart';
main() {
runApp(new MaterialApp(
@mjohnsullivan
mjohnsullivan / expanding_app_bar.dart
Last active Mar 19, 2018
Expanding AppBar in Flutter
View expanding_app_bar.dart
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Expanding AppBar Example',
theme: new ThemeData(
@mjohnsullivan
mjohnsullivan / downloader.dart
Last active Dec 5, 2017
Simple HTTP downloader script in Dart
View downloader.dart
// Copyright 2017 Matt Sullivan
// Governed by the 2-Clause BSD license: https://opensource.org/licenses/BSD-2-Clause
import 'dart:io';
import 'package:http/http.dart' as http;
import 'package:args/args.dart';
void main(List<String> args) {
var parsedArgs = parseArgs(args);
You can’t perform that action at this time.