Skip to content

Commit e50d80b

Browse files
Don't use runtimeType to check map types
1 parent 005abf1 commit e50d80b

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

lib/models/bibles/oet_lv_bible.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class OETLiteralBibleImpl extends JsonToBible with OETBaseMixin {
4040
for (var innerMap in item[key]) {
4141
if (innerMap is Map) {
4242
if (innerMap.containsKey('s1')) {
43-
if (innerMap['s1'].runtimeType == String) {
43+
if (innerMap['s1'] is String) {
4444
sectionText = innerMap['s1'];
4545
isSection = true;
4646
}
@@ -151,11 +151,11 @@ class OETLiteralBibleImpl extends JsonToBible with OETBaseMixin {
151151
// Note: we remove numbers and markings related to links for now
152152
String verseText;
153153

154-
verseText = item[key];
155-
// .replaceAll(RegExp(r'¦([0-9])*\d+'), '')
156-
// .replaceAll(' +', ' ')
157-
// .replaceAll('>', ' ')
158-
// .replaceAll('=', ' ');
154+
verseText = item[key]
155+
.replaceAll(RegExp(r'¦([0-9])*\d+'), '')
156+
.replaceAll(' +', ' ')
157+
.replaceAll('>', ' ')
158+
.replaceAll('=', ' ');
159159

160160
wordSpans.add(TextSpan(text: verseText));
161161

lib/models/bibles/oet_rv_bible.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class OETReadersBibleImpl extends JsonToBible with OETBaseMixin {
4343
for (var innerMap in item[key]) {
4444
if (innerMap is Map) {
4545
if (innerMap.containsKey('s1')) {
46-
if (innerMap['s1'].runtimeType == String) {
46+
if (innerMap['s1'] is String) {
4747
sectionText = innerMap['s1'];
4848
isSection = true;
4949
}
@@ -174,7 +174,7 @@ class OETReadersBibleImpl extends JsonToBible with OETBaseMixin {
174174
for (var innerMap in item[key]) {
175175
if (innerMap is Map) {
176176
if (innerMap.containsKey('s1')) {
177-
if (innerMap['s1'].runtimeType == String) {
177+
if (innerMap['s1'] is String) {
178178
sectionText = innerMap['s1'];
179179
isSection = true;
180180
}
@@ -212,11 +212,11 @@ class OETReadersBibleImpl extends JsonToBible with OETBaseMixin {
212212
// Note: we remove numbers and markings related to links for now
213213
String verseText;
214214

215-
verseText = item[key];
216-
// .replaceAll(RegExp(r'¦([0-9])*\d+'), '')
217-
// .replaceAll(' +', ' ')
218-
// .replaceAll('>', ' ')
219-
// .replaceAll('=', ' ');
215+
verseText = item[key]
216+
.replaceAll(RegExp(r'¦([0-9])*\d+'), '')
217+
.replaceAll(' +', ' ')
218+
.replaceAll('>', ' ')
219+
.replaceAll('=', ' ');
220220

221221
wordSpans.add(TextSpan(text: verseText));
222222

0 commit comments

Comments
 (0)