date_time_formatter 0.0.2+2 copy "date_time_formatter: ^0.0.2+2" to clipboard
date_time_formatter: ^0.0.2+2 copied to clipboard

This have only one format for the time

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Date Time Formatter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Date Time Formatter Demo'),
    );
  }
}

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(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(

          /// remove null and pass your timestamp object in here to format it
          child: TimeFormatter(
        /// ToDo: pass your timestamp object
        time: null,
      )),
    );
  }
}
1
likes
120
pub points
56%
popularity

Publisher

unverified uploader

This have only one format for the time

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on date_time_formatter