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
| #!/bin/bash | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[1;33m' | |
| CYAN='\033[0;36m' | |
| NC='\033[0m' # Sem Cor | |
| progname="${0##*/}" | |
| progname="${progname%.sh}" |
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
| mixin FormFieldValidation<T> { | |
| String? validateField(T? value, FormFieldValidator<T>? validator, String? forcedError) { | |
| if (forcedError != null) return forcedError; | |
| return validator?.call(value); | |
| } | |
| } | |
| /// The current state of a [FormField]. Passed to the [FormFieldBuilder] method | |
| /// for use in constructing the form field's widget. |
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
| void main() { | |
| final mark = DateTime.timestamp(); | |
| print(DateTime.fromMillisecondsSinceEpoch( | |
| mark.toLocal().millisecondsSinceEpoch)); | |
| } |
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 CheckDeviceValidationUseCase { | |
| final DeviceValidationRepository _deviceValidationRepository; | |
| CheckDeviceValidationUseCase(this._deviceValidationRepository); | |
| Future<Either<AppFailures, DeviceValidation>> call(DeviceParams params) async { | |
| final result = await _deviceValidationRepository.checkDeviceValidity(); | |
| return result.fold( | |
| (failure) { |