flutter_advanced_calendar 1.2.0 copy "flutter_advanced_calendar: ^1.2.0" to clipboard
flutter_advanced_calendar: ^1.2.0 copied to clipboard

An advanced calendar provides a rich API for widget customization that opens a new look and feel in your app.

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  const MyApp({Key key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _calendarControllerToday = AdvancedCalendarController.today();
  final _calendarControllerCustom =
      AdvancedCalendarController.custom(DateTime(2021, 2, 16));
  final List<DateTime> events = [
    DateTime.utc(2021, 08, 10, 12),
    DateTime.utc(2021, 08, 11, 12)
  ];
  @override
  Widget build(BuildContext context) {
    final theme = Theme.of(context);

    return MaterialApp(
      theme: ThemeData.light(),
      darkTheme: ThemeData.dark(),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Advanced Calendar Example'),
        ),
        body: Column(
          mainAxisSize: MainAxisSize.max,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            AdvancedCalendar(
              controller: _calendarControllerToday,
              events: events,
              startWeekDay: 1,
            ),
            Theme(
              data: ThemeData.light().copyWith(
                textTheme: ThemeData.light().textTheme.copyWith(
                      subtitle1: ThemeData.light().textTheme.subtitle1.copyWith(
                            fontSize: 16,
                            color: theme.colorScheme.secondary,
                          ),
                      bodyText1: ThemeData.light().textTheme.bodyText1.copyWith(
                            fontSize: 14,
                            color: Colors.black54,
                          ),
                      bodyText2: ThemeData.light().textTheme.bodyText1.copyWith(
                            fontSize: 12,
                            color: Colors.black87,
                          ),
                    ),
                primaryColor: Colors.red,
                highlightColor: Colors.yellow,
                disabledColor: Colors.green,
              ),
              child: AdvancedCalendar(
                controller: _calendarControllerCustom,
                events: events,
                weekLineHeight: 48.0,
                startWeekDay: 1,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
57
likes
0
pub points
89%
popularity

Publisher

verified publisheralexmelnyk.io

An advanced calendar provides a rich API for widget customization that opens a new look and feel in your app.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

flutter, flutter_lints, intl

More

Packages that depend on flutter_advanced_calendar