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 eventos.dart
import 'package:bloc_pattern/bloc_pattern.dart';
import 'package:flutter/material.dart';
import 'package:minhacidade/blocs/evento_bloc.dart';
import 'package:minhacidade/pages/evento_page.dart';
import 'package:minhacidade/widgets/card_widget.dart';
class EventosPage extends StatefulWidget {
EventosPage({Key key}) : super(key: key);
_EventosPageState createState() => _EventosPageState();
@guilhermecarvalhocarneiro
guilhermecarvalhocarneiro / main.dart
Created Jul 23, 2019
BottomNavigationBar mantendo o estado dos dados carregados
View main.dart
import 'package:bloc_pattern/bloc_pattern.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:location/location.dart';
import 'package:minhacidade/blocs/atrativo_bloc.dart';
import 'package:minhacidade/blocs/cidade_bloc.dart';
import 'package:minhacidade/blocs/estabelecimento_bloc.dart';
import 'package:minhacidade/blocs/evento_bloc.dart';
import 'package:minhacidade/blocs/foursquare_bloc.dart';
import 'package:minhacidade/blocs/roteiro_bloc.dart';
View mailto.dart
IconButton(
onPressed: () async {
String urlString = "mailto:${_atrativoDetail.email}?subject=tôChegando";
if (await canLaunch(urlString)){
launch(urlString);
}else{
String urlString = Uri.encodeFull("mailto:${_atrativoDetail.email}?subject=toChegando");
print(urlString);
launch(urlString);
print("Impossível de executar");
View AppDelegate.swift
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
View gist:5de2c178dce19fbe7dfbb8763b994441
class RoteiroBloc {
final _controller = StreamController();
// Criando a Stream para retornar para quem chamou
get stream => _controller.stream;
// Método para consultar os roteiros da cidade.
getRoteiros(){
Future future = Roteiro.getRoteiros();
future.then((roteiros){
View gist:b85f23f912fde393caa73ab7f10f5510
import 'dart:async';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:google_sign_in/google_sign_in.dart';
final FirebaseAuth _authUserFirebase = FirebaseAuth.instance;
final GoogleSignIn _googleSignIn = GoogleSignIn();
GoogleSignInAccount _authUser = _googleSignIn.currentUser;
View android - app - build.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 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 proguard-rules.pro
#Flutter Wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
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.2.1'
You can’t perform that action at this time.