Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e1f1084
feat(learningPage): add get deck by id API, change route of learning …
ditto-11 May 26, 2025
9e3b028
fix: fix createDeckResponseDto to receive Card object
ditto-11 May 27, 2025
8662e60
feat(learningFlashcardPage): add LearningCard
ditto-11 May 28, 2025
64fdc8c
fix: change CardDto to match new API
ditto-11 May 30, 2025
d8ac4f1
feat(learningcard): add flutter_tts dependency and apply text to spee…
ditto-11 May 31, 2025
aa5e4ee
feat: add learning card list
ditto-11 May 31, 2025
dc2edbc
feat(learningflashcard): add progress bar
ditto-11 May 31, 2025
9ee42d9
feat(learningcard): add Speech Adjustment to change speed and accent …
ditto-11 May 31, 2025
da3ed7b
fix(learningcard): fix clamp of speech speed
ditto-11 Jun 2, 2025
4d46e50
feat(editcard): add Edit Card UI
ditto-11 Jun 2, 2025
5cc94ca
fix: add Navigator for flashcard options dialog
ditto-11 Jun 2, 2025
43a91a7
feat(learningPage): add get deck by id API, change route of learning …
ditto-11 May 26, 2025
d66b329
feat(editcard): add Edit Card UI
ditto-11 Jun 2, 2025
7ce73aa
fix: bug when rebase
ditto-11 Jun 3, 2025
4bf622c
feat: add New Word page
ditto-11 Jun 3, 2025
b03915b
feat: add search and add card to deck
ditto-11 Jun 3, 2025
44130e9
fix: not update card on flashcard topic
ditto-11 Jun 3, 2025
089ea50
chore: add isDone field to getDeckDto
ditto-11 Jun 3, 2025
dae925e
feat: finish learning deck API
ditto-11 Jun 4, 2025
27c39bf
feat: add complete card for finish deck learning
ditto-11 Jun 4, 2025
8fa1d09
fix: card list reload when reach last card
ditto-11 Jun 4, 2025
30c7037
feat: delete card from deck API
ditto-11 Jun 5, 2025
609584b
feat: multi selection mode to manage card, apply delete card
ditto-11 Jun 5, 2025
ec2d612
feat: copy and move card between deck
ditto-11 Jun 5, 2025
be141ee
chore: improve move and copy UI
ditto-11 Jun 5, 2025
d249ea7
feat: add Reset button and change Options UI
ditto-11 Jun 6, 2025
e9d1d65
fix: handle no card in deck case
ditto-11 Jun 6, 2025
d87d924
fix: handle card not exists error
ditto-11 Jun 6, 2025
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
50 changes: 29 additions & 21 deletions lib/config/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import 'package:lacquer/presentation/pages/auth/login_page.dart';
import 'package:lacquer/presentation/pages/auth/verify_page.dart';
import 'package:lacquer/presentation/pages/camera/camera_page.dart';
import 'package:lacquer/presentation/pages/camera/about_screen.dart';
import 'package:lacquer/presentation/pages/home/add_new_word_page.dart';
import 'package:lacquer/presentation/pages/home/edit_card_list_page.dart';
import 'package:lacquer/presentation/pages/home/dictionary_page.dart';
import 'package:lacquer/presentation/pages/profile/profile_page.dart';
import 'package:lacquer/presentation/pages/home/flashcard_page.dart';
import 'package:lacquer/presentation/pages/home/learning_flashcard_page.dart';
import 'package:lacquer/presentation/pages/friends/friends_page.dart';
import 'package:lacquer/features/profile/bloc/profile_bloc.dart';
import 'package:lacquer/features/profile/bloc/profile_event.dart';
import 'package:lacquer/presentation/pages/home/quiz_page.dart';
import 'package:lacquer/presentation/pages/home/translator_page.dart';
import 'package:lacquer/presentation/pages/chat/chat_screen.dart';
import 'package:lacquer/presentation/pages/history/history_page.dart';

