horizontal_calendar 1.0.2 copy "horizontal_calendar: ^1.0.2" to clipboard
horizontal_calendar: ^1.0.2 copied to clipboard

outdated

A flutter plugin to show horizontal view of calendar with date picker.

example/lib/main.dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:horizontal_calendar/horizontal_calendar.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Horizontal Calendar Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Horizontal Calendar Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({
    Key? key,
    this.title,
  }) : super(key: key);

  final String? title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title!),
      ),
      body: HorizontalCalendar(
        date: DateTime.now().add(const Duration(days: 1)),
        initialDate: DateTime.now().subtract(const Duration(days: 2)),
        textColor: Colors.black,
        backgroundColor: Colors.white,
        selectedColor: Colors.orange,
        showMonth: true,
        onDateSelected: (date) {
          if (kDebugMode) {
            print(date.toString());
          }
        },
      ),
    );
  }
}
18
likes
0
points
902
downloads

Publisher

verified publisherbeetechsolution.com

Weekly Downloads

A flutter plugin to show horizontal view of calendar with date picker.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, intl, nepali_utils

More

Packages that depend on horizontal_calendar