timer_builder 1.0.0+2 copy "timer_builder: ^1.0.0+2" to clipboard
timer_builder: ^1.0.0+2 copied to clipboard

outdated

A widget that rebuilds itself on Timer events

TimerBuilder #

A widget that rebuilds itself on Timer events. A duration and / or a time duration can be specified. Some cases where this widget can be useful:

  • When showing the time since or until a specified event;
  • When your model updates frequently but you want to limit UI update frequency;
  • When showing current date or time;
  • When the representation of of your UI depends on a certain time event.

Getting Started #

import 'package:timer_builder/timer_builder.dart';

class ClockWidget extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return TimerBuilder(
      periodic: Duration(seconds: 1),
      align: true,
      builder: (context) {
        return Text("${DateTime.now()}");
      }
    );
  }
  
}
156
likes
0
pub points
96%
popularity

Publisher

unverified uploader

A widget that rebuilds itself on Timer events

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on timer_builder