Skip to content

Commit

Permalink
chore: fix app linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jannis-baum committed Sep 27, 2022
1 parent 4b18eda commit 2da2edc
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 24 deletions.
6 changes: 2 additions & 4 deletions app/lib/common/models/medication/guideline.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:hive/hive.dart';

import '../../module.dart';

part 'guideline.g.dart';

@HiveType(typeId: 9)
Expand Down Expand Up @@ -70,7 +68,7 @@ class Guideline {

@override
int get hashCode {
return hashValues(
return Object.hash(
implication,
recommendation,
warningLevel,
Expand Down Expand Up @@ -115,7 +113,7 @@ class Phenotype {
}

@override
int get hashCode => hashValues(geneResult.name, geneSymbol.name);
int get hashCode => Object.hash(geneResult.name, geneSymbol.name);
}

@HiveType(typeId: 11)
Expand Down
2 changes: 1 addition & 1 deletion app/lib/common/models/medication/medication.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class MedicationWithGuidelines {
guidelines.contentEquals(other.guidelines);

@override
int get hashCode => hashValues(name, guidelines);
int get hashCode => Object.hash(name, guidelines);
}

List<Medication> medicationsFromHTTPResponse(Response resp) {
Expand Down
8 changes: 1 addition & 7 deletions app/lib/common/pages/medications/medication.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

import '../../l10n.dart';
import '../../models/module.dart';
import '../../theme.dart';
import '../../../common/module.dart';
import '../../utilities/pdf_utils.dart';
import '../../widgets/module.dart';
import 'cubit.dart';
import 'widgets/module.dart';
import '../../../common/module.dart';

class MedicationPage extends StatelessWidget {
const MedicationPage(
Expand Down
7 changes: 1 addition & 6 deletions app/lib/common/utilities/hive_utils.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import 'dart:convert';

// import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:hive/hive.dart';

// TODO The D4L SDK depends on an older version of tink (1.2, but up to 1.4 in testing)
// while flutter_secure_storage depends on 1.5. This causes problems, so
// use a dummy key here until someone figures out what to do
// TODO(0teh): D4L SDK and flutter_secure_storage dependency conflict, https://github.com/hpi-dhc/PharMe/issues/445.
Future<List<int>> retrieveExistingOrGenerateKey() async {
return List.filled(32, 0);
// const secureStorage = FlutterSecureStorage();
Expand Down
2 changes: 0 additions & 2 deletions app/lib/reports/pages/reports.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:flutter/services.dart';

import '../../common/module.dart';
import 'cubit.dart';

Expand Down
6 changes: 3 additions & 3 deletions app/lib/settings/chdp_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class _ChdpState extends State<ChdpListTile> with WidgetsBindingObserver {
try {
isLoggedIn = await platform.invokeMethod('isLoggedIn');
} on PlatformException catch (e) {
debugPrint('platform exception in getIsLoggedIn');
debugPrint('platform exception in getIsLoggedIn: ${e.toString()}');
}

setState(() {
Expand All @@ -70,15 +70,15 @@ class _ChdpState extends State<ChdpListTile> with WidgetsBindingObserver {
try {
await platform.invokeMethod('login');
} on PlatformException catch (e) {
debugPrint('platform exception in login');
debugPrint('platform exception in login: ${e.toString()}');
}
}

Future<void> logout() async {
try {
await platform.invokeMethod('logout');
} on PlatformException catch (e) {
debugPrint('platform exception in logout');
debugPrint('platform exception in logout: ${e.toString()}');
}
}
}
1 change: 0 additions & 1 deletion app/lib/settings/pages/settings.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:io';
import 'dart:math';

import '../../common/module.dart';
import '../chdp_state.dart';
Expand Down

0 comments on commit 2da2edc

Please sign in to comment.