date_format_field 0.0.1 copy "date_format_field: ^0.0.1" to clipboard
date_format_field: ^0.0.1 copied to clipboard

outdated

An automatic date formater widget.

example/lib/main.dart

import 'package:date_format_field/date_format_field.dart';
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Date Format Field',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Date Formater field'),
      ),
      body: SafeArea(
          child: SingleChildScrollView(
        child: Padding(
          padding: const EdgeInsets.symmetric(horizontal: 20),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: const [
              SizedBox(height: 20),
              Text('Date Formater field'),
              DateFormatField(
                type: DateFormatType.type4,
                decoration: InputDecoration(
                    hintText: 'DD/MM/YY',
                    border: InputBorder.none,
                    icon: Icon(Icons.calendar_month)),
              )
            ],
          ),
        ),
      )),
    );
  }
}
14
likes
0
points
652
downloads

Publisher

unverified uploader

Weekly Downloads

An automatic date formater widget.

License

unknown (license)

Dependencies

flutter

More

Packages that depend on date_format_field