23 lines
724 B
Dart
23 lines
724 B
Dart
import '../model/voice_to_text_model.dart';
|
|
import 'base_repository.dart';
|
|
|
|
class VoiceToTextRepository extends BaseRepository {
|
|
VoiceToTextRepository({required super.dio});
|
|
|
|
Future<List<VoiceToTextModel>> listRiwayatRekamanRepo({
|
|
required String host,
|
|
required String userId,
|
|
}) async {
|
|
// final service = "${Constant.baseUrl}xauth/login";
|
|
final service = "http://${host}/one-api/scan-ktp/Voicetotext/listRiwayatRekaman";
|
|
final resp = await post(param: {"userId": userId}, service: service);
|
|
|
|
final result = List<VoiceToTextModel>.empty(growable: true);
|
|
resp['data'].forEach((e) {
|
|
final model = VoiceToTextModel.fromJson(e);
|
|
result.add(model);
|
|
});
|
|
|
|
return result;
|
|
}
|
|
} |