Skip to content

Instantly share code, notes, and snippets.

View braulio94's full-sized avatar
👨‍💻

Braulio Cassule braulio94

👨‍💻
View GitHub Profile
@braulio94
braulio94 / prefs.dart
Created February 27, 2020 22:17 — forked from slightfoot/prefs.dart
SharedPreferencesBuilder thingy
import 'dart:async';
import 'package:flutter/widgets.dart';
import 'package:shared_preferences/shared_preferences.dart';
class SharedPreferencesBuilder<T> extends StatelessWidget {
final String pref;
final AsyncWidgetBuilder<T> builder;
@braulio94
braulio94 / 📊 Weekly development breakdown
Last active October 29, 2020 01:02
Weekly Development Breakdown
Dart 27 hrs 25 mins █████████████░░░░░░░░ 62.4%
Go 6 hrs 54 mins ███▎░░░░░░░░░░░░░░░░░ 15.7%
SQL 3 hrs 14 mins █▌░░░░░░░░░░░░░░░░░░░ 7.4%
Groovy 2 hrs 2 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.6%
Java 1 hr 6 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.5%
@braulio94
braulio94 / abou-me-en.md
Last active May 23, 2020 11:23
About Me
@braulio94
braulio94 / kearean_soap_api.go
Created August 22, 2019 16:35
This are the many ways to request
const SOAPRequest = `<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:base_services="http://wsdl.cybozu.co.jp/base/2008">
<SOAP-ENV:Header>
<Action SOAP-ENV:mustUnderstand="1" xmlns="http://schemas.xmlsoap.org/ws/2003/03/addressing">{{.Action}}</Action>
<Security xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility"
SOAP-ENV:mustUnderstand="1"
@braulio94
braulio94 / holiday.go
Last active August 21, 2019 19:15
a go SOAP client that consumes a Holiday WebService
package main
import (
"encoding/xml"
"fmt"
"github.com/tiaguinho/gosoap"
"log"
)
type GetHolidaysForMonthResponse struct {
class ClippedCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ClipPath(
clipper: CardClipper(35.0),
child: Container(
@braulio94
braulio94 / google_maps_fkutter
Created November 3, 2018 16:06
exception caught
╞═══════════════════════════════════════════════════════════
[ +18 ms] I/flutter (29191): The following _CompileTimeError was thrown building GoogleMap(dirty, state: _GoogleMapState#5fffc):
[ ] I/flutter (29191): 'file:///C:/Users/Braulio/AppData/Roaming/Pub/Cache/git/plugins-5b45f58ccab7009d473d6c767e9e40ddcabedde3/packages/google_maps_flutter/lib/src/google_map.dart':
[ ] I/flutter (29191): error: line 42 pos 36:
[ ] I/flutter (29191): file:///C:/Users/Braulio/AppData/Roaming/Pub/Cache/git/plugins-5b45f58ccab7009d473d6c767e9e40ddcabedde3/packages/google_maps_flutter/lib/src/google_map.dart:42:36:
[ ] I/flutter (29191): Error: The argument type 'dart.core::Set<invalid-type>' can't be assigned to the parameter type
[ ] I/flutter (29191): 'dart.core::List<#lib1::OneSequenceGestureRecognizer>'.
[ ] I/flutter (29191): Try changing the type of the parameter, or casting the argument to
[ ] I/flutter (29191): 'dart.core::List<#lib1::OneSequenceGestureRecognizer>'.
[
@braulio94
braulio94 / flutter_navigator.dart
Created February 21, 2018 17:39
Example of navigation and route in flutter
import 'package:flutter/material.dart';
import 'package:test_app/other_page.dart';
void main() => runApp(
new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new HomePage(),
<ImageView
android:id="@+id/flag_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:srcCompat="@drawable/angolan_flag"
android:layout_gravity="center"
android:scaleType="centerCrop"
android:padding="50dp"/>
ImageView flagImage = findViewById(R.id.flag_image);
Drawable drawable = flagImage.getDrawable();
AnimatedVectorDrawable avd;