flutter_form_builder_nepali_date_picker 0.0.8 copy "flutter_form_builder_nepali_date_picker: ^0.0.8" to clipboard
flutter_form_builder_nepali_date_picker: ^0.0.8 copied to clipboard

A package that supports nepali date picker in flutter form builder

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:flutter_form_builder_nepali_date_picker/flutter_form_builder_nepali_date_picker.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final GlobalKey<FormBuilderState> _fbKey = GlobalKey<FormBuilderState>();
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'My First Flutter App',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('My First Flutter App'),
        ),
        body: FormBuilder(
          key: _fbKey,
          child: Column(children: <Widget>[
            const FormBuilderNepaliDatePicker(
              style: TextStyle(color: Colors.black, fontSize: 20),
              name: 'date',
              decoration: InputDecoration(labelText: 'Date'),
            ),
            FormBuilderTextField(
              name: 'name',
              decoration: const InputDecoration(labelText: 'Name'),
            ),
            FormBuilderTextField(
              name: 'email',
              decoration: const InputDecoration(labelText: 'Email'),
            ),
            FormBuilderTextField(
              name: 'password',
              decoration: const InputDecoration(labelText: 'Password'),
            ),
            FormBuilderCheckbox(
              name: 'accept_terms',
              title: const Text('Accept Terms'),
            ),
            ElevatedButton(
                onPressed: () {
                  if (_fbKey.currentState!.saveAndValidate()) {
                    print(_fbKey.currentState!.value);
                  }
                },
                child: const Text('Submit'))
          ]),
        ),
      ),
    );
  }
}
2
likes
150
points
54
downloads

Publisher

verified publisheracharyaprajwal.com.np

Weekly Downloads

A package that supports nepali date picker in flutter form builder

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_form_builder, nepali_date_picker

More

Packages that depend on flutter_form_builder_nepali_date_picker