mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
Update Leaderboard Submission Dialog to Pass Parameters to ViewModel
This commit updates the Leaderboard Submission Dialog to pass the team name, repository URL, and commit SHA as parameters to the submitToLeaderboard function in the SkillTreeViewModel. These changes ensure that the dialog and the ViewModel are aligned in terms of parameter requirements, facilitating efficient and accurate leaderboard submissions.
This commit is contained in:
@@ -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(() {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user