Skip to content

Commit 4899063

Browse files
authored
Implement all Feed UI components (#118)
* Homepage story and schedule UI implementation. * Fixed tests for feed viewmodel. Refer feed_viewmodel_test.dart for examples on how to write unit tests for the functions that use Task to call functions from the API service. Added test for failure case in stories API call. * Implemet MM articles UI and improve test coverage. This commit adds UI implementation for MM articles, changes the story component widget to match the design spec, and adds tests for Margin, Failure. Unused code and tests related to API classes have been removed. * Feed view implemented. Feed view UI components implemented: [x] Stories [x] Schedule [x] Stories this week [x] Upcoming Events Internet permission added to AndroidManifest.xml, Story component has a border gradient now. Files for exporting the files in some folders are added to make documentation generation work correctly. * Implement suggested changes. - Deleted test/.test_coverage.dart - Use Future.wait() in FeedViewmodel.initialise().
1 parent 7d7e104 commit 4899063

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+836
-434
lines changed

elaichi/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ doc/api/
1616
# If you don't generate coverage info locally you can remove this line.
1717
coverage/
1818

19+
test/.test_coverage.dart
20+
1921
# Avoid committing generated Javascript files:
2022
*.dart.js
2123
*.info.json # Produced by the --dump-info flag.

elaichi/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ if (flutterVersionName == null) {
2424
apply plugin: 'com.android.application'
2525
apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27+
apply plugin: 'com.google.gms.google-services'
2728

2829
def keyStoreProperties = new Properties()
2930
def keyStorePropertiesFile = rootProject.file('key.properties')

elaichi/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="org.dscnitrourkela.elaichi">
3+
<uses-permission android:name="android.permission.INTERNET" />
34
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
45
calls FlutterMain.startInitialization(this); in its onCreate method.
56
In most cases you can leave this as-is, but you if you want to provide

elaichi/android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ buildscript {
88
dependencies {
99
classpath 'com.android.tools.build:gradle:3.5.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11+
classpath 'com.google.gms:google-services:4.3.4'
1112
}
1213
}
1314

2.62 KB
Binary file not shown.

elaichi/assets/images/dsc.png

-13.4 KB
Binary file not shown.

elaichi/assets/translations/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"welcome": "Welcome to NITR Central",
44
"homeTitle": "Your Feed",
55
"timeTable": "Timetable",
6-
"openCalendar": "Open Calendar"
6+
"openCalendar": "Open Calendar",
7+
"thisWeekTitle": "Stories This Week"
78
}

elaichi/lib/app/colors.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class AppColors {
1818
static const Color darkAnnouncementDocBackground =
1919
Color.fromRGBO(238, 109, 109, 0.05);
2020
static const Color unselectedIconColor = Color.fromRGBO(196, 196, 196, 1.0);
21+
static const Color cardHeader = Color.fromRGBO(79, 79, 79, 1.0);
2122

2223
//icons
2324
static const Color calendarIcon = Color.fromRGBO(47, 128, 237, 1.0);

elaichi/lib/app/icons.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import 'package:flutter/widgets.dart';
2+
3+
/// Contains all custom icons used in the app.
4+
class AppIcons {
5+
AppIcons._();
6+
7+
static const _kAvenueFont = 'Avenue';
8+
9+
/// Monday Morning icon data.
10+
static const IconData mmIcon = IconData(0xe500, fontFamily: _kAvenueFont);
11+
12+
/// Feed icon for BottomNavigationBar.
13+
static const IconData feed = IconData(0xe902, fontFamily: _kAvenueFont);
14+
15+
/// Explore icon for BottomNavigationBar.
16+
static const IconData explore = IconData(0xe901, fontFamily: _kAvenueFont);
17+
18+
/// Campus icon for BottomNavigationBar.
19+
static const IconData campus = IconData(0xe900, fontFamily: _kAvenueFont);
20+
}

elaichi/lib/app/locator.config.dart

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)