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

Iranian (persian,farsi,shamsi,jalali) datetime picker with cupertino style and responsive ui.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:ir_datetime_picker/ir_datetime_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: 'Example',
      theme: ThemeData(fontFamily: "IranSans"),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  String _date = "Null";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            Text("Date: $_date"),
            ElevatedButton(
              child: const Text("PickDate"),
              onPressed: () async {
                Jalali? datePicked = await showIRDatePickerRoute(context);
                if (datePicked != null) {
                  setState(() {
                    _date = "${datePicked.year}/${datePicked.month}/${datePicked.day}";
                  });
                }
              },
            ),
          ],
        ),
      ),
    );
  }
}
18
likes
150
points
214
downloads

Publisher

unverified uploader

Weekly Downloads

Iranian (persian,farsi,shamsi,jalali) datetime picker with cupertino style and responsive ui.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, shamsi_date

More

Packages that depend on ir_datetime_picker