StringToDateTimeConverter class
Comprehensive collection of converters for time-related objects.
This file contains bi-directional converters for:
- Custom time objects: LocalDateTime, LocalDate, LocalTime, ZoneId, ZonedDateTime
- Dart built-in objects: DateTime, Duration
- String representations and parsing
- Epoch milliseconds and timestamps
- Cross-conversions between different time types
All converters follow the standard converter pattern with proper error handling, null safety, and comprehensive documentation. Converts String to DateTime using DateTime.parse()
Supports ISO 8601 format and other standard DateTime string formats.
Example:
final converter = StringToDateTimeConverter();
final dateTime = converter.convert('2023-12-25T15:30:00Z');
- Implemented types
-
- Converter<
S, T>
- Converter<
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
convert(
String input) → DateTime -
A generic interface for converting an input of type
Sinto an output of typeT.override -
getPackageName(
) → String -
Represents an abstraction for identifying the package that an object,
resource, or service belongs to.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited