flutter datime to tzdatetime code example
Example 1: flutter datetime format
import 'package:intl/intl.dart';
DateTime now = DateTime.now();
String formattedDate = DateFormat('yyyy-MM-dd – kk:mm').format(now);
Example 2: convert datetime to TZDateTimeflutter
var time = tz.TZDateTime.from(
scheduledNotificationDateTime,
tz.local,
);