This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
05. verbing | |
Dada uma string, se seu tamanho for pelo menos 3, | |
adicione 'ing' no seu fim, a menos que a string | |
já termine com 'ing', nesse caso adicione 'ly'. | |
Se o tamanho da string for menor que 3, não altere nada. | |
Retorne o resultado da string. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await FirebaseAuth.instance.verifyPhoneNumber( | |
phoneNumber: phoneNumber, | |
verificationCompleted: (PhoneAuthCredential credential) async { | |
// ! Este método não é chamado | |
print("*******************************************************************"); | |
print("Usuário registrado com sucesso"); | |
print(credential.toString()); | |
print("*******************************************************************"); | |
final userAuth = await firebaseAuth.signInWithCredential(credential); | |
if (userAuth != null) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Service do model Cliente | |
/// | |
/// Os Métodos padrões gerados são: | |
/// fecthAll() -> Recupera a lista de Cliente da API. | |
/// detail() -> Recupera os detalhes de Cliente da API. | |
/// post() -> Salva os dados de uma instância do Cliente na API. | |
/// put() -> Atualiza os dados de uma instância do Cliente na API. | |
/// delete() -> Deleta os dados de uma instância do Cliente na API. | |
/// | |
/// Os métodos de acesso à API devem ser implementados no nessa classe. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part of 'cubit.dart'; | |
abstract class ClienteState extends Equatable { | |
const ClienteState(); | |
} | |
class ClienteInitial extends ClienteState { | |
@override | |
List<Object> get props => []; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Os Métodos padrões gerados são: | |
/// Métodos da API | |
/// fecth() -> Recupera a lista de Cliente. | |
/// reload() -> Recarrega a lista de Cliente. | |
/// detail() -> Recupera os detalhes de um Cliente. | |
/// post() -> Salva um novo Cliente. | |
/// put() -> Atualiza os dados de um Cliente. | |
/// delete() -> Deleta um Cliente. | |
/// Métodos do Data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Model do objeto Cliente | |
/// | |
/// Os Métodos padrões gerados são: | |
/// toString() -> Sobrescreve o toString para trazer todos os atributos da classe. | |
/// fromMap() -> Realiza o parser do Json para o Model. | |
/// toMap() -> Realiza o parser do Model para Json. | |
/// | |
/// [Travar o arquivo] | |
/// Caso deseje "travar" o arquivo para não ser parseado novamente |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsuarioData { | |
UsuarioModel _usuarioModel = UsuarioModel(); | |
static final UsuarioData _instance = UsuarioData.internal(); | |
factory UsuarioData() => _instance; | |
UsuarioData.internal(); | |
// smbt.Database? _db; | |
final String _storeName = "UsuarioStoreDB"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImagemEfeito(Base): | |
resultado = models.ForeignKey(Resultado, on_delete=models.CASCADE, related_name="imagens_efeito_resultado") | |
imagem_resultado = models.ForeignKey(ImagemResultado, on_delete=models.CASCADE, null=True, blank=True, | |
related_name="imagens_efeito_imagem_resultado") | |
imagem = models.TextField() | |
def get_path_image(self): | |
return f"/media/results/images/{self.imagem}" | |
@staticmethod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from usuario.models import Paciente | |
from dynaconf import settings | |
from faker import Faker | |
from validate_docbr import CPF | |
from base.tests.conftest import set_test_settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
@pytest.fixture(scope="session", autouse=True) | |
def set_test_settings(): | |
from django.conf import settings | |
settings.setenv('testing') |