diff --git a/frontend/lib/views/task_queue/leaderboard_submission_dialog.dart b/frontend/lib/views/task_queue/leaderboard_submission_dialog.dart index 14c938db45d3..06f35e4d441d 100644 --- a/frontend/lib/views/task_queue/leaderboard_submission_dialog.dart +++ b/frontend/lib/views/task_queue/leaderboard_submission_dialog.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:shared_preferences/shared_preferences.dart'; class LeaderboardSubmissionDialog extends StatefulWidget { - final VoidCallback? onSubmit; + final Function(String, String, String)? onSubmit; const LeaderboardSubmissionDialog({ Key? key, @@ -73,7 +73,8 @@ class _LeaderboardSubmissionDialogState if (isValid) { _saveToSharedPreferences(); - widget.onSubmit?.call(); + widget.onSubmit?.call(_teamNameController.text, _repoUrlController.text, + _commitShaController.text); } else { setState(() {}); } diff --git a/frontend/lib/views/task_queue/task_queue_view.dart b/frontend/lib/views/task_queue/task_queue_view.dart index 94477bda3c49..3243eaea6d05 100644 --- a/frontend/lib/views/task_queue/task_queue_view.dart +++ b/frontend/lib/views/task_queue/task_queue_view.dart @@ -121,7 +121,10 @@ class TaskQueueView extends StatelessWidget { showDialog( context: context, builder: (context) => LeaderboardSubmissionDialog( - onSubmit: viewModel.submitToLeaderboard, + onSubmit: (teamName, repoUrl, commitSha) { + viewModel.submitToLeaderboard( + teamName, repoUrl, commitSha); + }, ), ); },