smart_date_field_picker 1.1.2 copy "smart_date_field_picker: ^1.1.2" to clipboard
smart_date_field_picker: ^1.1.2 copied to clipboard

Customizable Flutter date picker with calendar overlay, keyboard navigation, dynamic ranges, and appearance customization.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Smart Date FieldPicker Example',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(
          seedColor: Colors.deepPurple,
          primary: Colors.deepPurple,
        ),
        appBarTheme: const AppBarTheme(backgroundColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  DateTime? initDate;
  final _form = GlobalKey<FormState>();
  OverlayPortalController controller = OverlayPortalController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Form(
        key: _form,
        child: Column(
          children: [
            Expanded(
              child: SmartDateFieldPicker(
                pickerDecoration: PickerDecoration(width: 270),
                initialDate: initDate,
                controller: controller,
                onDateSelected: (value) {
                  setState(() {
                    initDate = value ?? DateTime.now();
                  });
                },
              ),
            ),
          ],
        ),
      ),
    );
  }
}
7
likes
160
points
56
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Customizable Flutter date picker with calendar overlay, keyboard navigation, dynamic ranges, and appearance customization.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, intl, mask_text_input_formatter

More

Packages that depend on smart_date_field_picker