diff --git a/.env.example b/.env.example deleted file mode 100644 index b6d758a..0000000 --- a/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -BASE_URL_DEV = -BASE_URL_PROD = "" \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..385f27a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive" +} diff --git a/android/app/build.gradle b/android/app/build.gradle index 69f8d85..6a6d7bd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -8,7 +8,7 @@ if (localPropertiesFile.exists()) { def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") + throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') diff --git a/lib/app_wrapper.dart b/lib/app_wrapper.dart index 9a1f9f4..a6945fe 100644 --- a/lib/app_wrapper.dart +++ b/lib/app_wrapper.dart @@ -122,7 +122,7 @@ A new version of this app available on the store, please update into the newer v Text( 'by RISTEK Fasilkom UI', style: FontTheme.poppins14w500white(), - ) + ), ], ), ), diff --git a/lib/features/home/presentation/pages/_pages.dart b/lib/features/home/presentation/pages/_pages.dart index 5df60b9..24cb8f2 100644 --- a/lib/features/home/presentation/pages/_pages.dart +++ b/lib/features/home/presentation/pages/_pages.dart @@ -15,6 +15,7 @@ import 'package:ulaskelas/features/home/presentation/widgets/_widgets.dart'; import 'package:ulaskelas/features/matkul/form/domain/entities/query_review.dart'; import 'package:ulaskelas/features/matkul/search/presentation/widgets/_widgets.dart'; import 'package:ulaskelas/features/matkul/search/presentation/widgets/skeleton_card_course.dart'; +import 'package:ulaskelas/services/_services.dart'; part 'home_daftar_matkul_page.dart'; part 'home_daftar_ulasan_page.dart'; diff --git a/lib/features/home/presentation/pages/home_daftar_ulasan_page.dart b/lib/features/home/presentation/pages/home_daftar_ulasan_page.dart index 0edbbcd..0220023 100644 --- a/lib/features/home/presentation/pages/home_daftar_ulasan_page.dart +++ b/lib/features/home/presentation/pages/home_daftar_ulasan_page.dart @@ -75,6 +75,7 @@ class _HomeDaftarUlasanPageState extends BaseStateful { review.course!, review.courseCode!, ); + MixpanelService.track('view_my_review'); }, ); }, diff --git a/lib/features/home/presentation/pages/home_page.dart b/lib/features/home/presentation/pages/home_page.dart index 92f13a6..55fd5df 100644 --- a/lib/features/home/presentation/pages/home_page.dart +++ b/lib/features/home/presentation/pages/home_page.dart @@ -110,7 +110,7 @@ class _HomePageState extends BaseStateful { Text( 'Lihat Semua Mata Kuliah', style: FontTheme.poppins14w400purple(), - ) + ), ], ), Icon( @@ -141,7 +141,7 @@ class _HomePageState extends BaseStateful { 'Lihat Semua', style: FontTheme.poppins13w400purple(), ), - ) + ), ], ), ), @@ -219,12 +219,16 @@ class _HomePageState extends BaseStateful { style: FontTheme.poppins14w700black(), ), InkWell( - onTap: () => nav.goToHomeDaftarUlasan(), + onTap: () { + nav.goToHomeDaftarUlasan(); + + MixpanelService.track('view_all_reviews'); + }, child: Text( 'Lihat Semua', style: FontTheme.poppins13w400purple(), ), - ) + ), ], ), ), @@ -260,10 +264,14 @@ class _HomePageState extends BaseStateful { final review = data.summaries[i]; return CardMatkulReview( review: review, - onTap: () => nav.goToDetailMatkulPage( - review.course!, - review.courseCode.toString(), - ), + onTap: () { + nav.goToDetailMatkulPage( + review.course!, + review.courseCode.toString(), + ); + + MixpanelService.track('view_my_review'); + }, ); }, ); diff --git a/lib/features/home/presentation/widgets/card_matkul_review.dart b/lib/features/home/presentation/widgets/card_matkul_review.dart index 1621114..df5db8d 100644 --- a/lib/features/home/presentation/widgets/card_matkul_review.dart +++ b/lib/features/home/presentation/widgets/card_matkul_review.dart @@ -109,11 +109,11 @@ class CardMatkulReview extends StatelessWidget { : (review.hateSpeechStatus == 'WAITING') ? TagStatus.pending : TagStatus.rejected, - ) + ), ], - ) + ), ], - ) + ), ], ), ), diff --git a/lib/features/kalkulator/presentation/pages/edit_komponen_page.dart b/lib/features/kalkulator/presentation/pages/edit_komponen_page.dart index f1f41a8..5f36c69 100644 --- a/lib/features/kalkulator/presentation/pages/edit_komponen_page.dart +++ b/lib/features/kalkulator/presentation/pages/edit_komponen_page.dart @@ -107,7 +107,7 @@ class _EditComponentPageState extends BaseStateful { await onSubmitCallBack(context); }, ), - ) + ), ], ); } diff --git a/lib/features/kalkulator/presentation/widgets/card_component.dart b/lib/features/kalkulator/presentation/widgets/card_component.dart index 8634819..5e93c6c 100644 --- a/lib/features/kalkulator/presentation/widgets/card_component.dart +++ b/lib/features/kalkulator/presentation/widgets/card_component.dart @@ -59,7 +59,7 @@ class CardCompononent extends StatelessWidget { style: FontTheme.poppins12w400black(), textAlign: TextAlign.right, ), - ) + ), ], ), ), diff --git a/lib/features/kalkulator/presentation/widgets/simpan_button.dart b/lib/features/kalkulator/presentation/widgets/simpan_button.dart index 20271e2..ff631d9 100644 --- a/lib/features/kalkulator/presentation/widgets/simpan_button.dart +++ b/lib/features/kalkulator/presentation/widgets/simpan_button.dart @@ -21,7 +21,7 @@ class SimpanButton extends StatelessWidget { color: Color.fromRGBO(0, 0, 0, 0.05), blurRadius: 4, offset: Offset(0, -2), - ) + ), ], ), child: AutoLayoutButton( diff --git a/lib/features/leaderboard/presentation/widgets/leaderboard_tag.dart b/lib/features/leaderboard/presentation/widgets/leaderboard_tag.dart index 1cb5cbf..c5af972 100644 --- a/lib/features/leaderboard/presentation/widgets/leaderboard_tag.dart +++ b/lib/features/leaderboard/presentation/widgets/leaderboard_tag.dart @@ -56,7 +56,7 @@ class TagLeaderboard extends StatelessWidget { return [ BaseColors.purpleHearth, BaseColors.purpleHearth, - BaseColors.white + BaseColors.white, ]; }else if(rank == 1){ return [ diff --git a/lib/features/leaderboard/presentation/widgets/skeleton_card_leaderboard.dart b/lib/features/leaderboard/presentation/widgets/skeleton_card_leaderboard.dart index d033d27..5de05e4 100644 --- a/lib/features/leaderboard/presentation/widgets/skeleton_card_leaderboard.dart +++ b/lib/features/leaderboard/presentation/widgets/skeleton_card_leaderboard.dart @@ -42,7 +42,7 @@ class SkeletonCardLeaderboard extends StatelessWidget { ), ), ), - ) + ), ], ), title: Container( diff --git a/lib/features/matkul/detail/presentation/pages/all_review_matkul_page.dart b/lib/features/matkul/detail/presentation/pages/all_review_matkul_page.dart index fae547a..fdeb6af 100644 --- a/lib/features/matkul/detail/presentation/pages/all_review_matkul_page.dart +++ b/lib/features/matkul/detail/presentation/pages/all_review_matkul_page.dart @@ -133,7 +133,7 @@ class _AllReviewMatkulPageState extends BaseStateful { size: 28, ), ), - ) + ), ], ); }, @@ -149,7 +149,7 @@ class _AllReviewMatkulPageState extends BaseStateful { color: Color.fromRGBO(0, 0, 0, 0.05), blurRadius: 4, offset: Offset(0, -2), - ) + ), ], ), child: TulisUlasanButton( @@ -161,7 +161,7 @@ class _AllReviewMatkulPageState extends BaseStateful { } }, ), - ) + ), ], ); } diff --git a/lib/features/matkul/detail/presentation/pages/detail_matkul_page.dart b/lib/features/matkul/detail/presentation/pages/detail_matkul_page.dart index 2f7d42e..3cffc58 100644 --- a/lib/features/matkul/detail/presentation/pages/detail_matkul_page.dart +++ b/lib/features/matkul/detail/presentation/pages/detail_matkul_page.dart @@ -260,7 +260,7 @@ class _DetailMatkulPageState extends BaseStateful { '${course.reviewCount} Ulasan', style: FontTheme.poppins12w400black(), ), - ) + ), ], ), const WidthSpace(32), @@ -349,7 +349,7 @@ class _DetailMatkulPageState extends BaseStateful { ); } }, - ) + ), ], ); } diff --git a/lib/features/matkul/detail/presentation/pages/review_matkul_page.dart b/lib/features/matkul/detail/presentation/pages/review_matkul_page.dart index 87d243a..2e79f87 100644 --- a/lib/features/matkul/detail/presentation/pages/review_matkul_page.dart +++ b/lib/features/matkul/detail/presentation/pages/review_matkul_page.dart @@ -37,7 +37,7 @@ class _ReviewMatkulPageState extends BaseStateful { children: [ TulisUlasanButton( onTap: () {}, - ) + ), ], ); } diff --git a/lib/features/matkul/detail/presentation/widgets/review_card.dart b/lib/features/matkul/detail/presentation/widgets/review_card.dart index 8a078bd..a8ff4d2 100644 --- a/lib/features/matkul/detail/presentation/widgets/review_card.dart +++ b/lib/features/matkul/detail/presentation/widgets/review_card.dart @@ -176,9 +176,9 @@ class ReviewCard extends StatelessWidget { // color: likesCountColor, ), ), - ) + ), ], - ) + ), ], ), ); diff --git a/lib/features/matkul/form/presentation/pages/add_review_matkul_tag_page.dart b/lib/features/matkul/form/presentation/pages/add_review_matkul_tag_page.dart index 2d24f6b..9d8209f 100644 --- a/lib/features/matkul/form/presentation/pages/add_review_matkul_tag_page.dart +++ b/lib/features/matkul/form/presentation/pages/add_review_matkul_tag_page.dart @@ -105,7 +105,7 @@ Pilih maksimal 3 kategori yang menurutmu dapat\nmerepresentasikan mata kuliah in }, ), ), - ) + ), ], ); } diff --git a/lib/features/matkul/form/presentation/pages/success_form_page.dart b/lib/features/matkul/form/presentation/pages/success_form_page.dart index d4aeb0f..ea636ba 100644 --- a/lib/features/matkul/form/presentation/pages/success_form_page.dart +++ b/lib/features/matkul/form/presentation/pages/success_form_page.dart @@ -53,7 +53,7 @@ class _SuccessFormPageState extends BaseStateful { onPressed: () { nav.pop(); }, - ) + ), ], ), ), diff --git a/lib/features/matkul/search/presentation/pages/_pages.dart b/lib/features/matkul/search/presentation/pages/_pages.dart index 1679527..f995f12 100644 --- a/lib/features/matkul/search/presentation/pages/_pages.dart +++ b/lib/features/matkul/search/presentation/pages/_pages.dart @@ -11,6 +11,7 @@ import 'package:ulaskelas/core/theme/_theme.dart'; import 'package:ulaskelas/features/matkul/main/domain/entities/query_search_course.dart'; import 'package:ulaskelas/features/matkul/search/presentation/states/_states.dart'; import 'package:ulaskelas/features/matkul/search/presentation/widgets/_widgets.dart'; +import 'package:ulaskelas/services/_services.dart'; part 'filter_page.dart'; part 'search_course_page.dart'; diff --git a/lib/features/matkul/search/presentation/pages/filter_page.dart b/lib/features/matkul/search/presentation/pages/filter_page.dart index 8ae1db8..70081d7 100644 --- a/lib/features/matkul/search/presentation/pages/filter_page.dart +++ b/lib/features/matkul/search/presentation/pages/filter_page.dart @@ -158,10 +158,19 @@ class _FilterPageState extends BaseStateful { text: 'Terapkan Filter', onTap: () { nav.pop(true); + MixpanelService.track( + 'apply_course_filter', + params: { + 'jenis_matkul': filterRM.state.selectedType.toString(), + 'jumlah_sks': filterRM.state.selectedSks.toString(), + 'semester_wajib_ambil': + filterRM.state.selectedSemester.toString(), + }, + ); }, ), ), - ) + ), ], ); }, diff --git a/lib/features/matkul/search/presentation/pages/search_course_page.dart b/lib/features/matkul/search/presentation/pages/search_course_page.dart index 4b9f101..6bee178 100644 --- a/lib/features/matkul/search/presentation/pages/search_course_page.dart +++ b/lib/features/matkul/search/presentation/pages/search_course_page.dart @@ -80,6 +80,12 @@ class _SearchCoursePageState }, onFieldSubmitted: (val) { searchCourseRM.state.addToHistory(val); + MixpanelService.track( + 'search_course', + params: { + 'query': val, + }, + ); }, onChange: onQueryChanged, ), diff --git a/lib/features/matkul/search/presentation/widgets/_widgets.dart b/lib/features/matkul/search/presentation/widgets/_widgets.dart index 0997690..390b99b 100644 --- a/lib/features/matkul/search/presentation/widgets/_widgets.dart +++ b/lib/features/matkul/search/presentation/widgets/_widgets.dart @@ -9,6 +9,7 @@ import 'package:ulaskelas/core/theme/_theme.dart'; import 'package:ulaskelas/features/matkul/search/data/models/_models.dart'; import 'package:ulaskelas/features/matkul/search/presentation/states/_states.dart'; import 'package:ulaskelas/features/matkul/search/presentation/widgets/skeleton_card_course.dart'; +import 'package:ulaskelas/services/_services.dart'; part 'base_app_bar.dart'; part 'card_course.dart'; diff --git a/lib/features/matkul/search/presentation/widgets/search_list_view.dart b/lib/features/matkul/search/presentation/widgets/search_list_view.dart index ffc6ef3..e4e0a91 100644 --- a/lib/features/matkul/search/presentation/widgets/search_list_view.dart +++ b/lib/features/matkul/search/presentation/widgets/search_list_view.dart @@ -41,9 +41,12 @@ class SearchListView extends StatelessWidget { text: 'Filter', onPressed: () async { await nav.goToFilterPage(); + if (filterRM.state.hasFilter) { await refreshIndicatorKey.currentState?.show(); } + + MixpanelService.track('open_course_filter'); }, ); }, diff --git a/lib/features/profile/presentation/pages/profile_page.dart b/lib/features/profile/presentation/pages/profile_page.dart index d8bdfca..4356971 100644 --- a/lib/features/profile/presentation/pages/profile_page.dart +++ b/lib/features/profile/presentation/pages/profile_page.dart @@ -8,6 +8,7 @@ import 'package:ulaskelas/core/bases/states/_states.dart'; import 'package:ulaskelas/core/theme/_theme.dart'; import 'package:ulaskelas/features/matkul/search/presentation/widgets/_widgets.dart'; import 'package:ulaskelas/features/profile/presentation/widgets/profile_data.dart'; +import 'package:ulaskelas/services/_services.dart'; class ProfilePage extends StatefulWidget { const ProfilePage({ @@ -94,6 +95,7 @@ class _ProfilePageState extends BaseStateful { child: InkWell( onTap: () { nav.goToHomeDaftarUlasan(); + MixpanelService.track('view_all_reviews'); }, child: Text( 'Riwayat Ulasan', diff --git a/lib/features/profile/presentation/widgets/profile_data.dart b/lib/features/profile/presentation/widgets/profile_data.dart index 0cb25e0..55b3d79 100644 --- a/lib/features/profile/presentation/widgets/profile_data.dart +++ b/lib/features/profile/presentation/widgets/profile_data.dart @@ -26,7 +26,7 @@ class ProfileData extends StatelessWidget { data, style: FontTheme.poppins12w400black(), ), - ) + ), ], ), ); diff --git a/lib/features/sso/presentation/pages/sso_web_page.dart b/lib/features/sso/presentation/pages/sso_web_page.dart index cb2b4e0..50bfb1f 100644 --- a/lib/features/sso/presentation/pages/sso_web_page.dart +++ b/lib/features/sso/presentation/pages/sso_web_page.dart @@ -60,7 +60,7 @@ class _SSOWebPageState extends BaseStateful { } return const SizedBox.shrink(); }, - ) + ), ], ); } diff --git a/lib/services/mixpanel_service.dart b/lib/services/mixpanel_service.dart index 3b39be8..dae4b68 100644 --- a/lib/services/mixpanel_service.dart +++ b/lib/services/mixpanel_service.dart @@ -20,9 +20,11 @@ class MixpanelService { static void track(String eventName, {Map? params}) { _mixpanel!.track(eventName, properties: params); - Logger().i(''' + Logger().i( + ''' Track Events: $eventName, Parameters: $params - '''); + ''' + ); } } diff --git a/lib/services/pref_service.dart b/lib/services/pref_service.dart index fa77d75..013db9b 100644 --- a/lib/services/pref_service.dart +++ b/lib/services/pref_service.dart @@ -59,7 +59,7 @@ class Pref { final token = getString(PreferencesKeys.ulasKelasCred); return { 'Authorization': 'Token $token', - 'Content-Type': 'application/json' + 'Content-Type': 'application/json', }; } }