import 'package:intl/intl.dart'; class ApiException implements Exception { final String? message; ApiException({this.message}); @override String toString() { DateTime now = DateTime.now(); final id = DateFormat('MMMdyyyyhhmmss').format(now); if (message == null) return "Exception"; return "$id|ERRO: $message"; } }