connecting apis and changes the table design to match figma

This commit is contained in:
ashrafzarkanisala
2024-09-22 14:17:52 +03:00
parent 66f45721e5
commit f99744338c
11 changed files with 674 additions and 304 deletions

View File

@ -1,3 +1,4 @@
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
String formatDateTime(DateTime? dateTime) {
@ -9,3 +10,17 @@ String formatDateTime(DateTime? dateTime) {
return '${dateFormatter.format(dateTime)} ${timeFormatter.format(dateTime)}';
}
String formatTimeOfDayToISO(TimeOfDay time, {DateTime? currentDate}) {
final now = currentDate ?? DateTime.now();
final dateTime = DateTime(
now.year,
now.month,
now.day,
time.hour,
time.minute,
);
return dateTime.toUtc().toIso8601String();
}