scrolling_years_calendar 1.0.4 copy "scrolling_years_calendar: ^1.0.4" to clipboard
scrolling_years_calendar: ^1.0.4 copied to clipboard

outdated

A calendar widget to easily scroll through the years, allowing for customizations to fit your design.

example/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Scrolling Years Calendar',
      home: new MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => new _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text("Flutter Scrolling Calendar"),
      ),
      body: new Center(
        child: ScrollingYearsCalendar(

          // required attributes
          context: context,
          initialYear: DateTime.now().year,
          startYear: 2016,
          endYear: 2019,

          // optional attributes
          currentDayColor: Colors.blue,
          customMonthNames: ["Jan", "Feb", "Mar", "Apr", "May", 
          "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
          onMonthClick: (int year, int month) => print("Clicked $month/$year"),

        )
      ),
    );
  }
}
34
likes
0
pub points
36%
popularity

Publisher

unverified uploader

A calendar widget to easily scroll through the years, allowing for customizations to fit your design.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on scrolling_years_calendar