heatmap_calendar 1.2.8
heatmap_calendar: ^1.2.8 copied to clipboard

Flutter Android iOS Linux macOS web Windows

A Heat Map Calendar based on Github's contributions chart which can be used to visualize values over time

example/main.dart

import 'package:flutter/material.dart';
import 'package:heatmap_calendar/heatmap_calendar.dart';
import 'package:heatmap_calendar/time_utils.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: SafeArea(
          child: HeatMapCalendar(
            input: {
              TimeUtils.removeTime(DateTime.now().subtract(Duration(days: 3))): 5,
              TimeUtils.removeTime(DateTime.now().subtract(Duration(days: 2))): 35,
              TimeUtils.removeTime(DateTime.now().subtract(Duration(days: 1))): 14,
              TimeUtils.removeTime(DateTime.now()): 5,
            },
            colorThresholds: {
              1: Colors.green[100],
              10: Colors.green[300],
              30: Colors.green[500]
            },
            weekDaysLabels: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
            monthsLabels: [
              "",
              "Jan",
              "Feb",
              "Mar",
              "Apr",
              "May",
              "Jun",
              "Jul",
              "Aug",
              "Sep",
              "Oct",
              "Nov",
              "Dec",
            ],
            squareSize: 20.0,
            textOpacity: 0.3,
            labelTextColor: Colors.blueGrey,
            dayTextColor: Colors.blue[500],
          ),
        ),
      ),
    );
  }
}
26
likes
100
pub points
82%
popularity

A Heat Map Calendar based on Github's contributions chart which can be used to visualize values over time

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

pedrohenriqueff@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on heatmap_calendar