Skip to content

Commit

Permalink
CHANGE 0.0.9
Browse files Browse the repository at this point in the history
add UserVerse? userVerseData to VerseView because can have all fields
  • Loading branch information
rodolfogoulart committed Oct 15, 2023
1 parent 51f9bb6 commit c64166e
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .timetracker
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"total":5540,"sessions":[{"begin":"2023-08-20T12:25:12-03:00","end":"2023-08-20T12:38:21-03:00","duration":788},{"begin":"2023-08-20T12:40:44-03:00","end":"2023-08-20T12:41:29-03:00","duration":44},{"begin":"2023-08-21T09:24:56-03:00","end":"2023-08-21T09:27:24-03:00","duration":147},{"begin":"2023-08-21T10:11:41-03:00","end":"2023-08-21T10:17:06-03:00","duration":325},{"begin":"2023-08-23T14:14:46-03:00","end":"2023-08-23T14:28:54-03:00","duration":847},{"begin":"2023-08-23T16:30:40-03:00","end":"2023-08-23T16:30:41-03:00","duration":0},{"begin":"2023-08-27T10:43:01-03:00","end":"2023-08-27T10:47:34-03:00","duration":272},{"begin":"2023-08-27T10:54:48-03:00","end":"2023-08-27T10:55:20-03:00","duration":32},{"begin":"2023-09-09T22:28:25-03:00","end":"2023-09-09T22:35:03-03:00","duration":398},{"begin":"2023-09-09T22:39:43-03:00","end":"2023-09-09T22:43:27-03:00","duration":224},{"begin":"2023-09-09T22:49:05-03:00","end":"2023-09-09T22:55:39-03:00","duration":394},{"begin":"2023-09-09T23:13:58-03:00","end":"2023-09-09T23:17:07-03:00","duration":188},{"begin":"2023-09-09T23:25:12-03:00","end":"2023-09-09T23:28:30-03:00","duration":197},{"begin":"2023-09-10T12:23:28-03:00","end":"2023-09-10T12:25:33-03:00","duration":125},{"begin":"2023-09-10T12:27:14-03:00","end":"2023-09-10T12:29:56-03:00","duration":161},{"begin":"2023-09-21T16:59:02-03:00","end":"2023-09-21T17:02:56-03:00","duration":233},{"begin":"2023-09-21T18:12:44-03:00","end":"2023-09-21T18:21:32-03:00","duration":527},{"begin":"2023-09-23T08:28:38-03:00","end":"2023-09-23T08:30:43-03:00","duration":124},{"begin":"2023-09-23T12:41:19-03:00","end":"2023-09-23T12:43:26-03:00","duration":126},{"begin":"2023-09-23T16:09:10-03:00","end":"2023-09-23T16:09:12-03:00","duration":1},{"begin":"2023-10-13T17:41:28-03:00","end":"2023-10-13T17:47:55-03:00","duration":387}]}
{"total":6873,"sessions":[{"begin":"2023-08-20T12:25:12-03:00","end":"2023-08-20T12:38:21-03:00","duration":788},{"begin":"2023-08-20T12:40:44-03:00","end":"2023-08-20T12:41:29-03:00","duration":44},{"begin":"2023-08-21T09:24:56-03:00","end":"2023-08-21T09:27:24-03:00","duration":147},{"begin":"2023-08-21T10:11:41-03:00","end":"2023-08-21T10:17:06-03:00","duration":325},{"begin":"2023-08-23T14:14:46-03:00","end":"2023-08-23T14:28:54-03:00","duration":847},{"begin":"2023-08-23T16:30:40-03:00","end":"2023-08-23T16:30:41-03:00","duration":0},{"begin":"2023-08-27T10:43:01-03:00","end":"2023-08-27T10:47:34-03:00","duration":272},{"begin":"2023-08-27T10:54:48-03:00","end":"2023-08-27T10:55:20-03:00","duration":32},{"begin":"2023-09-09T22:28:25-03:00","end":"2023-09-09T22:35:03-03:00","duration":398},{"begin":"2023-09-09T22:39:43-03:00","end":"2023-09-09T22:43:27-03:00","duration":224},{"begin":"2023-09-09T22:49:05-03:00","end":"2023-09-09T22:55:39-03:00","duration":394},{"begin":"2023-09-09T23:13:58-03:00","end":"2023-09-09T23:17:07-03:00","duration":188},{"begin":"2023-09-09T23:25:12-03:00","end":"2023-09-09T23:28:30-03:00","duration":197},{"begin":"2023-09-10T12:23:28-03:00","end":"2023-09-10T12:25:33-03:00","duration":125},{"begin":"2023-09-10T12:27:14-03:00","end":"2023-09-10T12:29:56-03:00","duration":161},{"begin":"2023-09-21T16:59:02-03:00","end":"2023-09-21T17:02:56-03:00","duration":233},{"begin":"2023-09-21T18:12:44-03:00","end":"2023-09-21T18:21:32-03:00","duration":527},{"begin":"2023-09-23T08:28:38-03:00","end":"2023-09-23T08:30:43-03:00","duration":124},{"begin":"2023-09-23T12:41:19-03:00","end":"2023-09-23T12:43:26-03:00","duration":126},{"begin":"2023-09-23T16:09:10-03:00","end":"2023-09-23T16:09:12-03:00","duration":1},{"begin":"2023-10-13T17:41:28-03:00","end":"2023-10-13T17:47:55-03:00","duration":387},{"begin":"2023-10-13T19:23:30-03:00","end":"2023-10-13T19:26:34-03:00","duration":183},{"begin":"2023-10-13T20:26:31-03:00","end":"2023-10-13T20:26:31-03:00","duration":0},{"begin":"2023-10-14T20:51:31-03:00","end":"2023-10-14T20:55:18-03:00","duration":226},{"begin":"2023-10-14T21:00:31-03:00","end":"2023-10-14T21:15:56-03:00","duration":924}]}
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@
* Add [List<WordsHighlighted>? wordsHighlighted] to [VerseView]

