Skip to content

Instantly share code, notes, and snippets.

View jogboms's full-sized avatar
💙
Building Awesome w/ Dart & Flutter

Jeremiah Ogbomo jogboms

💙
Building Awesome w/ Dart & Flutter
View GitHub Profile
@jogboms
jogboms / main.dart
Created November 7, 2019 15:20 — forked from wouterhardeman/main.dart
Custom error screen in Flutter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
Widget getErrorWidget(FlutterErrorDetails error) {
return Center(
child: Text("Error appeared."),
);
}
@jogboms
jogboms / icon_gradient.dart
Created November 26, 2019 18:54 — forked from mjohnsullivan/icon_gradient.dart
Apply a color gradient to an icon in Flutter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
@jogboms
jogboms / main.dart
Created November 28, 2019 16:36 — forked from joseph-montanez/main.dart
MediaQuery.of(context).size
import 'dart:async';
import 'package:flutter/material.dart';
// import 'package:flutter/services.dart';
import 'widgets/AnimatedButton.dart';
import 'widgets/AnimatedInput.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
void main() => runApp(MyApp());
@jogboms
jogboms / easing.js
Created December 31, 2019 21:26 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
import 'package:flutter/material.dart';
class OverlayContainer extends StatefulWidget {
/// The child to render in the regular document flow (defaults to Container())
final Widget child;
/// The widget to render inside the [OverlayEntry].
final Widget overlay;
/// Offset to apply to the [CompositedTransformFollower]
@jogboms
jogboms / transitions_fun.dart
Created January 9, 2020 07:25 — forked from slightfoot/transitions_fun.dart
Fun with Route Animations - by Simon Lightfoot - #HumpDayQandA - 8th Janurary 2020
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@jogboms
jogboms / main.dart
Last active January 12, 2020 14:19
A simple dots loading widget using CustomPaint
import 'package:flutter/material.dart';
import 'dart:math' as math;
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@jogboms
jogboms / main.dart
Last active January 17, 2020 23:26
A simple atom-inspired loading widget using CustomPaint
import 'package:flutter/material.dart';
import 'dart:math' as math;
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
name: CI
on: [push]
jobs:
# Set up Flutter for all other tasks.
setup:
runs-on: ${{ matrix.os }}
strategy:
@jogboms
jogboms / main.dart
Created February 1, 2020 13:34
Simple discrete slider with RenderObject
import 'dart:math' as math;
import 'dart:ui' as ui;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
void main() {
runApp(MyApp());