A camada domain provê as regras e as unidades de negócio usadas na aplicação. Nesta camada estão os Services que são consumidos pelos BLoCs/PageControllers da camada app, as Entities e os contratos dos repositórios de dados, cuja implementação concreta fica na camada data.
This file contains 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
const cardCode = '0000000000000000000000008650001144591116'; | |
const cardCode2 = '8650001144591116'; | |
const cardCode3 = '86500011445911160000'; | |
const cardCode5 = '0000'; | |
const extractCardCode= (_cardCode) => { | |
if(_cardCode.startsWith('00')) { | |
const _replaced = _cardCode.replace(/0{2,}/, '') | |
if(!_replaced) return true; | |
return `0${_replaced}` |
This file contains 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 'dart:math'; | |
import 'package:flutter/material.dart'; | |
const _duration = Duration(milliseconds: 400); | |
double randomBorderRadius() { | |
return Random().nextDouble() * 64; | |
} |
This file contains 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
const regex = /[a-z|A-Z|\s|\+]+[^\s\d|^\s-]/; | |
regex.exec('CLORIDRATO DE SERTRALINA 50 MG (G)') | |
regex.exec('AVAMYS - 27,5 MCG/DOSE - Suspensão nasal') | |
regex.exec('CLORIDRATO DE SERTRALINA 50 MG (G)') | |
regex.exec('CLORIDRATO DE SERTRALINA 50 MG (G)') | |
regex.exec('ADDERA D3 50000 UI - Cápsula') | |
regex.exec('AVAMYS 27,5 MCG/DOSE - Suspensão nasal') | |
regex.exec('SUMAX 50 MG - Comprimido 50 MG - Comprimido') | |
regex.exec('NAPROXENO 500 MG - Comprimido 500 MG - Comprimido') |
This file contains 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
final IsolateHandler isolateHandler = IsolateHandler(); | |
void scheduleNotificationsIsolate(String _reminders) async { | |
await new Future.delayed(new Duration(milliseconds: 500)); | |
// ... (describe settings) | |
flutterLocalNotificationsPlugin.initialize( | |
settings, | |
onSelectNotification: onSelectNotification, | |
); |