Skip to content

Instantly share code, notes, and snippets.

View rodrigofelipejr's full-sized avatar
😁
Let's study...

Rodrigo Felipe rodrigofelipejr

😁
Let's study...
View GitHub Profile
import 'dart:async';
import 'dart:ui';
class Debouncer {
final int milliseconds;
Debouncer({
this.milliseconds = 1000,
});
import 'dart:async';
import 'package:flutter/material.dart';
class DebouncedButtonWidget extends StatefulWidget {
final String label;
final void Function()? onPressed;
const DebouncedButtonWidget({
Key? key,
@rodrigofelipejr
rodrigofelipejr / README.md
Created October 22, 2021 00:11 — forked from lopspower/README.md
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

@rodrigofelipejr
rodrigofelipejr / get_widget_size_position.dart
Created October 17, 2021 14:30
Flutter-get-widget-size-and-position
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@rodrigofelipejr
rodrigofelipejr / animation_arrow_rotation.dart
Created October 17, 2021 14:28
Animation - Arrow Rotation
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:vector_math/vector_math_64.dart' show radians;
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

Save and close your file by typing the following cmd :wqEnter

will only save your file cmd :wEnter

will quit the editor without saving your file. cmd :q!Enter

  • choco list --local-only

  • choco install ruby --version 1.9.3.55100

  • dart migrate --apply-changes

  • flutter clean

  • flutter pub get

  • flutter packages pub run build_runner build --delete-conflicting-outputs

return Scaffold(
appBar: AppBar(
title: Text('i.e Contact'),
),
body: SizedBox(
height: MediaQuery.of(context).size.height,
child: Column(
children: [
SizedBox(
height: 300,
final String responseTipoServicosEmpty = "[]";
final String responseTipoServicos = """
[
{
"documento": "82.916.818/0001-13",
"matricula": "0000000004",
"codigoTipoServico": 1,
"descricaoTipoServico": "Tipo de serviço 1"
},
{
final List<ReactionDisposer> _disposers = [];
@override
void didChangeDependencies() {
super.didChangeDependencies();
_disposers.add(
reaction((_) => controller.success, (value) => null),
);
}