Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert pr #13

Merged
merged 1 commit into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed lite_up/flutter_02.png
Binary file not shown.
7 changes: 0 additions & 7 deletions lite_up/lib/constants/style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@ const TextStyle loginButtonTextStyle =
const TextStyle signUpButtonTextStyle =
TextStyle(color: deepOrange, fontSize: 16, fontWeight: FontWeight.bold);

const TextStyle personalisationTextstyle =
TextStyle(color: grayish, fontSize: 13, fontWeight: FontWeight.w500);

/* COLOR STYLE */
const Color background = Color.fromARGB(255, 249, 240, 181);
const Color deepOrange = Color.fromARGB(255, 255, 123, 46);
const Color softOrange = Color.fromARGB(255, 254, 189, 142);
const Color deepYellow = Color.fromARGB(255, 255, 187, 1);
const Color skyBlue = Color.fromARGB(255, 156, 197, 231);
const Color white = Colors.white;
const Color grayish = Color.fromARGB(255, 87, 87, 87);
const Color lightGray = Color.fromARGB(255, 217, 217, 217);

ButtonStyle loginButtonStyle = ButtonStyle(
backgroundColor: MaterialStateProperty.all(deepOrange),
Expand All @@ -50,5 +45,3 @@ const BoxDecoration primaryBackground = BoxDecoration(

BoxDecoration unlockedCardBackground =
BoxDecoration(color: softOrange, borderRadius: BorderRadius.circular(25));

var mapNumberToLetter = {1: 'a', 2: 'b', 3: 'c'};
52 changes: 0 additions & 52 deletions lite_up/lib/constants/text.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
// This file contains list of static texts that will be displayed in the app.
import 'package:flutter/material.dart';

const personalisation_1 = ["beginner", "bookworm", "bibliophile"];

const personalisation_2 = [
"fiksi",
"politik",
"literatur",
"sejarah",
"finansial",
"Saya masih mencari genre kesukaan"
];

const flashcards_1 = [
[
"Finansial",
Expand All @@ -38,44 +27,3 @@ const flashcards_1 = [
"Jacques Pangemanann yang merupakan seorang komisaris polisi Hindia Belanda berdarah Minahasa dalam memberantas kelompok Si Pitung membuatnya ditugaskan untuk memata-matai aktivitas Minke. Tugas inilah yang membuat Jacques Pangemanann menjadi sosok yang bertanggung jawab dibalik pembuangan Minke ke pulau terpencil di Maluku Utara.[2]"
]
];

const quiz_1 = [
[
"Bulan Inklusi Keuangan ada di bulan?",
["Oktober", "Januari", "Maret"],
0
],
[
"Sebuah kondisi dimana seseorang terlindungi secara finansial dari seluruh risiko adalah ...",
["Financial Lock", "Financial Burden", "Financial Freedom"],
2
],
[
"Kemampuan seseorang dalam memahami pentingnya perencanaan dan penerapan tata kelola keuangan yang baik adalah ...",
["Kecerdasan finansial", "Kecerdasan belajar", "Kepintaran membaca"],
0
],
[
"Kebijakan apa yang diluncurkan Kemenkumham RI menjelang puncak KTT G20?",
[
"Kebijakan visa rumah kedua",
"Kebijakan kewarganegaraan kedua",
"Kebijakan passport dua negara"
],
0
],
[
"Apa yang terjadi pada tanggal 17 - 24 Juni 1916 di alun-alun Bandung?",
[
"Kongres Serikat Islam",
"Inflasi dan perekonomian global",
"Kelestarian lingkungan"
],
0
],
[
"Jacques adalah karakter utama di buku?",
["Laskar Pelangi", "Rumah Kaca", "Bumi Manusia"],
1
]
];
16 changes: 0 additions & 16 deletions lite_up/lib/models/quiz_model.dart

This file was deleted.

23 changes: 10 additions & 13 deletions lite_up/lib/screens/flashcard_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'dart:ffi';
import 'package:flutter/material.dart';
import 'package:flutter_sound/flutter_sound.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:lite_up/screens/quiz_screen.dart';
import 'package:lite_up/widgets/record_button.dart';
import 'package:permission_handler/permission_handler.dart';
import '../api/sound_recorder.dart';
Expand Down Expand Up @@ -37,8 +36,7 @@ class _FlashcardScreenState extends State<FlashcardScreen> {
// Create a function to display the next flashcard
void nextFlashcard() {
if (index == flashcards.length - 1) {
Navigator.push(context,
MaterialPageRoute(builder: (context) => const QuizScreen()));
return;
} else {
setState(() {
// Increments the index to rebuild the app to show next flashcard
Expand Down Expand Up @@ -95,7 +93,7 @@ class _FlashcardScreenState extends State<FlashcardScreen> {
children: [
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
for (var i = 0; i < flashcards.length; i++)
if (i <= index)
if (i == index)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 5),
child: Image.asset(
Expand All @@ -108,22 +106,21 @@ class _FlashcardScreenState extends State<FlashcardScreen> {
]),
// Add the flashcard widget
FlashcardWidget(
indexAction: index,
currentFlashcard: flashcards[index],
totalFlashcards: flashcards.length,
nextFlashcard: nextFlashcard,
previousFlashcard: previousFlashcard),
indexAction: index,
currentFlashcard: flashcards[index],
totalFlashcards: flashcards.length,
nextFlashcard: nextFlashcard,
previousFlashcard: previousFlashcard
),
// Add the recorder and audio button
//Center(child: RecordButton(recorder: recorder))
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 20, vertical: 10),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
child:
Image.asset('lib/assets/images/recorder_icon.png')),
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 20, vertical: 10),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
child: Image.asset(
'lib/assets/images/audioPlayer_icon.png'))
])
Expand Down
80 changes: 0 additions & 80 deletions lite_up/lib/screens/personalisation_screen.dart

This file was deleted.

75 changes: 0 additions & 75 deletions lite_up/lib/screens/quiz_screen.dart

This file was deleted.

28 changes: 0 additions & 28 deletions lite_up/lib/widgets/blueEnd_button.dart

This file was deleted.

1 change: 0 additions & 1 deletion lite_up/lib/widgets/login_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'package:google_fonts/google_fonts.dart';
import '../constants/style.dart';
import '../screens/flashcard_screen.dart';
import '../screens/homepage_screen.dart';
import '../screens/personalisation_screen.dart';

class LoginButton extends StatelessWidget {
const LoginButton({Key? key}) : super(key: key);
Expand Down
Loading