Pakete, Repositories und App-Kategorien suchen

GitHub-Repositoryhyoeun-dev/simple_date_picker

simple_date_picker

DREI Arten von Cupertino-stilisierten Datumsauswahllisten

Projektcover von simple_date_picker
Sterne
2
Forks
0
Letzter Push (UTC)
28.02.2025
Projektstatus
Aktiv

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

Simple Date Picker

SHOWCASE
GETTING STARTED

Run the following command in your terminal to get started

 $ flutter pub add simple_date_picker
USAGE

COMPLETE EXAMPLE is here

SET UP

Create an instance of SimpleDatePicker and define DateTimes for each picker

SimpleDatePicker simpleDatePicker = SimpleDatePicker();
DateTime yearMonthDayDateTime = DateTime.now();
DateTime yearMonthDateTime = DateTime.now();
DateTime yearDateTime = DateTime.now();
int firstYear = 1950;
int lastYear = 2050;

EXAMPLE

Align(
              alignment: Alignment.center,
              child: TextButton(
                  onPressed: () async {
                    await showCupertinoModalPopup(
                      context: context,
                      builder: (context) {
                        return simpleDatePicker.yearMonthDayPicker(
                          yearMonthDayDateTime: yearMonthDayDateTime,
                          monthCallback: (int index) {
                            setState(() {
                              yearMonthDayDateTime = DateTime(
                                  yearMonthDayDateTime.year,
                                  index + 1,
                                  yearMonthDayDateTime.day);
                            });
                          },
                          dayCallback: (int index) {
                            setState(() {
                              yearMonthDayDateTime = DateTime(
                                  yearMonthDayDateTime.year,
                                  yearMonthDayDateTime.month,
                                  index + 1);
                            });
                          },
                          yearCallback: (int index) {
                            setState(() {
                              yearMonthDayDateTime = DateTime(
                                  firstYear + index,
                                  yearMonthDayDateTime.month,
                                  yearMonthDayDateTime.day);
                            });
                          },
                          firstYear: firstYear,
                          lastYear: lastYear,
                        );
                      },
                    );
                  },
                  child: Text(
                    '${yearMonthDayDateTime.year}년 ${yearMonthDayDateTime.month}월 ${yearMonthDayDateTime.day}일',
                    style: const TextStyle(
                      fontSize: 20,
                      color: Colors.black,
                      fontWeight: FontWeight.normal,
                    ),
                  )),
            );
HYOEUN LEE GitHub avatar
GitHub-Autor

HYOEUN LEE ↗

SprachenC++CCMakeDartSwiftHTMLKotlinObjective-C

Verwendete Abhängigkeiten

Abhängigkeiten 3 Einträge

  • flutter{"sdk":"flutter"}
  • flutter_testEntwicklung{"sdk":"flutter"}
  • flutter_lintsEntwicklung^4.0.0

Wie wähle ich ein passendes Repository?

Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.

  1. Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
  2. Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
  3. Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.

Quellen und Pflege

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