Buscar pacotes, repositórios e categorias de apps

Capa de time_range_picker
Detalhes do pacotev2.3.1

time_range_picker

Um seletor de intervalo de tempo para o flutter. Este widget permite abrir um diálogo para escolher um período com hora de início e hora de término.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
6,5 mil
Curtidas
186
Pontos Pub
140

Instalar pacote

flutter pub add time_range_picker

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

Um pacote Flutter que fornece um widget de seleção de intervalo de tempo personalizável, permitindo que os usuários escolham um horário de início e fim dentro de um período especificado por meio de uma interface intuitiva em diálogo. Projetado para uso multiplataforma, suporta Android, iOS, Web, macOS, Windows e Linux. O seletor é ideal para agendamentos, reservas ou qualquer aplicativo que exija seleção precisa de intervalos de tempo. Integra-se perfeitamente a aplicativos existentes do Flutter e oferece uma interface limpa e responsiva.

Casos de uso

  • Agendamento de consultas
  • Agendamento de horários
  • Configurando temporizadores
  • Configurando durações de eventos
  • Rastrear horas de trabalho

Principais recursos

  • Seleção de horário baseada em diálogo
  • Seletor de horário inicial e final
  • Compatibilidade multiplataforma
  • UI personalizável
  • design responsivo

Indicado para

  • Aplicativos de calendário e agendamento
  • Ferramentas de rastreamento de tempo
  • Sistemas de reserva
  • plataformas de gerenciamento de eventos
  • Aplicativos de produtividade

Considerações

  • Requer Flutter SDK 2.0 ou superior
  • Personalização limitada dos intervalos de passo de tempo
  • Nenhuma validação embutida para horários sobrepostos
  • Pode ser necessário estilização adicional para o modo escuro
  • Depende de repositório externo no GitHub para atualizações

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

Time Range Picker

A time range picker for flutter.

Getting Started

Installation

Add


time_range_picker : any

to your pubspec.yaml, and run

flutter packages get

in your project's root directory.

Basic Usage
import 'package:flutter/material.dart';

import 'package:time_range_picker/time_range_picker.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.blueGrey,
        body: Center(
          child: RaisedButton(
            onPressed: () async {
              TimeRange result = await showTimeRangePicker(
                context: context,
              );
              print("result " + result.toString());
            },
            child: Text("Pure"),
          ),
        ));
  }
}
Examples
Simple

Simple

Interval

Interval

Filled Style

Filled Style

Disabled Timeframe

Disabled Timeframe

Background Widget

Background Widget

Rotated Clock

Rotated Clock

Max Duration

Max Duration

Min Duration

Min Duration

Default Widget

Default Widget

Custom Dialog

Custom Dialog

Custom Dialog iOS Style

Custom Dialog iOS Style

Parameters
type param default description
TimeOfDay start TimeOfDay.now() preselected start time
TimeOfDay end now + 3h preselected end time
TimeRange disabledTime disabled time range (this time cannot be selected)
Color disabledColor Colors.red.withOpacity(0.5) the color for the disabled section
PaintingStyle paintingStyle PaintingStyle.stroke Style of the arc (filled or stroke)
Function(TimeOfDay) onStartChange
Function(TimeOfDay) onEndChange
Duration interval Duration(minutes: 5) Minimum time steps that can be selected
String fromText "From" label for start time
String toText "To" label for end time
bool use24HourFormat true use 24 hours or am / pm
double padding 36 the padding of the ring
double strokeWidth 12 the thickness of the ring
Color strokeColor primaryColor the color of the active arc from start time to end time
double handlerRadius 12 the radius of the handler to drag the arc
Color handlerColor primaryColor the color of a handler
Color selectedColor primaryColorLight the color of a selected handler
Color backgroundColor Colors.grey[200] the color of the circle outline
Widget backgroundWidget a widget displayed in the background, use e.g. an image
int ticks number of ticks displayed
double ticksOffset 0 the offset for ticks
double ticksLength strokeWidth ticks length
double ticksWidth 1 ticks thickness
Color ticksColor Colors.white Color of ticks
bool snap false Snap time bar to interval
List labels Show labels around the circle (start at 0 hours)
double labelOffset 20 Offset of the labels
bool rotateLabels true rotate labels
bool autoAdjustLabels true flip labels if the angle woulb be upside down (only if rotate labels is active)
TextStyle labelStyle Style of the labels
TextStyle timeTextStyle TextStyle of the time texts
TextStyle activeTimeTextStyle TextStyle of the currently moving time text
bool hideTimes false hide the time texts
double clockRotation 0 rotate the clock around angle
Duration maxDuration null maximum Duration that can be picked
Duration minDuration Duration(minutes: 30) minimum Duration that can be picked
bool barrierDismissible true barrierDismissible false = user must tap button to close time range picker

Categorias

Repositório-fonte

Projetos que usam este pacote