sendFiles static method

Future<void> sendFiles({
  1. required List<String> filesPath,
  2. required BuildContext context,
  3. required dynamic sendFileMessage({
    1. required String filePath,
    }),
})

Implementation

static Future<void> sendFiles({
  required List<String> filesPath,
  required BuildContext context,
  required Function({required String filePath}) sendFileMessage,
}) async {
  for (final filePath in filesPath) {
    await sendFileMessage(filePath: filePath);
    await Future.delayed(const Duration(microseconds: 300));
  }
}