Skip to content

Instantly share code, notes, and snippets.

Guilherme de Carvalho Carneiro guilhermecarvalhocarneiro

Block or report user

Report or block guilhermecarvalhocarneiro

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
View gist:8b717446e2ede7403589556f4067f09c
[
{
"id": 1,
"enabled": true,
"deleted": false,
"created_on": "2019-10-02T10:52:44.743717-03:00",
"updated_on": "2019-10-02T10:52:44.743781-03:00",
"nome": "voqREPcHnmJwNKhdnyNKYLTbvdjyOTYigJYgWrpgpGHiSlLiUCKwXYVqKNMVZMArjfqFXpAdebquJhEvGvUaFYxgmmUEEkbzYPxe"
},
{
View OkHttp
val url = "${this.uri}?format=json"
val client = OkHttpClient.Builder()
.readTimeout(Config.readTimeOutAPIDefault, TimeUnit.SECONDS)
.connectTimeout(Config.connectTimeOutAPIDefault, TimeUnit.SECONDS)
.build()
val request = Request.Builder().url(url).build()
client.newCall(request).execute().use { response ->
View Dio.dart
import 'dart:convert';
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:estudos/utils/config.dart';
class HttpRequestDio {
Dio _dio;
String _url;
String _errorMessage =
"Ocorreu um erro ao executar a consulta, favor tentar novamente.";
View Gradle
buildscript {
ext.kotlin_version = '1.3.41'
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
View Gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
View gist:8638b4d7d2b081a063a8c5f3a3f04127
class DataCache {
static final DataCache _dataCache = new DataCache.internal();
factory DataCache() {
return _dataCache;
}
DataCache.internal();
}
View android_app_build_gradel
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
View android_build_gradle
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
View pubspec.yaml
version: 1.1.0+9
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
url_launcher: ^5.0.2
transparent_image: ^1.0.0
View autenticacao.dart
Future<Null> _ensureLoggedIn(String teamID) async {
if (currentUser == null)
// Não está logado
currentUser = await _googleSignIn.signInSilently();
if (currentUser == null) currentUser = await _googleSignIn.signIn();
if (await _auth.currentUser() == null) {
// Verificando se o usuário no Firebase é nulo
GoogleSignInAuthentication credentials =
await _googleSignIn.currentUser.authentication;
// Gerando a chave usando as credenciais do Google
You can’t perform that action at this time.