datetime_loop 1.2.1 copy "datetime_loop: ^1.2.1" to clipboard
datetime_loop: ^1.2.1 copied to clipboard

A Flutter package that provides a widget to listen to the system's datetime and trigger a rebuild based on the specified time unit.

Clock Example

Buy Me A Coffee
Pub BSD 3-Clause License Pub
Pub likes Pub popularity Pub points

A Flutter package that provides a widget to listen to the system's datetime and trigger a rebuild based on the specified time unit

Support the project by giving the repo a ⭐ and showing some ❤️!

Usage #

Import the package in your Dart code:

import 'package:datetime_loop/datetime_loop.dart';

Use the DateTimeLoopBuilder widget in your Flutter app:

DateTimeLoopBuilder(
  timeUnit: TimeUnit.seconds,
  builder: (context, dateTime, child) {
    return Column(
      children: [
        Container(
          width: 200,
          height: 200,
          color: Color((math.Random().nextDouble() * 0xFFFFFF).toInt()).withOpacity(1.0),
        ),
        Text('$dateTime'),
      ],
    );
  }
)

You can check more examples of using this widget here

Issues and Feedback #

Please file any issues or feedback here.

7
likes
160
points
306
downloads

Publisher

verified publishertkantira.com

Weekly Downloads

A Flutter package that provides a widget to listen to the system's datetime and trigger a rebuild based on the specified time unit.

Repository (GitHub)
View/report issues

Topics

#widget #datetime #timer

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on datetime_loop