field_validation 0.0.1
field_validation: ^0.0.1 copied to clipboard
This package provides an easy way to validate Your Email, PAN, Pic code, Mobile Number And All Types of Documents like Indian Government Documents like Aadhar,PAN and LLPIN..etc This is often useful t [...]
import 'package:field_validation/Source_Code/FlutterValidation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Validation',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: HomePage());
}
}
class HomePage extends StatelessWidget {
//Creating Object of the FieldValidator class.
FlutterValidation validator = new FlutterValidation();
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
height: double.infinity,
child: Center(
child: InkWell(
onTap: () {
//Here We are calling Email validate method and passing that value which we want to compare with email.
bool result =
validator.emailValidate(content: "Chandan@gmail.com");
print(result);
},
child: Text("Botton"),
),
),
),
);
}
}