## 0.0.8
* Add [highlight] type to the enum [TypeAttributes]
* Add [highlight] type to the enum [TypeAttributes]

## 0.0.9
* Change the VerseView to use UserVerse, all fields will be on the class
4 changes: 2 additions & 2 deletions lib/model/bible/verse/verse.content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class SubText {
String toString() => 'SubText(text: $text, attributes: $attributes)';
}

//when Generated JSON Serialization, change the tag name to refer the param
//*when Generated JSON Serialization, change the tag name to refer the param
class Content {
int seq; //sq

Expand Down Expand Up @@ -261,7 +261,7 @@ class Content {
this.paragraph,
});

///change the name of the param
//*DON'T FORGET TO CHANGE THE NAME OF THE PARAM
Map<String, dynamic> toMap() {
final result = <String, dynamic>{};

Expand Down
76 changes: 41 additions & 35 deletions lib/model/bible/verse/verse.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import 'dart:convert';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
// import 'package:flutter/material.dart';

import '../../lexico/lexico.dictionary.dart';
import '../../user/verse/user.verse.wordsHighlighted.dart';
import '../../user/verse/user.verse.dart';
// import '../../user/verse/user.verse.wordsHighlighted.dart';
import '../bible/bible.version.dart';
import '../book/book.dart';
import 'verse.content.dart';
Expand All @@ -20,7 +21,7 @@ abstract class VerseCore {

///for some type of bible version that has verses jointed
int? numberVerseEnd;
List<Content> content; //v12
List<Content> content;

String contentWithOutFormat;
VerseCore({
Expand Down Expand Up @@ -96,17 +97,20 @@ class Verse extends VerseCore {
}

class VerseView extends VerseCore {
///from user data
bool? isVerseHighlighted;
// ///from user data
// bool? isVerseHighlighted;

///from user data
Color? verseHighlightedColor;
// ///from user data
// Color? verseHighlightedColor;

///from user data
String? notes;
// ///from user data
// String? notes;

// ///from user data
// List<WordsHighlighted>? wordsHighlighted;

///from user data
List<WordsHighlighted>? wordsHighlighted;
UserVerse? userVerseData;

///from table cross reference
List<VerseCrossReference>? crossReferences;
Expand All @@ -124,10 +128,11 @@ class VerseView extends VerseCore {
required super.numberVerse,
super.numberVerseEnd, //v8
required super.contentWithOutFormat,
this.isVerseHighlighted = false,
this.verseHighlightedColor = Colors.transparent,
this.notes,
this.wordsHighlighted,
// this.isVerseHighlighted = false,
// this.verseHighlightedColor = Colors.transparent,
// this.notes,
// this.wordsHighlighted,
this.userVerseData,
this.crossReferences,
required super.content, //v12
this.strongReferences,
Expand Down Expand Up @@ -157,10 +162,11 @@ class VerseView extends VerseCore {
int? numberVerseEnd,
String? titleVerse,
String? contentWithOutFormat,
bool? isVerseHighlighted,
Color? verseHighlightedColor,
String? notes,
List<WordsHighlighted>? wordsHighlighted,
// bool? isVerseHighlighted,
// Color? verseHighlightedColor,
// String? notes,
// List<WordsHighlighted>? wordsHighlighted,
UserVerse? userVerseData,
List<VerseCrossReference>? crossReferences,
List<Content>? content, //v12
List<Lexico>? strongReferences,
Expand All @@ -175,10 +181,11 @@ class VerseView extends VerseCore {
numberVerse: numberVerse ?? this.numberVerse,
numberVerseEnd: numberVerseEnd ?? this.numberVerseEnd,
contentWithOutFormat: contentWithOutFormat ?? this.contentWithOutFormat,
isVerseHighlighted: isVerseHighlighted ?? this.isVerseHighlighted,
verseHighlightedColor: verseHighlightedColor ?? this.verseHighlightedColor,
notes: notes ?? this.notes,
wordsHighlighted: wordsHighlighted ?? this.wordsHighlighted,
userVerseData: userVerseData ?? this.userVerseData,
// isVerseHighlighted: isVerseHighlighted ?? this.isVerseHighlighted,
// verseHighlightedColor: verseHighlightedColor ?? this.verseHighlightedColor,
// notes: notes ?? this.notes,
// wordsHighlighted: wordsHighlighted ?? this.wordsHighlighted,
crossReferences: crossReferences ?? this.crossReferences,
content: content ?? this.content,
strongReferences: strongReferences ?? this.strongReferences,
Expand All @@ -192,10 +199,11 @@ class VerseView extends VerseCore {
if (identical(this, other)) return true;

return other is VerseView &&
other.isVerseHighlighted == isVerseHighlighted &&
other.verseHighlightedColor == verseHighlightedColor &&
other.notes == notes &&
listEquals(other.wordsHighlighted, wordsHighlighted) &&
// other.isVerseHighlighted == isVerseHighlighted &&
// other.verseHighlightedColor == verseHighlightedColor &&
// other.notes == notes &&
// listEquals(other.wordsHighlighted, wordsHighlighted) &&
other.userVerseData == userVerseData &&
listEquals(other.crossReferences, crossReferences) &&
listEquals(other.strongReferences, strongReferences) &&
other.book == book &&
Expand All @@ -204,18 +212,16 @@ class VerseView extends VerseCore {

@override
int get hashCode {
return isVerseHighlighted.hashCode ^
verseHighlightedColor.hashCode ^
notes.hashCode ^
wordsHighlighted.hashCode ^
crossReferences.hashCode ^
strongReferences.hashCode ^
book.hashCode ^
bibleVersion.hashCode;
return
// isVerseHighlighted.hashCode ^
// verseHighlightedColor.hashCode ^
// notes.hashCode ^
// wordsHighlighted.hashCode ^
userVerseData.hashCode ^ crossReferences.hashCode ^ strongReferences.hashCode ^ book.hashCode ^ bibleVersion.hashCode;
}

@override
String toString() {
return 'VerseView(isVerseHighlighted: $isVerseHighlighted, verseHighlightedColor: $verseHighlightedColor, notes: $notes, wordsHighlighted: $wordsHighlighted, crossReferences: $crossReferences, strongReferences: $strongReferences, book: $book, bibleVersion: $bibleVersion)';
return 'VerseView(userVerseData: $userVerseData, crossReferences: $crossReferences, strongReferences: $strongReferences, book: $book, bibleVersion: $bibleVersion)';
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: aletheia_core_model
description: Aletheia Core Model
version: 0.0.8
version: 0.0.9
homepage: https://biblealetheia.com

environment:
Expand Down

0 comments on commit c64166e

Please sign in to comment.