calendar_timeline 0.2.0 copy "calendar_timeline: ^0.2.0" to clipboard
calendar_timeline: ^0.2.0 copied to clipboard

outdated

Flutter widget form select a date in horizontal timeline. You can select month and day easily.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Color(0xFF333A47),
      body: SafeArea(
        child: CalendarTimeline(
          initialDate: DateTime(2020, 2, 20),
          firstDate: DateTime(2020, 2, 15),
          lastDate: DateTime(2021, 11, 20),
          onDateSelected: (date) => print(date),
          leftMargin: 20,
          monthColor: Colors.blueGrey,
          dayColor: Colors.teal[200],
          activeDayColor: Colors.white,
          activeBackgroundDayColor: Colors.redAccent[100],
          selectableDayPredicate: (date) => date.day != 23,
        ),
      )
    );
  }
}
406
likes
0
points
1.82k
downloads

Publisher

verified publishertalhasultan.dev

Weekly Downloads

Flutter widget form select a date in horizontal timeline. You can select month and day easily.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, intl, scrollable_positioned_list

More

Packages that depend on calendar_timeline