Skip to content

Instantly share code, notes, and snippets.

View allansrc's full-sized avatar
🇧🇷
from Home to the World

Allan Ramos allansrc

🇧🇷
from Home to the World
View GitHub Profile
@marcusedu
marcusedu / mfa_validator_input.dart
Last active February 27, 2024 20:24
A simple MFA Validator Input, with custom length code.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class MfaValidatorInput extends StatefulWidget {
const MfaValidatorInput({
super.key,
required this.length,
this.onCompleted,
this.onChanged,
this.focusNode,
@akitaonrails
akitaonrails / links.md
Created November 6, 2019 01:28
Links de referência pro Episódio 66 do Canal Akitando
enum OrderType { asc, desc, sad }
String enumToString(dynamic enumValue) =>
enumValue.toString().replaceAll(RegExp(r"^.*?\."), "");
E stringToEnum<E>(List<E> values, String target, [E defaultIfNoMatch]) {
return values.firstWhere((enm) => enumToString(enm) == target,
orElse: () => defaultIfNoMatch);
}
const podcasts = [
{
"id": 1,
"title": "RocketCast",
"cover": "https://s3-sa-east-1.amazonaws.com/gonative/cover1.png",
"tracks": [
{
"id": "0",
"title": "Papercut",
"artist": "Linkin Park",
@marcusedu
marcusedu / install_flutter_on_windows.bat
Last active October 17, 2020 13:46
Script que baixa e instala o chocolatey, dart-sdk, android studio e o git, depois clona o flutter na pasta src da raiz do disco e inicializa o Flutter doctor.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install dart-sdk androidstudio git
cd \
mkdir src
cd \src
git clone https://github.com/flutter/flutter.git
cd flutter
start bin/flutter.bat doctor
start flutter_console.bat
@echo off
@lopspower
lopspower / README.md
Last active July 2, 2024 02:11
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store