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

outdated

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({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Time Interval Picker',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
        backgroundColor: Colors.white,
        scaffoldBackgroundColor: Colors.white,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: const MyHomePage(title: 'Time Interval Picker'),
    );
  }
}

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

  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(
        title: Text(widget.title),
      ),
      body: Padding(
        padding: const EdgeInsets.all(30),
        child: TimeIntervalPicker(
          endLimit: null,
          startLimit: null,
          onChanged: (DateTime? startTime, DateTime? endTime, bool isAllDay) {},
        ),
      ),
    );
  }
}
6
likes
80
points
158
downloads

Publisher

unverified uploader

Weekly Downloads

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