Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
LucaCoduriV committed Sep 23, 2022
1 parent a421346 commit ad4852a
Showing 10 changed files with 9 additions and 14 deletions.
6 changes: 3 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:io';

import 'package:timezone/data/latest.dart' as tz;
import 'package:flutter/foundation.dart' as foundation;
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
@@ -15,6 +14,7 @@ import 'package:heig_front/utils/id_generator.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:intl/date_symbol_data_local.dart';
import 'package:provider/provider.dart';
import 'package:timezone/data/latest.dart' as tz;
import 'package:vrouter/vrouter.dart';
import 'package:workmanager/workmanager.dart';

@@ -84,8 +84,8 @@ Future<void> setup() async {

Workmanager().initialize(
callbackDispatcher, // The top level function, aka callbackDispatcher
isInDebugMode:
true // If enabled it will post a notification whenever the task is running. Handy for debugging tasks
isInDebugMode: !foundation
.kReleaseMode // If enabled it will post a notification whenever the task is running. Handy for debugging tasks
);
Workmanager().registerPeriodicTask(
'newGradeChecker',
2 changes: 0 additions & 2 deletions lib/models/heure_de_cours.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:get_it/get_it.dart';
import 'package:heig_front/utils/id_generator.dart';
import 'package:heig_front/utils/notification.dart' show CanNotify;
import 'package:hive_flutter/adapters.dart';
import 'package:timezone/timezone.dart';
2 changes: 0 additions & 2 deletions lib/models/horaires.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:hive_flutter/adapters.dart';
import 'package:rrule/rrule.dart';
2 changes: 1 addition & 1 deletion lib/models/notes.dart
Original file line number Diff line number Diff line change
@@ -35,6 +35,6 @@ class Note {
}

@override
int get hashCode => hashValues(
int get hashCode => Object.hash(
nom.hashCode, note.hashCode, moyenneClasse.hashCode, coef.hashCode);
}
1 change: 0 additions & 1 deletion lib/services/api/api.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:convert';
import 'dart:developer';

import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:dio/dio.dart';
2 changes: 1 addition & 1 deletion lib/services/background_tasks/check_new_grades.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:io' show Platform;

import 'package:timezone/data/latest.dart' as tz;
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
@@ -14,6 +13,7 @@ import 'package:heig_front/models/user.dart';
import 'package:heig_front/services/api/api.dart';
import 'package:heig_front/utils/constants.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:timezone/data/latest.dart' as tz;
import 'package:workmanager/workmanager.dart';

import '../../utils/asymmetric_crypt.dart';
2 changes: 1 addition & 1 deletion lib/services/providers/horaires_provider.dart
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ class HorairesProvider extends ChangeNotifier {
late Horaires _horaires;
final _box = Hive.box(BOX_HEIG);
final _api = GetIt.I.get<IAPI>();
static final int NB_SCHEDULED_NOTIFICATION = 64;
static const int NB_SCHEDULED_NOTIFICATION = 64;

HorairesProvider() {
final Horaires hiveHoraires = _box.get('horaires',
2 changes: 1 addition & 1 deletion lib/widgets/screens/login_screen.dart
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ class _LoginScreenState extends State<LoginScreen> {
OutlinedButton(
style: OutlinedButton.styleFrom(
minimumSize: const Size(100, 40),
primary: Colors.teal,
foregroundColor: Colors.teal,
side: const BorderSide(
color: Color(0xffda291c),
),
2 changes: 1 addition & 1 deletion lib/widgets/screens/settings_alert_screen.dart
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ class SettingsAlertScreen extends StatelessWidget {
Widget build(BuildContext context) {
final btnStyle = OutlinedButton.styleFrom(
minimumSize: const Size(100, 40),
primary: Colors.teal,
foregroundColor: Colors.teal,
side: const BorderSide(
color: Color(0xffda291c),
),
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.1.0
version: 1.1.1

environment:
sdk: ">=2.12.0 <3.0.0"

0 comments on commit ad4852a

Please sign in to comment.