Skip to content

Instantly share code, notes, and snippets.

import 'package:cpf_cnpj_validator/cnpj_validator.dart';
import 'package:cpf_cnpj_validator/cpf_validator.dart';
import 'package:data_connection_checker/data_connection_checker.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
import 'package:flutter_modular/flutter_modular.dart';
import 'package:get/get.dart';
import '../../../clean/ui/widgets/molecules/error_alert_body/error_alert_body.dart';
@M001T
M001T / banners_model.dart
Created November 29, 2021 13:52
banners_model
class BannersModel {
String position;
String image_url;
String intent_rule;
String url;
int auth;
String start_date;
String end_date;
BannersModel({this.position, this.image_url, this.intent_rule, this.url, this.auth, this.start_date, this.end_date});
@M001T
M001T / user_model.dart
Created November 29, 2021 13:50
user_model
import 'package:flutter_modular/flutter_modular.dart';
import 'package:pandapay_flutter/app/core/utils/constants/storage_keys.dart';
import 'package:pandapay_flutter/app/infrastructure/data/datasources/local/secure_local_datasource.dart';
import 'package:pandapay_flutter/app/models/user_api_model/crypto_address_model/crypto_address_model.dart';
import '../../features/auth/data/models/user/child_models/kyc_model.dart';
import '../../features/auth/data/models/user/child_models/missing_data_model.dart';
import 'banners_model/banner_model.dart';
import 'services_model/services_model.dart';
import 'user_model/user_model.dart';
@M001T
M001T / anuncios_model.dart
Created April 15, 2021 18:34
Modelo da Model
class AnuncioModel {
String id;
String classPdtId;
String pdtId;
String content;
String stock;
String price;
String isOrganic;
String addrFull;
String addrState;
@M001T
M001T / get_anuncios.dart
Created April 15, 2021 18:32
Usamos o modelo MVC
import 'dart:convert';
import 'package:facil_alimentos/api/services_api/cache_management.dart';
import 'package:facil_alimentos/models/anuncios_model.dart';
import 'package:http/http.dart' as http;
class GetAnunciosApi {
int qtdPatronizedPref = 0;
int qtdPatronized = 0;
int qtdNotPatronized = 0;
int qtdLastPosts = 0;
@M001T
M001T / sms_firebase_auth.dart
Created April 15, 2021 18:24
Sistema de SMS Auth com firebase
import 'package:firebase_auth/firebase_auth.dart';
class SMSFunctions {
static Future<void> sendCodeToPhoneNumber(
String phoneNo,
Function onSuccess,
Function onFailed,
Function onRetrival,
) async {