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
TextEditingController _birthdayTextController = TextEditingController(); | |
final UsDateTextInputFormatter _dateTextInputFormatter = | |
UsDateTextInputFormatter(); | |
String _validateDate(String value) { | |
final RegExp dateExp = | |
RegExp(r'^(0[1-9]|1[0-2])\/(0[1-9]|1\d|2\d|3[01])\/(19|20)\d{2}$'); | |
if (!dateExp.hasMatch(value)) return 'mmddyyyy'; | |
return null; |
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
TextEditingController _zipTextController = TextEditingController(); | |
final ZipTextInputFormatter _zipTextInputFormatter = ZipTextInputFormatter(); | |
String _validateZip(String value) { | |
if (value.isEmpty) return 'Enter zipcode'; | |
if (value.length < 5) return '5 or more chars'; | |
if (value.length == 5) { | |
final RegExp zip1Exp = RegExp(r'\d\d\d\d\d$'); | |
if (zip1Exp.hasMatch(value)) { |
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
TextEditingController _stateTextController = TextEditingController(); | |
String _validateState(String value) { | |
if (value.isEmpty) return 'Enter state'; | |
if (value.length != 2) return '2 character state'; | |
RegExp stateExp = | |
RegExp(r"A[LKSZRAEP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADLN]|K[SY]|LA|" | |
r"M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|" | |
r"V[AIT]|W[AIVY]"); | |
if (!stateExp.hasMatch(value)) return 'Invalid'; |
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
TextEditingController _ssnTextController = TextEditingController(); | |
final SocSecTextInputFormatter _socSecNumberFormatter = | |
SocSecTextInputFormatter(); | |
String _validateSocSec(String value) { | |
final RegExp socSecExp = RegExp(r'\d\d\d\-\d\d\-\d\d\d\d$'); | |
if (!socSecExp.hasMatch(value)) return '9 digit SSN'; | |
return null; | |
} |
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
TextEditingController _PhoneNumberTextController = TextEditingController(); | |
final UsPhoneTextInputFormatter _phoneNumberFormatter = | |
UsPhoneTextInputFormatter(); | |
String _validatePhoneNumber(String value) { | |
final RegExp phoneExp = RegExp(r'^\(\d\d\d\) \d\d\d\-\d\d\d\d$'); | |
if (!phoneExp.hasMatch(value)) return '10 digit phone #'; | |
return null; | |
} |
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:io' as io; | |
import 'dart:convert'; | |
import 'package:path_provider/path_provider.dart'; | |
import 'package:flutter_mailer/flutter_mailer.dart'; | |
class Applicant { | |
String applicantJson; | |
String pathName; | |
io.Directory directory; | |
io.File applicantFile; |
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 'package:flutter/material.dart'; | |
const kTextFieldDecoration = InputDecoration( | |
hintText: 'Enter a value', | |
filled: true, | |
contentPadding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 12.0), | |
border: OutlineInputBorder( | |
borderRadius: BorderRadius.all(Radius.circular(12.0)), | |
), | |
enabledBorder: OutlineInputBorder( |
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 'package:flutter/services.dart'; | |
/// Format a phone number in format (###) ###-#### | |
class UsPhoneTextInputFormatter extends TextInputFormatter { | |
@override | |
TextEditingValue formatEditUpdate( | |
TextEditingValue oldValue, | |
TextEditingValue newValue, | |
) { | |
final int newTextLength = newValue.text.length; |
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:io'; | |
import 'package:flutter/material.dart'; | |
import 'package:image_picker/image_picker.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |