Skip to content

Commit

Permalink
Merge pull request #80 from Eugene600/ask_Me
Browse files Browse the repository at this point in the history
Ask me after running flutter analyze
  • Loading branch information
IamMuuo authored Sep 9, 2024
2 parents 9ad3b02 + 007847b commit b8ee359
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/tools/ask_me/controllers/controllers.dart
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export 'files_controller.dart';
export 'quizSettings_controller.dart';
export 'quiz_settings_controller.dart';
4 changes: 2 additions & 2 deletions lib/tools/ask_me/models/models.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export 'core/question.dart';
export 'core/quiz.dart';
export 'core/askMeFiles.dart';
export 'core/askme_files.dart';
export 'core/files_model_helper.dart';
export 'core/askMeScores.dart';
export 'core/askme_scores.dart';
export 'core/scores_model_helper.dart';
export 'core/multiple_choice.dart';
export 'core/true_false.dart';
Expand Down
3 changes: 2 additions & 1 deletion lib/tools/ask_me/models/services/askme_service.dart.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'dart:convert';
import 'package:academia/exports/barrel.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http;
Expand All @@ -23,6 +22,8 @@ class AskMeService {
while comment the userId gotten from the userController since there is an issue
at the moment on the backend since the backend does not expect the current number
of characters for the user id which is 32 which is a really large number.
This the error I am getting:
Error: {"user_id":["Ensure this field has no more than 12 characters."]}
The above issue is currently being fixed though.
*/
try {
Expand Down
2 changes: 0 additions & 2 deletions lib/tools/ask_me/pages/askme_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class AskMeHome extends StatefulWidget {

class _AskMeHomeState extends State<AskMeHome> {
TextEditingController titleController = TextEditingController();
final QuizSettingsController timerController =
Get.put(QuizSettingsController());
final FilesController filesController = Get.put(FilesController());

@override
Expand Down
10 changes: 5 additions & 5 deletions lib/tools/ask_me/pages/modal_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import 'package:path/path.dart' as path;


class ModalContent extends StatefulWidget {
int? id;
String? title;
String? filepath;
int? avgScore;
ModalContent({
final int? id;
final String? title;
final String? filepath;
final int? avgScore;
const ModalContent({
super.key,
this.id,
this.title,
Expand Down
3 changes: 1 addition & 2 deletions lib/tools/ask_me/pages/question_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ class _QuestionScreenState extends State<QuestionScreen> {
@override
void initState() {
super.initState();
_totalTime = quizSettingsController.minute.value * 60 +
quizSettingsController.seconds.value; // use minutes and seconds
_totalTime = quizSettingsController.minute.value * 60 + quizSettingsController.seconds.value; // use minutes and seconds
_timeLeft = _totalTime;

_timer = Timer.periodic(const Duration(seconds: 1), (timer) {
Expand Down
6 changes: 3 additions & 3 deletions lib/tools/ask_me/widgets/choice_widget.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:academia/tools/ask_me/controllers/quizSettings_controller.dart';
import 'package:academia/tools/ask_me/controllers/quiz_settings_controller.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class ChoiceWidget extends StatelessWidget {
String label;
bool multipleChoice;
final String label;
final bool multipleChoice;
ChoiceWidget({super.key, required this.label, required this.multipleChoice});

final QuizSettingsController settingsController = Get.put(QuizSettingsController());
Expand Down

0 comments on commit b8ee359

Please sign in to comment.