Skip to content

Instantly share code, notes, and snippets.

View stargazing-dino's full-sized avatar
🏠
Working from home

Rex Magana stargazing-dino

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>The change you wanted was rejected (422)</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
body {
background-color: #EFEFEF;
color: #2E2F30;
text-align: center;
import 'package:flutter/material.dart';
class MoneyRow extends StatelessWidget {
const MoneyRow({
Key key,
@required this.name,
@required this.amount,
}) : super(key: key);
final name; // String or Widget
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:mobile/utils/formatters.dart';
class Countdown extends StatelessWidget {
const Countdown({
Key key,
@required this.millisecondsToTime,
this.style,
import 'package:flutter/material.dart';
import 'package:mobile/utils/get_text_color.dart';
class ButtonGroup extends StatelessWidget {
ButtonGroup({
Key key,
@required this.index,
@required this.length,
@required this.titles,
@required this.onPressed,
@stargazing-dino
stargazing-dino / text_button_group.dart
Created September 9, 2019 23:26
Text Button Group
import 'package:flutter/material.dart';
// https://pub.dev/packages/reorderables
class TextButtonGroup extends StatefulWidget {
TextButtonGroup({
Key key,
this.initialIndex = 0,
@required this.titles,
@required this.onTap,
@required this.duration,
@stargazing-dino
stargazing-dino / onboarding_screen.dart
Created September 11, 2019 20:27
Onboarding Screen
class Screen extends StatelessWidget {
const Screen({
Key key,
this.topFlex = 1,
this.topText = "",
this.topImageUri = "",
this.bottomFlex = 1,
this.bottomText = "",
this.bottomImageUri = "",
}) : super(key: key);
@stargazing-dino
stargazing-dino / continuous_mixin.dart
Created September 13, 2019 18:27
Continuous Requests Mixin
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:mobile/utils/lifecycle_event_handler.dart';
/// Attaches to a [Widget] and calls [fetchData] every [interval] seconds
/// or upon app reactivation.
mixin ContinuousRequest<T extends StatefulWidget> on State<T> {
/// A subscription that calls [fetch] data every [interval] seconds
import 'package:flutter/material.dart';
/// This is possibly an issue with the flutter framework where
/// when returning a container for FAB, it won't show a
/// floating snackbar but it will show a fixed one
class FloatingIssue extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
floatingActionButton: Container(),
@stargazing-dino
stargazing-dino / gradle.build
Created October 19, 2019 17:17
A gradle build for getting FB and Google auth 10/19/2019
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
@stargazing-dino
stargazing-dino / gradle.properties
Created October 19, 2019 17:19
An example for the gradle.properties file 10/19/2019
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true