Skip to content

Commit

Permalink
update function names
Browse files Browse the repository at this point in the history
  • Loading branch information
fremartini committed Nov 30, 2023
1 parent be36bbf commit f698de7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/features/session/data/models/session_details_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class SessionDetailsModel extends SessionDetails {
}

static Option<T> _parseOption<T>(
Map<String, dynamic> m,
Map<String, dynamic> jsonMap,
String key,
T Function(String) callback,
) {
if (!m.containsKey(key)) {
if (!jsonMap.containsKey(key)) {
return none();
}

final val = m[key] as String;
final val = jsonMap[key] as String;

if (val == 'null') {
return none();
Expand All @@ -43,8 +43,8 @@ class SessionDetailsModel extends SessionDetails {
return Some(callback(val));
}

static Duration _parseDuration(String s) {
final parts = s.split(':');
static Duration _parseDuration(String duration) {
final parts = duration.split(':');

final hours = int.parse(parts[0]);
final minutes = int.parse(parts[1]);
Expand Down

0 comments on commit f698de7

Please sign in to comment.