persian_flutter 0.0.4 copy "persian_flutter: ^0.0.4" to clipboard
persian_flutter: ^0.0.4 copied to clipboard

outdated

Persian Localization for Flutter.

persian_flutter #

Persian date picker, time picker and localization for flutter.

Getting Started #

A simple example on how to display a Persian datepicker.

Import the package

import 'package:persian_flutter/persian_flutter.dart';

Call the picker

RaisedButton(onPressed: () async {
    final date = await showPersianDatePicker(
      context: context,
      initialDate: DateTime.now(),
      firstDate: DateTime.now().add(
      Duration(days: -1),
      ),
      lastDate: DateTime.now().add(
      Duration(days: 90),
      ),
    );
    
    if(date != null)
    {
      // Do simething.
    }
  },
  child: Text('Show date picker'),
);