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

A simple and elegant horizontal month range picker widget for Flutter.

example/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Month Range Example',
      home: Scaffold(
        appBar: AppBar(title: const Text('Month Range Picker Demo')),
        body: const Center(child: PickerDemo()),
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return ElevatedButton(
      onPressed: () async {
        DateTimeRange? result = await showDialog<DateTimeRange>(
          context: context,
          builder: (context) => CustomDateRangePicker(
            firstDate: DateTime(2022, 1, 1),
            lastDate: DateTime(2030, 12, 31),
          ),
        );
        if (result != null) {
          ScaffoldMessenger.of(context).showSnackBar(
            SnackBar(content: Text('Selected: ${result.start} → ${result.end}')),
          );
        }
      },
      child: const Text('Open Month Range Picker'),
    );
  }
}
1
likes
0
points
40
downloads

Publisher

unverified uploader

Weekly Downloads

A simple and elegant horizontal month range picker widget for Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, intl

More

Packages that depend on flutter_month_range