material_calendar 0.0.6 material_calendar: ^0.0.6 copied to clipboard
Power up your Flutter app with a sleek and intuitive Material calendar experience.
import 'package:flutter/material.dart';
import 'package:material_calendar/widgets/calendar_widget.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
color: Colors.white,
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: CalendarWidget(
initalDateTime: DateTime.now(),
headerMargins: const EdgeInsets.only(
top: 50,
),
/* calendarDecorator: CalendarDecorator(
backgroundColor: Colors.white,
),
monthYearOverlayValueDecorator: CircularDecorator(
textColor: Colors.black,
selectedColor: Colors.black,
selectedTextColor: Colors.white,
), */
onTap: (DateTime dateTime) {
/* if (kDebugMode) {
print(dateTime);
} */
},
),
);
}
}