Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
QuestionRepository:
+ refactor funzioni;
+ update data, file con cache;
+ isValid() & parse();

ViewMenu:
+ controllo nuove domande;

ViewSettings:
+ ripristino impostazione singola con doppio tap;
+ controllo nuove domande;
+ caricamento file domande personalizzato;
  • Loading branch information
mikyll committed Jul 30, 2023
1 parent d11e780 commit 5c0fed8
Show file tree
Hide file tree
Showing 12 changed files with 952 additions and 119 deletions.
18 changes: 18 additions & 0 deletions app-mobile/flutter_application/lib/model/PlatformType.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import 'dart:io';

enum PlatformType { UNKNOWN, MOBILE, DESKTOP, WEB }

PlatformType getPlatformType() {
try {
if (Platform.isAndroid || Platform.isIOS) {
return PlatformType.MOBILE;
} else if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) {
return PlatformType.DESKTOP;
}
} catch (e) {
if (e.toString().contains("Unsupported operation")) {
return PlatformType.WEB;
}
}
return PlatformType.UNKNOWN;
}
11 changes: 11 additions & 0 deletions app-mobile/flutter_application/lib/model/Utils.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'package:roquiz/persistence/QuestionRepository.dart';

class Utils {
static String getParsedDateTime(DateTime date) {
if (date == QuestionRepository.CUSTOM_DATE) {
return "personalizzato";
} else {
return "${date.day < 10 ? "0" : ""}${date.day}/${date.month < 10 ? "0" : ""}${date.month}/${date.year}, ${date.hour < 10 ? "0" : ""}${date.hour}:${date.minute < 10 ? "0" : ""}${date.minute}";
}
}
}
Loading

0 comments on commit 5c0fed8

Please sign in to comment.