Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
o/

Vicio rafaelvicio

:octocat:
o/
View GitHub Profile
@rafaelvicio
rafaelvicio / fantasy.dart
Created Mar 12, 2020
FromJson with Object in Object
View fantasy.dart
import 'package:news/models/player.dart';
import 'game.dart';
class Fantasy {
String id;
String name;
DateTime openAt;
DateTime closeAt;
Game game;
View hint
<View>
<Text accessibilityHint="Botão para realizar um cadastro">Cadastro</Text>
</View>
View type
<View>
<Text accessibilityRole="text">Cadastro</Text>
</View>
View label
<View accessible={true} accessibilityLabel={"Realizar Cadastro"}>
<Text onPress={() => ...}>Cadastro</Text>
</View>
View accessible
<View accessible={true}>
<Text>Linha um</Text>
<Text>Linha dois</Text>
</View>
@rafaelvicio
rafaelvicio / example1
Last active Oct 15, 2019
Exemplo Acessibilidade React Native
View example1
const Example = () => (
<View> //Esse elemento vai ser lido pelo leitor de tela
<Text>Começar contador</Text>
<View> //Esse elemento vai ser lido pelo leitor de tela
<Button>Começar</Button> //O leitor vai ler 'Começar' quando poderia ser 'Começar o contaodor'
</View>
</View>
)
View AppNavigator
import React from 'react';
import { createAppContainer, createDrawerNavigator } from 'react-navigation';
import { Ionicons } from '@expo/vector-icons';
import Home from '../src/pages/Home';
import SugestionPage from '../src/pages/SugestionPage';
import Menu from '../src/navigation/Menu';
export default createAppContainer(createDrawerNavigator({
View gist:ec787ccf826c29fd261f58c4acc9bb7d
default: &default
adapter: postgresql
encoding: utf8
host: localhost
username: postgres
password: 123456789
test:
<<: *default
username: test_user
View arquivo1.js
const mocks = [
{
request: {
query: funnelGQL(),
variables: {
input: {}
}
},
result: {
data: {
View hanlder.js
"use strict";
const sgMail = require("@sendgrid/mail");
module.exports.hello = function(context) {
context.log("JavaScript HTTP trigger function processed a request.");
sgMail.setApiKey(process.env.SENDGRID_API_KEY);
const msg = {
You can’t perform that action at this time.