flrx_validator 0.4.0+2
flrx_validator: ^0.4.0+2

Dart native js
Flutter Android iOS web

A powerful, extensible validator package to get validation messages based on a list of rules.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'material_form.dart';
import 'cupertino_form.dart';

void main() => runApp(MyApp());

const String _title = 'Form Validation';

/// This Widget is the main application widget.
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: _title,
      home: SelectTypeOfForm(),
      routes: <String, Widget Function(BuildContext)>{
        '/material-form': (BuildContext context) => MaterialForm(),
        '/cupertino-form': (BuildContext context) => CupertinoForm()
      },
    );
  }
}

class SelectTypeOfForm extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(_title)),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            RaisedButton(
              child: Text("Material Form"),
              onPressed: () {
                Navigator.of(context).pushNamed('/material-form');
              },
            ),
            RaisedButton(
              child: Text("Cupertino Form"),
              onPressed: () {
                Navigator.of(context).pushNamed('/cupertino-form');
              },
            )
          ],
        ),
      ),
    );
  }
}
1
likes
110
pub points
68%
popularity

A powerful, extensible validator package to get validation messages based on a list of rules.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

Uploader

flrx.dev@gmail.com

License

MIT (LICENSE)

Dependencies

meta

More

Packages that depend on flrx_validator