select_range_date 0.0.3 copy "select_range_date: ^0.0.3" to clipboard
select_range_date: ^0.0.3 copied to clipboard

A new Flutter package for select range date.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}
class MyApp extends StatefulWidget {

  const MyApp({Key? key}) : super(key: key);
  @override
  State<MyApp> createState() => _MyAppState();
}


class _MyAppState extends State<MyApp> {

  final DateTime startDate = DateTime.now().subtract(const Duration(days: 7));
  final DateTime endDate = DateTime.now();
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Select Range Date Example'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: () async {
              SelectRangeDate.show(
                startDate: startDate,
                endDate: endDate,
                onApplyClick: (DateTime startDate, DateTime endDate) {
                  print('Start Date: $startDate');
                  print('End Date: $endDate');
                },
              );
            },
            child: const Text('Select Range Date'),
          ),
        ),
      ),
    );
  }}
1
likes
120
points
38
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter package for select range date.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, get, intl, modal_bottom_sheet

More

Packages that depend on select_range_date