lib
|-- data
| |-- environment.dart
| |-- models
| | |-- api_response_model.dart
| | |-- login_request_model.dart
| | |-- login_response_model.dart
| |-- providers
| | |-- api_rest_provider.dart
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
| [ | |
| { | |
| "emoji": "🎨", | |
| "entity": "🎨", | |
| "code": ":art: [format-code]:", | |
| "description": "Improving structure or format of code", | |
| "name": "art", | |
| "semver": 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
| final int targetWidth = 120; | |
| final File markerImageFile = await DefaultCacheManager() | |
| .getSingleFile("${Enviroment.server}$avatar"); | |
| final Uint8List markerImageBytes = await markerImageFile.readAsBytes(); | |
| final Codec markerImageCodec = await instantiateImageCodec( | |
| markerImageBytes, | |
| targetWidth: targetWidth, | |
| ); |
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 'dart:async'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:google_maps_flutter/google_maps_flutter.dart'; | |
| void main() => runApp(Main()); | |
| class Main extends StatefulWidget { | |
| @override | |
| _MainState createState() => _MainState(); |
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 'dart:math'; | |
| import 'package:flutter/material.dart'; | |
| class DotsIndicator extends AnimatedWidget { | |
| const DotsIndicator({ | |
| @required this.controller, | |
| @required this.itemCount, | |
| @required this.onPageSelected, | |
| this.color = Colors.white, |
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 { AbstractControl, ValidatorFn } from '@angular/forms'; | |
| import libphonenumber from 'google-libphonenumber'; | |
| export class PhoneValidator { | |
| // Inspired on: https://github.com/yuyang041060120/ng2-validation/blob/master/src/equal-to/validator.ts | |
| static validCountryPhone = (countryControl: AbstractControl): ValidatorFn => { | |
| let subscribe: boolean = false; | |
| return (phoneControl: AbstractControl): {[key: string]: boolean} => { |
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
| //Complete example for Ionic Framework in: https://ionicthemes.com/tutorials/about/forms-and-validation-in-ionic | |
| //Complete example for Angular 5 in: https://angular-templates.io/tutorials/about/angular-forms-and-validations | |
| import { AbstractControl, ValidatorFn } from '@angular/forms'; | |
| import * as libphonenumber from 'google-libphonenumber'; | |
| export class PhoneValidator { | |
| // Inspired on: https://github.com/yuyang041060120/ng2-validation/blob/master/src/equal-to/validator.ts | |
| static validCountryPhone = (countryControl: AbstractControl): ValidatorFn => { |
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 { FormControl, FormGroup } from '@angular/forms'; | |
| export class PasswordValidator { | |
| static areEqual(formGroup: FormGroup) { | |
| let val; | |
| let valid = true; | |
| for (let key in formGroup.controls) { | |
| if (formGroup.controls.hasOwnProperty(key)) { | |
| let control: FormControl = <FormControl>formGroup.controls[key]; |
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 { PasswordValidator } from '../../validators/password.validator'; | |
| this.matching_passwords_group = new FormGroup({ | |
| password: new FormControl('', Validators.compose([ | |
| Validators.minLength(5), | |
| Validators.required, | |
| Validators.pattern('^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9]+$') //this is for the letters (both uppercase and lowercase) and numbers validation | |
| ])), | |
| confirm_password: new FormControl('', Validators.required) | |
| }, (formGroup: FormGroup) => { | |
| return PasswordValidator.areEqual(formGroup); |
NewerOlder