persian_horizontal_date_picker 2.0.0 copy "persian_horizontal_date_picker: ^2.0.0" to clipboard
persian_horizontal_date_picker: ^2.0.0 copied to clipboard

A customizable horizontal date picker library for Flutter. Support both jalali and gregorian dates.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Persian Horizontal Date Picker',
      theme: ThemeData(fontFamily: 'Shabnam'),
      home: Scaffold(
        appBar: AppBar(
          title: const Text("Persian Horizontal Date Picker"),
        ),
        body: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            PersianHorizontalDatePicker(
              startDate: DateTime.now(),
              endDate: DateTime.now().add(const Duration(days: 30)),
              initialSelectedDate: DateTime.now(),
              markedDates: [DateTime.now()],
              isPersianDate: true,
              datePickerHeight: 112,
              width: 84,
              verticalPadding: 12,
              radius: 56,
              backgroundColor: const Color(0xFFBBDEFB),
              selectedBackgroundColor: Colors.blue,
              onBackgroundColor: Colors.blue,
              selectedOnBackgroundColor: Colors.white,
              weekDayTextStyle: const TextStyle(fontSize: 12),
              dayTextStyle: const TextStyle(
                fontSize: 16,
                fontWeight: FontWeight.bold,
              ),
              monthTextStyle: const TextStyle(fontSize: 12),
              hasShadow: true,
              shadows: const [
                BoxShadow(
                  color: Colors.blue,
                  blurRadius: 25,
                  spreadRadius: -12,
                  offset: Offset(0, 16),
                ),
              ],
              onDateSelected: (date) {},
            ),
          ],
        ),
      ),
    );
  }
}
18
likes
150
points
10
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable horizontal date picker library for Flutter. Support both jalali and gregorian dates.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, provider, scroll_to_index, shamsi_date

More

Packages that depend on persian_horizontal_date_picker