import 'package:lacquer/presentation/pages/mainscreen.dart';
import 'package:flutter/widgets.dart';
Expand All @@ -31,13 +31,14 @@ class RouteName {
static const String register = '/register';
static const String camera = '/camera';
static const String about = '/about';
static const String profile = '/profile';
static const String flashcards = '/flashcards';
static String learn(String deckId) => '/learn/$deckId';
static String edit(String deckId) => '/edit/$deckId';
static const String dictionary = '/dictionary';
static const String translator = '/translator';
static const String friends = '/friends';
static const String quiz = '/quiz';
static const String chat = '/chat';
static const String history = '/history';
static String addNewWord(String deckId) => '/add-new-word/$deckId';

static const publicRoutes = [login, forgotPassword, verify, register];
}
Expand Down Expand Up @@ -99,6 +100,10 @@ final router = GoRouter(
return AboutScreen(imagePath: imagePath);
},
),
noTransitionRoute(
path: RouteName.profile,
builder: (context, state) => const ProfilePage(),
),
noTransitionRoute(
path: RouteName.flashcards,
builder: (context, state) => const FlashcardPage(),
Expand All @@ -112,30 +117,33 @@ final router = GoRouter(
builder: (context, state) => const FriendsPage(),
),
noTransitionRoute(
path: RouteName.quiz,
builder: (context, state) => const QuizPage(),
),
noTransitionRoute(
path: '/learn',
path: '/learn/:deckId',
builder: (context, state) {
final data = state.extra as Map<String, dynamic>;
final cards = data['cards'] as List<String>;
final title = data['title'] as String;

return LearningFlashcardPage(title: title, cards: cards);
final deckId = state.pathParameters['deckId']!;
return LearningFlashcardPage(deckId: deckId);
},
),
noTransitionRoute(
path: RouteName.translator,
builder: (context, state) => const TranslatorScreen(),
),
noTransitionRoute(
path: '/chat',
builder: (context, state) => const ChatScreen(),
path: RouteName.translator,
builder: (context, state) => const TranslatorScreen(),
),
noTransitionRoute(
path: RouteName.history,
builder: (context, state) => const HistoryPage(),
path: '/edit/:deckId',
builder: (context, state) {
final deckId = state.pathParameters['deckId']!;
return EditCardListPage(deckId: deckId);
},
),
noTransitionRoute(
path: '/add-new-word/:deckId',
builder: (context, state) {
final deckId = state.pathParameters['deckId']!;
return AddNewWordPage(deckId: deckId);
},
),
],
);
);
1 change: 1 addition & 0 deletions lib/config/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CustomTheme {
static const Color mainColor1 = Color(0xFF6D2323);
static const Color mainColor2 = Color(0xFFE5D0AC);
static const Color mainColor3 = Color(0xFFFEF9E1);
static const Color flashcardColor = Color.fromARGB(255, 224, 78, 78);
static const Color chatbotprimary = Colors.purple;
static const Color chatbotsecondary = Colors.blue;

Expand Down
8 changes: 4 additions & 4 deletions lib/features/dictionary/dtos/search_result_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Data {
}

class Vocabulary {
final String id;
final List<String> img;
final String word;
final String pronunciation;
Expand All @@ -62,6 +63,7 @@ class Vocabulary {
final List<Example> examples;

const Vocabulary({
required this.id,
required this.img,
required this.word,
required this.pronunciation,
Expand All @@ -72,6 +74,7 @@ class Vocabulary {

factory Vocabulary.fromJson(Map<String, dynamic> json) {
return Vocabulary(
id: json['_id'] ?? '',
img:
(json['img'] as List<dynamic>?)?.map((e) => e.toString()).toList() ??
[],
Expand Down Expand Up @@ -124,10 +127,7 @@ class Example {
final String english;
final String vietnamese;

const Example({
required this.english,
required this.vietnamese,
});
const Example({required this.english, required this.vietnamese});

factory Example.fromJson(Map<String, dynamic> json) {
return Example(
Expand Down
Loading
Loading