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:4a732fd35515190009cb8e3ededd939f
processingDialog(BuildContext context, {String message = "Processando", bool hide = false}) {
return showDialog(
context: context,
barrierDismissible: false,
builder: (context) {
return AlertDialog(
backgroundColor: Colors.black,
title: Center(
child: Text(
message,
View WidgetB
import ...
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
...
View WidgetA
import ...
class FeedPage extends StatefulWidget {
@override
_FeedPageState createState() => _FeedPageState();
}
class _FeedPageState extends State<FeedPage> {
var itemSelected = 0;
@guilhermecarvalhocarneiro
guilhermecarvalhocarneiro / create.dart
Created Dec 20, 2019
Form utilizando a função de criação do Checkbox
View create.dart
children: <Widget>[
opcaoResposta(checkBoxOne, "Curso Técnico"),
opcaoResposta(checkBoxOne, "Curso Superior"),
@guilhermecarvalhocarneiro
guilhermecarvalhocarneiro / checkbox.dart
Created Dec 20, 2019
Função para ser utilizada na criação dos CheckBox no form
View checkbox.dart
Widget opcaoResposta(bool valueChecked, String label) {
return Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Checkbox(
value: valueChecked,
onChanged: (value) {
valueChecked = !valueChecked;
},
),
View gist:e18f9f7facbb91fb4778f8c74cc5b9e8
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
SQLALCHEMY_DATABASE_URL = "postgresql://postgres:*************"
FuncionarioEngine = create_engine(SQLALCHEMY_DATABASE_URL)
FuncionarioSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=FuncionarioEngine)
View gist:7f216bf59b094f9303d5a63570d8cb73
from sqlalchemy.orm import Session, SessionExtension
from sqlalchemy import Column, String, Integer, Boolean, DateTime
from .database import Base, FuncionarioSessionLocal
class FuncionarioData(Base):
"""
classe que representa o objeto funcionario no banco de dados
"""
__tablename__ = "autenticacao_funcionario"
View gist:ab1d2a15ad427122e8e85e3f71862c46
from pydantic import BaseModel
from datetime import datetime, date
class FuncionarioModel(BaseModel):
id: int
nome: str = None
funcao: str = None
admitido_exonerado: bool = None
matricula: int
View gist:a18a1941d56e940b5c8e242327b5fd9e
from typing import List
from fastapi import Depends, FastAPI, HTTPException, Query
from sqlalchemy.orm import Session
from funcionario_app import data as FuncionarioAppData
from funcionario_app.models import FuncionarioModel
from funcionario_app.data import FuncionarioData
from funcionario_app.database import FuncionarioEngine, FuncionarioSessionLocal
View gist:a073b9db0af110067ecd79c273cfd825
return Scaffold(
body: Stack(
children: <Widget>[
CustomScrollView(
slivers: <Widget>[
SliverAppBar(
pinned: true,
leading: Container(),
expandedHeight: 300.0,
flexibleSpace: FlexibleSpaceBar(
You can’t perform that action at this time.