-
Notifications
You must be signed in to change notification settings - Fork 0
Convert web application to Flutter mobile app #14
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
Merged
dbsectrainer
merged 1 commit into
main
from
claude/convert-to-flutter-011CUvSoGyHQ3xAPnd9aEXnU
Nov 8, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| include: package:flutter_lints/flutter.yaml | ||
|
|
||
| linter: | ||
| rules: | ||
| - always_declare_return_types | ||
| - avoid_print | ||
| - prefer_const_constructors | ||
| - prefer_const_declarations | ||
| - prefer_const_literals_to_create_immutables | ||
| - prefer_final_fields | ||
| - prefer_final_locals | ||
| - sort_child_properties_last | ||
| - use_key_in_widget_constructors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Fonts Setup | ||
|
|
||
| This Flutter application uses two font families: | ||
|
|
||
| ## Required Fonts | ||
|
|
||
| ### 1. Poppins | ||
| - Download from [Google Fonts](https://fonts.google.com/specimen/Poppins) | ||
| - Required weights: | ||
| - `Poppins-Regular.ttf` (400) | ||
| - `Poppins-Bold.ttf` (700) | ||
|
|
||
| ### 2. Noto Sans Arabic | ||
| - Download from [Google Fonts](https://fonts.google.com/noto/specimen/Noto+Sans+Arabic) | ||
| - Required weights: | ||
| - `NotoSansArabic-Regular.ttf` (400) | ||
| - `NotoSansArabic-Bold.ttf` (700) | ||
|
|
||
| ## Installation | ||
|
|
||
| 1. Download the font files from the links above | ||
| 2. Place them in this `fonts/` directory with the exact names listed | ||
| 3. The fonts should be automatically detected by Flutter via `pubspec.yaml` | ||
|
|
||
| ## Alternative: System Fonts | ||
|
|
||
| If you prefer not to bundle fonts, you can modify `lib/utils/app_theme.dart` to use system fonts instead by removing or commenting out the `fontFamily` properties. | ||
|
|
||
| ## Font File Structure | ||
|
|
||
| After setup, your directory should look like: | ||
| ``` | ||
| fonts/ | ||
| ├── README.md (this file) | ||
| ├── Poppins-Regular.ttf | ||
| ├── Poppins-Bold.ttf | ||
| ├── NotoSansArabic-Regular.ttf | ||
| └── NotoSansArabic-Bold.ttf | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:flutter/services.dart'; | ||
| import 'screens/dashboard_screen.dart'; | ||
| import 'utils/app_theme.dart'; | ||
|
|
||
| void main() { | ||
| WidgetsFlutterBinding.ensureInitialized(); | ||
|
|
||
| // Set preferred orientations | ||
| SystemChrome.setPreferredOrientations([ | ||
| DeviceOrientation.portraitUp, | ||
| DeviceOrientation.portraitDown, | ||
| DeviceOrientation.landscapeLeft, | ||
| DeviceOrientation.landscapeRight, | ||
| ]); | ||
|
|
||
| runApp(const ArabicPathwaysApp()); | ||
| } | ||
|
|
||
| class ArabicPathwaysApp extends StatelessWidget { | ||
| const ArabicPathwaysApp({super.key}); | ||
|
|
||
| @override | ||
| Widget build(BuildContext context) { | ||
| return MaterialApp( | ||
| title: 'Arabic Pathways', | ||
| theme: AppTheme.lightTheme, | ||
| debugShowCheckedModeBanner: false, | ||
| home: const DashboardScreen(), | ||
| ); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| class LessonDay { | ||
| final int dayNumber; | ||
| final String title; | ||
| final String arabicContent; | ||
| final String transliterationContent; | ||
| final String englishContent; | ||
| final String arabicAudioPath; | ||
| final String englishAudioPath; | ||
| final String? videoId; | ||
| final String level; | ||
|
|
||
| LessonDay({ | ||
| required this.dayNumber, | ||
| required this.title, | ||
| required this.arabicContent, | ||
| required this.transliterationContent, | ||
| required this.englishContent, | ||
| required this.arabicAudioPath, | ||
| required this.englishAudioPath, | ||
| this.videoId, | ||
| required this.level, | ||
| }); | ||
|
|
||
| String get levelName { | ||
| if (dayNumber <= 7) return 'Level 1: Foundations'; | ||
| if (dayNumber <= 14) return 'Level 2: Essential Daily Phrases'; | ||
| if (dayNumber <= 22) return 'Level 3: Cultural & Social'; | ||
| if (dayNumber <= 30) return 'Level 4: Professional Communication'; | ||
| return 'Level 5: Advanced Fluency'; | ||
| } | ||
|
|
||
| String get levelColor { | ||
| if (dayNumber <= 7) return '#4A90E2'; | ||
| if (dayNumber <= 14) return '#50C878'; | ||
| if (dayNumber <= 22) return '#FF6B6B'; | ||
| if (dayNumber <= 30) return '#9B59B6'; | ||
| return '#F39C12'; | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'level' field is required but never populated in ContentService.loadDay() (line 66 sets level to empty string ''). Either make this field nullable/optional, remove it, or properly populate it from the level name logic that already exists in the levelName getter.