date_time_manipulation 0.0.1 copy "date_time_manipulation: ^0.0.1" to clipboard
date_time_manipulation: ^0.0.1 copied to clipboard

A Flutter package that provides elegant and user-friendly widgets for date and time manipulation, including current time display and date picker functionality.

example/main.dart

import 'package:date_time_manipulation/date_time_manipulation.dart';
import 'package:date_time_manipulation/src/date_time_now_widget.dart';
import 'package:flutter/material.dart';


void main() => runApp(const DateTimeExampleApp());

class DateTimeExampleApp extends StatefulWidget {
  const DateTimeExampleApp({super.key});

  @override
  State<DateTimeExampleApp> createState() => _DateTimeExampleAppState();
}

class _DateTimeExampleAppState extends State<DateTimeExampleApp> {
  DateTime? _pickedDate;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Date & Time Demo',
      home: Scaffold(
        appBar: AppBar(title: const Text('Date & Time Package')),
        body: SingleChildScrollView(
          child: Column(
            children: [
              const SizedBox(height: 20),
              const TimeNowWidget(),
              const SizedBox(height: 20),
              PrettyDatePicker(
                onDateSelected: (date) {
                  setState(() => _pickedDate = date);
                },
              ),
              if (_pickedDate != null) ...[
                const SizedBox(height: 16),
                Text(
                  "Relative: ${RelativeTimeFormatter.timeAgo(_pickedDate!)}",
                  style: const TextStyle(fontSize: 18),
                ),
              ]
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
130
points
25
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides elegant and user-friendly widgets for date and time manipulation, including current time display and date picker functionality.

License

MIT (license)

Dependencies

flutter, intl

More

Packages that depend on date_time_manipulation