time_interval_picker 0.0.3 copy "time_interval_picker: ^0.0.3" to clipboard
time_interval_picker: ^0.0.3 copied to clipboard

Integrate a Custom Time Interval Picker with ease in your dart code.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:time_interval_picker/time_interval_picker.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Time Interval Picker',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(
          seedColor: Colors.blue,
          primary: Colors.blue,
          brightness: Brightness.dark,
          background: Colors.white,
        ),
        useMaterial3: true,
        scaffoldBackgroundColor: Colors.white,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: const MyHomePage(title: 'Time Interval Picker'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.primary,
        title: Text(widget.title, style: const TextStyle(color: Colors.white)),
      ),
      body: Padding(
        padding: const EdgeInsets.all(30),
        child: TimeIntervalPicker(
          endLimit: null,
          startLimit: null,
          onChanged: (DateTime? startTime, DateTime? endTime, bool isAllDay) {
            print(startTime);
            print(endTime);
            print(isAllDay);
          },
        ),
      ),
    );
  }
}
copied to clipboard
6
likes
150
points
180
downloads

Publisher

unverified uploader

Weekly Downloads

2024.08.30 - 2025.03.14

Integrate a Custom Time Interval Picker with ease in your dart code.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

equatable, flutter, flutter_bloc, intl

More

Packages that depend on time_interval_picker