m_calendar 1.2.1 copy "m_calendar: ^1.2.1" to clipboard
m_calendar: ^1.2.1 copied to clipboard

A customizable and lightweight Flutter calendar widget package supporting day and list-based selections with user-defined decorations.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:m_calendar/m_calendar.dart';
import 'package:m_calendar/provider/weekly_calendar_table_provider.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.light(useMaterial3: true),
      home: Scaffold(
        backgroundColor: const Color(0xFFF8F9FA),
        appBar: AppBar(
          title: const Text("Custom MCalendar"),
          centerTitle: false,
          backgroundColor: Colors.white,
          elevation: 1,
        ),
        body: Center(
          child: SingleChildScrollView(
            child: Padding(
              padding: const EdgeInsets.all(16.0),
              child: Column(
                children: [
                  MCalendar(
                    selectedMonth: DateTime.now(),
                    onUserPicked: (value) {
                      debugPrint('User Get: $value');
                    },
                  ),
                  MCalendar.weekly(
                    startDay: Day.sunday,
                    isRangeSelection: false,
                    selectedMonth: DateTime.now(),
                    onUserPicked: (value) {
                      debugPrint('User Get: $value');
                    },
                  ),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}
7
likes
160
points
464
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable and lightweight Flutter calendar widget package supporting day and list-based selections with user-defined decorations.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, provider

More

Packages that depend on m_calendar