RelativeDateTimeBuilder.now constructor

RelativeDateTimeBuilder.now({
  1. required Widget builder(
    1. RelativeDateTime relativeDateTime,
    2. String formatted
    ),
  2. required DateTime date,
})

Creates a RelativeDateTimeBuilder, whose provided DateTime will always be relative to the current timestamp.

Implementation

factory RelativeDateTimeBuilder.now({
  required Widget Function(
    RelativeDateTime relativeDateTime,
    String formatted,
  )
      builder,
  required DateTime date,
}) {
  return RelativeDateTimeBuilder(
    builder: builder,
    date: DateTime.now(),
    other: date,
  );
}