form_builder_validators 8.4.0 form_builder_validators: ^8.4.0 copied to clipboard
Form Builder Validators set of validators for FlutterFormBuilder. Provides common validators and a way to make your own.
import 'package:example/override_form_builder_localizations_en.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:form_builder_validators/form_builder_validators.dart';
import 'home_page.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Form Builder Validators Demo',
theme: ThemeData(primarySwatch: Colors.blue),
home: const HomePage(),
supportedLocales: const [
...FormBuilderLocalizations.supportedLocales,
],
localizationsDelegates: const [
...GlobalMaterialLocalizations.delegates,
// Placed in front of `FormBuilderLocalizations.delegate`
OverrideFormBuilderLocalizationsEn.delegate,
FormBuilderLocalizations.delegate,
],
);
}
}