Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Erik Chacon erikwco

🏠
Working from home
Block or report user

Report or block erikwco

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
@erikwco
erikwco / flutter.md
Created May 23, 2019 — forked from matteocrippa/flutter.md
Flutter Cheatsheet
View flutter.md

Flutter

A quick cheatsheet of useful snippet for Flutter

Widget

A widget is the basic type of controller in Flutter Material. There are two type of basic Widget we can extend our classes: StatefulWidget or StatelessWidget.

Stateful

StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:

View animated_pgbutton.dart
import 'package:flutter/material.dart';
class AnimatedProgressButton extends StatefulWidget {
@override
_AnimatedProgressButtonState createState() => _AnimatedProgressButtonState();
}
class _AnimatedProgressButtonState extends State<AnimatedProgressButton>{
@override
void initState() {
@erikwco
erikwco / animated_pgbutton.dart
Last active May 16, 2019
Animation Definition for our button
View animated_pgbutton.dart
// Defining Animations and Animation Controller
Animation<double> _animatedSize;
Animation<Color> _animatedColor;
AnimationController _boss;
// Initialize Animations and AnimationController
@override
void initState() {
super.initState();
// AnimationController
@erikwco
erikwco / animated_pgbutton.dart
Last active May 16, 2019
Flutter Progress Bar Button Widget - 0
View animated_pgbutton.dart
import 'dart:async';
import 'package:flutter/material.dart';
class AnimatedProgressButton extends StatefulWidget {
@override
_AnimatedProgressButtonState createState() => _AnimatedProgressButtonState();
}
class _AnimatedProgressButtonState extends State<AnimatedProgressButton>
with SingleTickerProviderStateMixin
@erikwco
erikwco / main.dart
Created May 15, 2019
Flutter Progress Bar Button - 0
View main.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(
View httpd.asm
section .text
global _start
_start:
xor eax, eax ; init eax 0
xor ebx, ebx ; init ebx 0
xor esi, esi ; init esi 0
jmp _socket ; jmp to _socket
_socket_call:
View keybase.md

Keybase proof

I hereby claim:

  • I am erikwco on github.
  • I am erikwco (https://keybase.io/erikwco) on keybase.
  • I have a public key whose fingerprint is 18F7 6D6D 3A8E 888F FF07 373B C271 7866 0657 B6E3

To claim this, I am signing this object:

@erikwco
erikwco / advance_commands.vim
Created Jul 25, 2017 — forked from fakemelvynkim/advance_commands.vim
advanced vim commands to review
View advance_commands.vim
da< (or) da( (or) da{ // delete the block including <,(,{ and >,),} rsply
di< (or) di( (or) di{ // simillarly, but excluing <,(,{ and >,),} rsply
yi< (or) yi( (or) yi{ // yanks simillarly. Simillarly for ciw, viw, etc
df<Space> // delete from current char including the next space
daw // delete current word including the next space
diq // delete current word excluding the next space
yiw // yank current word excluding the next space
yaw // yank current word including the next space
View MainActivity.java
/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@erikwco
erikwco / vim74centos
Created Mar 21, 2016 — forked from juxtin/vim74centos
Compile Vim 7.4 on Centos and install my vimrc
View vim74centos
#!/bin/bash
yum groupinstall 'Development tools' -y
yum install ncurses ncurses-devel wget git -y
cd /usr/local/src
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
tar -xjf vim-7.4.tar.bz2
cd vim74
./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp
make && make install
You can’t perform that action at this time.