Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
4 changes: 2 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
id "com.android.application" version "8.5.0" apply false
id "org.jetbrains.kotlin.android" version "2.1.20" apply false
}

include ":app"
17 changes: 12 additions & 5 deletions lib/features/discharge/data/models/discharge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class StudentDischarge {

factory StudentDischarge.fromJson(Map<String, dynamic> json) {
return StudentDischarge(
sitBc: (json['sitBc'] as int?) == 1,
sitBrs: (json['sitBrs'] as int?) == 1,
sitDep: (json['sitDep'] as int?) == 1,
sitBf: (json['sitBf'] as int?) == 1,
sitRu: (json['sitRu'] as int?) == 1,
sitDep: toBool((json['sitDep'])),
sitBf: toBool(json['sitBf']),
sitBc: toBool(json['sitBc']),
sitRu: toBool(json['sitRu']),
sitBrs: toBool(json['sitBrs']),
);
}

Expand All @@ -33,3 +33,10 @@ class StudentDischarge {
};
}
}

bool toBool(dynamic value) {
if (value is bool) return value;
if (value is int) return value == 1;
if (value is String) return value.toLowerCase() == 'true' || value == '1';
return false; // default fallback
}
8 changes: 0 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "9.1.0"
flutter_dotenv:
dependency: "direct dev"
description:
name: flutter_dotenv
sha256: b7c7be5cd9f6ef7a78429cabd2774d3c4af50e79cb2b7593e3d5d763ef95c61b
url: "https://pub.dev"
source: hosted
version: "5.2.1"
flutter_lints:
dependency: "direct dev"
description:
Expand Down
2 changes: 0 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ dev_dependencies:

flutter_lints: ^5.0.0

flutter_dotenv: ^5.2.1

flutter:
uses-material-design: true
generate: true
Expand Down
Loading