Skip to content

Commit ae7d012

Browse files
authored
feat: release college algebra with Python (#1308)
1 parent 3b260c4 commit ae7d012

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

mobile-app/lib/ui/views/learn/block/block_view.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import 'package:flutter/material.dart';
22
import 'package:freecodecamp/extensions/i18n_extension.dart';
33
import 'package:freecodecamp/models/learn/curriculum_model.dart';
4-
54
import 'package:freecodecamp/service/learn/learn_service.dart';
65
import 'package:freecodecamp/ui/views/learn/block/block_viewmodel.dart';
6+
import 'package:freecodecamp/ui/views/learn/utils/learn_globals.dart';
77
import 'package:freecodecamp/ui/views/learn/widgets/download_button_widget.dart';
88
import 'package:freecodecamp/ui/views/learn/widgets/open_close_icon_widget.dart';
99
import 'package:freecodecamp/ui/views/learn/widgets/progressbar_widget.dart';
1010
import 'package:freecodecamp/ui/widgets/drawer_widget/drawer_widget_view.dart';
11-
1211
import 'package:stacked/stacked.dart';
1312

1413
class BlockView extends StatelessWidget {
@@ -38,8 +37,8 @@ class BlockView extends StatelessWidget {
3837
model,
3938
child,
4039
) {
41-
bool isCertification = block.challenges.length == 1 &&
42-
block.superBlock.dashedName != 'the-odin-project';
40+
bool isCert = block.challenges.length == 1 &&
41+
!hasNoCert.contains(block.superBlock.dashedName);
4342

4443
bool isDialogue =
4544
block.superBlock.dashedName == 'a2-english-for-developers';
@@ -52,7 +51,7 @@ class BlockView extends StatelessWidget {
5251
return Column(
5352
children: [
5453
BlockHeader(
55-
isCertification: isCertification,
54+
isCertification: isCert,
5655
block: block,
5756
model: model,
5857
),
@@ -61,11 +60,11 @@ class BlockView extends StatelessWidget {
6160
block: block,
6261
model: model,
6362
),
64-
if (model.isOpen || isCertification)
63+
if (model.isOpen || isCert)
6564
Container(
6665
color: const Color(0xFF0a0a23),
6766
child: InkWell(
68-
onTap: isCertification
67+
onTap: isCert
6968
? () async {
7069
model.routeToCertification(block);
7170
}
@@ -89,7 +88,7 @@ class BlockView extends StatelessWidget {
8988
),
9089
),
9190
),
92-
if (model.isDev && !isCertification)
91+
if (model.isDev && !isCert)
9392
DownloadButton(
9493
model: model,
9594
block: block,
@@ -102,11 +101,11 @@ class BlockView extends StatelessWidget {
102101
model,
103102
)
104103
],
105-
if (!isCertification && isStepBased && !isDialogue) ...[
104+
if (!isCert && isStepBased && !isDialogue) ...[
106105
buildDivider(),
107106
gridWidget(context, model)
108107
],
109-
if (!isStepBased && !isCertification) ...[
108+
if (!isStepBased && !isCert) ...[
110109
buildDivider(),
111110
listWidget(context, model)
112111
],
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
library global_learn;
2+
3+
// Changing values in this file will require a hot restart to take effect
4+
5+
List<String> hasNoCert = ['the-odin-project', 'college-algebra-with-python'];

0 commit comments

Comments
 (0)