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

outdated

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

example/lib/main.dart

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

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

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

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Flutter Scrolling Calendar'),
      ),
      body: Center(
        child: ScrollingYearsCalendar(
          // Required properties
          context: context,
          initialDate: DateTime.now(),
          firstDate: DateTime.now().subtract(Duration(days: 5 * 365)),
          lastDate: DateTime.now(),

          // Optional properties
          todayColor: Colors.blue,
          monthNames: const <String>[
            'Jan',
            'Feb',
            'Mar',
            'Apr',
            'May',
            'Jun',
            'Jul',
            'Aug',
            'Sep',
            'Oct',
            'Nov',
            'Dec',
          ],
          onMonthTap: (int year, int month) => print('Tapped $month/$year'),
        ),
      ),
    );
  }
}
34
likes
0
pub points
37%
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