Buscar pacotes, repositórios e categorias de apps

Repositório GitHubhyoeun-dev/simple_date_picker

simple_date_picker

TRÊS tipos de seletores de data com estilo Cupertino

Capa do projeto simple_date_picker
Estrelas
2
Forks
0
Último push (UTC)
28 de fev. de 2025
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

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
Autor no GitHub

HYOEUN LEE ↗

LinguagensC++CCMakeDartSwiftHTMLKotlinObjective-C

Dependências usadas

Lista de dependências 3 itens

  • flutter{"sdk":"flutter"}
  • flutter_testDesenvolvimento{"sdk":"flutter"}
  • flutter_lintsDesenvolvimento^4.0.0

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

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

GitHub Docs — About repositories ↗