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
import 'package:flutter/material.dart';
class Bubble extends StatelessWidget {
Bubble({this.message, this.time, this.delivered, this.isMe});
final String message, time;
final delivered, isMe;
@override
Widget build(BuildContext context) {
@jogboms
jogboms / wave_card.dart
Created April 23, 2019 05:53 — forked from stefanJi/wave_card.dart
flutter wave card example
import 'package:flutter/widgets.dart';
class WaveCard extends StatelessWidget {
WaveCard({Key key, padding: EdgeInsets}) : super(key: key);
@override
Widget build(BuildContext context) {
final painter = WavePainter(Color.fromRGBO(96, 204, 184, 0.2));
return CustomPaint(
painter: painter,
@jogboms
jogboms / number_input.dart
Created April 30, 2019 05:12 — forked from slightfoot/number_input.dart
Number Input Widget - For entering pins and other such things - #HumpDayQandA - 24th April 2019
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() => runApp(ExampleApp());
class ExampleApp extends StatefulWidget {
@override
_ExampleAppState createState() => _ExampleAppState();
}
@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 / PhonecallReceiver.java
Created May 13, 2020 05:59 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {