A Flutter package of datepicker like Holo Theme in Android

Overview

flutter_holo_date_picker

A Flutter package of Datepicker inspired by the Holo Theme in Android.

Getting Started

This plugins displays a Datepicker inspired by the Holo Theme in Android. based on the flutter_cupertino_date_picker package

See the example for simple use :)

Screenshots

Locales Supported

  • English (EN) United States
  • Chinese (ZH) Simplified
  • Portuguese (PT) Brazil
  • Spanish (ES)
  • Romanian (RO)
  • Bengali (BN)
  • Arabic (AR)
  • Japanese (JP)
  • Russian (RU)
  • German (DE)
  • Korea (KO)
  • Italian (IT)
  • Hungarian (HU)
  • Hebrew (HE)
  • Indonesian (ID)
  • Turkish (TR)
  • Norwegian (NO)
  • French (FR)
  • Thai (TH)
  • Lithuanian (LT)
  • Dutch (NL)
  • Haitian Creole (HT)
Comments
  • [BUG]  date changes unintended

    [BUG] date changes unintended

    When changing the year, sometimes the month gets changed to a seemingly random month. Same with month/day.

    To reproduce:

            DatePickerWidget(
                initialDate: DateTime.now(),
                firstDate: DateTime.now(),
                onChange: (value, _) {
                  print(value.toString());
                }),
    
    • select next month (Dec)
    • select next year (2021) -> february gets selected

    OR

    • select next month (Dec)
    • select first
    • select current month (Nov) -> 9th gets selected
    opened by devii21 9
  • day 1 is not recognized

    day 1 is not recognized

    when using the DatePickerWidget and scrolling the day column to the value 1, onChange is not triggered and scrolling the month will revert the day value to the last day chosen before 1, deleting the lines 308-309 of the file date_picker_widget.dart solves the issue, but I don't know if it have side effects.

    opened by mahdi-ko 5
  • DiagnosticableMixin is officially deprecated !

    DiagnosticableMixin is officially deprecated !

    After Flutter 1.20 DiagnosticableMixin is officially deprecated. So i cannot use the library and i get this error

    Error: Type 'DiagnosticableMixin' not found. class DateTimePickerTheme with DiagnosticableMixin { ^^^^^^^^^^^^^^

    I believe you just need to remove "with DiagnosticableMixin" that will fix the issue

    Thanks in Advance

    opened by mohanadshaban 5
  • February for locale TH is small size.

    February for locale TH is small size.

    https://user-images.githubusercontent.com/59549741/169683168-4638d4a2-524d-469f-ac1b-499ee676d755.mp4

    code:

    await DatePicker.showSimpleDatePicker(
        context,
        initialDate: DateTime.now(),
        dateFormat: "dd-MMMM-yyyy",
        locale: DateTimePickerLocale.th,
      );
    

    flutter doctor:

    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel stable, 3.0.0, on Microsoft Windows [Version 10.0.19044.1706], locale th-TH)
    [√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    [√] Chrome - develop for the web
    [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.5)
    [√] Android Studio (version 2021.2)
    [√] VS Code (version 1.67.2)
    [√] Connected device (3 available)
    [√] HTTP Host Availability
    
    • No issues found!
    
    opened by SittiphanSittisak 4
  • [BUG] can't select first of month

    [BUG] can't select first of month

    This bug was introduced with the newest version (0.3.0). On 0.2.3. it works as expected.

    To reproduce:

    DatePickerWidget(
                  initialDate: DateTime.now(),
                  firstDate: DateTime.now(),
                  onChange: (value, _) {
                    print(value.toString());
                  }),
    
    • select 2021-Jan-01
    • -> onChange value prints 2021-01-02

    --

    This is a very critical bug so I downgraded to 0.2.3., which introduces the old jumping date bug

    Would be highly appreciated if this could be fixed, so i can enjoy the previous bugfix 😊

    opened by devii21 4
  • Build fails on beta 1.17.0

    Build fails on beta 1.17.0

    On latest beta 1.17.0

    Compiler message:                                                       
    ../../.pub-cache/hosted/pub.dartlang.org/flutter_holo_date_picker-0.1.2+6/lib/date_picker_theme.dart:43:9: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
      const DateTimePickerTheme({                                           
            ^^^^^^^^^^^^^^^^^^^                                             
    Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
    build failed.
    

    class DateTimePickerTheme extends Diagnosticable

    should be

    class DateTimePickerTheme with Diagnosticable

    opened by tan-yaka 4
  • overwrite CupertinoPicker's default selection overlay

    overwrite CupertinoPicker's default selection overlay

    Removed default CupertinoPicker selection overlay introduced in Flutter 2 to adhere to the original design of holo date picker. Fixes #32.

    Note: the selectionOverlay property docs say to remove it one can set it to null, but there seems to be a bug in the Flutter framework itself that doesn't allow it when using null safety, so until a fix is rolled out for that issue, we're just going to have to settle for overwriting that property with an empty Container().

    Before: image

    After: image

    opened by kopasz 3
  • Weekday error

    Weekday error

    Hi, I love the flutter_holo_date_picker and use it for multiple projects.

    However, while trying to display date format of : "MM-dd(E)", widget crashes showing

    RangeError (index): Invalid value: Not in inclusive range 0..6: 7

    I was using DatePickerWidget with locale unset(to default).

    Here's my full code for the widget

    DatePickerWidget(
       looping: false, 
       firstDate: DateTime(2020, 1, 1),
       lastDate: DateTime.now(),
       initialDate: DateTime.now(),
       dateFormat: "MM-dd(E)",
       onChange: (DateTime newDate, _) =>_selectedDate = newDate,
       pickerTheme: DateTimePickerTheme(
          itemTextStyle:TextStyle(color: Colors.white, fontSize: 19),
          showTitle: false,
       ),
    ),
    

    Thanks for everything!

    opened by jnheo-md 3
  • Incorrect month selected not same on picker display

    Incorrect month selected not same on picker display

    I have found an issue first step check current date is 18 August 2022. It shows that "2022-08-18" is correct. and the second step I selected was 18 August 2023. It shows that "2023-05-18" is not correct. @kfiross

    https://user-images.githubusercontent.com/3391151/185331099-f4cbe7db-f455-4dc1-9e20-d9e3c998f5a6.mov

    opened by kullawattana 2
  • Use locale for selecting language

    Use locale for selecting language

    When handling dates in Flutter, I'm used to using the buildt-in Localizations.localeOf(context).languageCode to get the correct format on dates and so on. An example of formatting dates: DateFormat.yMMMMd(Localizations.localeOf(context).languageCode).format(value). The date is then formatted to to match the language of the device. I'd like to be able to do the same with this package, but it doesn't accept a language code string. Instead I'd have to do something like this;

    DateTimePickerLocale dateTimePickerLocale;
    
    switch (locale.languageCode) {
      case 'nb':
        dateTimePickerLocale = DateTimePickerLocale.no_nb;
        break;
      case ...
    
      default:
        dateTimePickerLocale = DateTimePickerLocale.en_us;
        break;
    }
    

    This is not a great solution, since it would have to be updated every time a language is added. It would be a much more flexible solution to let the showSimpleDatePicker method accept a language code string instead.

    opened by tverra 2
  • Add french case in localeFromString method

    Add french case in localeFromString method

    It appears that french support was implemented in l18n folder but not linked in localeFromString method.

    Before :

    print(DatePicker.localeFromString('fr')); // DateTimePickerLocale.en_us
    

    After :

    print(DatePicker.localeFromString('fr')); // DateTimePickerLocale.fr
    
    opened by areille 1
  • Implement dividerHeight and dividerThickness

    Implement dividerHeight and dividerThickness

    What does this PR do?

    Implement dividerHeight and dividerThickness to change the size of dividers.

    Usage

    DatePicker.showSimpleDatePicker(
      context,
      initialDate: DateTime(1994),
      firstDate: DateTime(1960),
      dateFormat: "dd-MMMM-yyyy",
      dividerHeight: 1.0,
      dividerThickness: 1.0,
    );
    
    opened by jenow 0
  • Numbers not aligned with `pickerHeight` set

    Numbers not aligned with `pickerHeight` set

    I've found that, after setting the attribute pickerHeight in the DateTimePickerThemeand then setting it to the DatePickerWidget's pickerTheme, the numbers (day/month/year) are not vertically aligned.

    Screenshot:

    Code:

    ...
    DateTimePickerTheme myTheme = const DateTimePickerTheme(
          pickerHeight: 200
    );
    ...
    DatePickerWidget(
        initialDate: DateTime.now(),
        lastDate: DateTime.now(),
        dateFormat: "dd-MM-yyyy",
        pickerTheme: myTheme,
    )
    

    If you slide between the items, the element gets repositioned in the middle as well:

    opened by LuisMiguelSS 0
  • How can we add year value to show the year according to my country?

    How can we add year value to show the year according to my country?

    My year is an additional 543 years from the year by A.D. I already set the locale property to my country(TH). I see the dateFormat property config this but can't add 543 years.

    I can set the initialDate property by DateTime(DateTime.now().year + 543) but it is not correct. February have 28 days and 29 days every 4 years. For the example: A.D. 2020 => 29 days in TH we add 543: 2563 => 29 days if I use DateTime(DateTime.now().year + 543), it will wrong: A.D. 2020 => 29 days TH 2563 => 28 days //2564 => 29 days

    My project saves date time with A.D. and shows with year + 543. How to add years or shows the custom year?

    I need it.

    opened by SittiphanSittisak 5
Releases(0.1.4)
Owner
Kfir Matityahu
Kfir Matityahu
A persian ( farsi ) datepicker for flutter.

Persian DatePicker & DateTime Manipulation A persian ( farsi ) datepicker for flutter. to see an example of date conversion and manipulation, refer to

null 66 Feb 23, 2022
Flutter App Change Theme With Getx and Save Theme Stage with Hive

Flutter Change app Theme With GetX Flutter App Change Theme With Getx. Theme Stage saved using Hive. instead of hive you can use get-storage or shared

Azraf Al Monzim 12 Oct 22, 2022
Raden Saleh 53 Jul 27, 2023
Deepak Sharma 149 Dec 10, 2022
Responsive Blog Theme using Flutter | Web, macOS, Android, iOS

Responsive Blog Theme using Flutter | Web, macOS, Android, iOS Watch it on YouTube Packages we are using: flutter_svg: link get: link Flutter recently

Abu Anwar 196 Dec 9, 2022
Chat messaging app for multiple users in light/dark theme with ios/android.

Chat/Messaging App Light and Dark Theme - Flutter UI Watch it on YouTube Complete Source Code (Patreon only) Packages we are using: goole_fonts: link

null 7 Dec 3, 2022
A Flutter material theme editor

Flutter Theme ⚠️ WARNING: This app is still under development so please expect bugs and missing features in the app. ⚠️ Inspired by Panache, a Flutter

null 0 Jan 2, 2022
XDG theme icons for Flutter

XDG Icons XDG theme icons for Flutter. https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html TODO api cleanup docs intern

J-P Nurmi 0 Jul 12, 2022
Flutter theme demo using riverpod and shared preferences

flutter_theme_demo A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you start

Andree Yosua 0 Dec 27, 2021
Easiest way to add support for light and dark theme in your flutter app.

Adaptive Theme Easiest way to add support for light and dark theme in your Flutter app. It allows to manually set light or dark theme and also lets yo

Birju Vachhani 287 Dec 27, 2022
🎨 Flutter Material Theme editor

?? Panache A Flutter Material Theme editor. Panache helps you to create beautiful Material themes for your Flutter applications. Customize widgets col

Erick Ghaumez 1.7k Dec 30, 2022
Panache - 🎨 Flutter Material Theme editor

?? Panache A Flutter Material Theme editor. Panache helps you to create beautiful Material themes for your Flutter applications. Customize widgets col

Erick Ghaumez 1.7k Jan 3, 2023
Extended theme - Extended themes for Flutter

Extended Theme This package will allow you to extend theming in Flutter so you c

Stephan E.G. Veenstra 5 Apr 21, 2022
Individual Flutter application with BLoC compliance on the theme of the series Rick and Morty

Rick & Morty Catalog REST Individual Flutter application with BLoC compliance on the theme of the series Rick and Morty. List of all characters in the

Maksym Koriak 8 Oct 31, 2022
Responsive Blog Theme using Flutter

Responsive Blog Theme using Flutter | Web, macOS, Android, iOS Watch it on YouTube Packages we are using: flutter_svg: link get: link Flutter recently

Rakesh Prajapat 11 Dec 25, 2022
The project of the empty template with Flutter has built the basic framework to realize the functions of internationalization, theme peeling etc.

flutter-bloc-app-template ?? The project of the empty template with Flutter has built the basic framework to realize the functions of internationaliza

Oleksii Shtanko 30 Dec 31, 2022
Consistent design with Flutter Theme

Consistent design with Flutter Theme Source code for the "Consistent design with Flutter Theme" DartPad workshop by Anna Leushchenko ??‍?? ?? ?? ????

Anna (Domashych) Leushchenko 8 Oct 31, 2022
Create flutter project with all needed configuration in two minutes (theme, localization, connect to firebase, FCM, local notifications, safe API call, error handling, animation..etc)

Flutter GetX Template Flutter Getx template to make starting project fast and easy . Introduction We all face the same problem when we want to start a

Emad Beltaje 150 Jan 7, 2023
Building a simple Flutter app * Switch Theme * for understanding the BLoC State Management including: Cubit Communications with StreamSubscription & Managing Route.

Building a simple Flutter app * Switch Theme * for understanding the BLoC State Management including: Cubit Communications with StreamSubscription & Managing Route.

TAD 1 Oct 3, 2022