├── lib ├── rest │ ├── RequestType.dart │ ├── RestServiceManager.dart │ └── ramadan │ │ └── RamadanDataProvider.dart ├── utils │ ├── enums │ │ └── LoginTypeEnum.dart │ ├── popups │ │ ├── CustomSnackBarType.dart │ │ ├── CustomDialog.dart │ │ └── CustomSnackBar.dart │ ├── exceptions │ │ └── CustomException.dart │ ├── configuration │ │ └── ProjectInfo.dart │ ├── theme │ │ ├── CustomTextTheme.dart │ │ └── AppThemeLight.dart │ ├── initialize │ │ ├── AppPreferences.dart │ │ ├── AppVersionChecker.dart │ │ └── ProjectInitialize.dart │ ├── constants │ │ ├── date_constant.dart │ │ ├── color_constant.dart │ │ └── image_constant.dart │ ├── validator │ │ └── LoginValidator.dart │ ├── formatter │ │ └── DateTimeFormatter.dart │ ├── navigation │ │ └── CustomNavigator.dart │ ├── servicelocator │ │ └── ServiceLocator.dart │ └── manager │ │ ├── TimeManager.dart │ │ └── GridItemManager.dart ├── ui │ ├── login │ │ ├── components │ │ │ ├── CustomLoginButtonType.dart │ │ │ ├── SocialLoginButton.dart │ │ │ └── CustomTextField.dart │ │ ├── register │ │ │ └── RegisterPageViewModel.dart │ │ ├── passwordReset │ │ │ └── PasswordResetPage.dart │ │ └── LoginPageViewModel.dart │ ├── ViewModelBase.dart │ ├── home │ │ ├── hadith │ │ │ ├── components │ │ │ │ ├── HadithCategoryFilterButton.dart │ │ │ │ └── HadithCard.dart │ │ │ ├── HadithPageViewModel.dart │ │ │ └── HadithPage.dart │ │ ├── home │ │ │ └── components │ │ │ │ ├── TimeCard.dart │ │ │ │ ├── CountdownWidget.dart │ │ │ │ └── GridCard.dart │ │ ├── components │ │ │ └── CustomBottomNavigation.dart │ │ ├── CustomNavigationPageViewModel.dart │ │ ├── CustomNavigationPage.dart │ │ └── city │ │ │ └── CityListPage.dart │ ├── common │ │ ├── button │ │ │ └── CustomLoginButton.dart │ │ └── dialogs │ │ │ └── CustomDialogWidget.dart │ ├── splash │ │ ├── SplashPage.dart │ │ └── SplashPageViewModel.dart │ └── slider │ │ ├── SliderPage.dart │ │ └── SliderPageViewModel.dart ├── model │ ├── domain │ │ ├── GridItemResult.dart │ │ ├── PrayerTimeDetails.dart │ │ ├── HadithModel.dart │ │ ├── PrayerTimesModel.dart │ │ └── TurkeyCity.dart │ └── home │ │ ├── GridItem.dart │ │ └── PrayerTimeWord.dart ├── services │ ├── common │ │ ├── core │ │ │ ├── ConfigurationService.dart │ │ │ ├── LocationService.dart │ │ │ ├── PermissionManager.dart │ │ │ └── AuthService.dart │ │ ├── performance │ │ │ └── PerformanceMonitoringService.dart │ │ ├── ExceptionHandlingService.dart │ │ └── notification │ │ │ └── LocalNotificationService.dart │ └── home │ │ ├── HadithService.dart │ │ └── TimeFormatterService.dart ├── main.dart └── firebase_options.dart ├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── RunnerTests │ └── RunnerTests.swift ├── .gitignore └── Podfile ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── assets └── image │ ├── home │ ├── sun.png │ ├── cloudy.png │ ├── moon.png │ ├── morning.png │ ├── ramadan.png │ └── half_moon.png │ ├── login │ ├── login_google.png │ └── login_facebook.png │ └── hadith │ └── logo_hadith.svg ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── raw │ │ │ │ │ └── cannon.wav │ │ │ │ ├── drawable │ │ │ │ │ ├── cannon.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── sameetdmr │ │ │ │ │ └── eramadanapp │ │ │ │ │ └── ramadan │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── CMakeLists.txt │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ └── win32_window.h ├── .gitignore ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ ├── generated_plugin_registrant.cc │ └── CMakeLists.txt └── CMakeLists.txt ├── analysis_options.yaml ├── .gitignore ├── SECURITY.md ├── LICENSE ├── .github └── workflows │ └── dart.yml ├── .metadata ├── pubspec.yaml └── README.md /lib/rest/RequestType.dart: -------------------------------------------------------------------------------- 1 | enum RequestType { get, post } 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/utils/enums/LoginTypeEnum.dart: -------------------------------------------------------------------------------- 1 | enum LoginTypeEnum { email, confirm, password } 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/image/home/sun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/assets/image/home/sun.png -------------------------------------------------------------------------------- /lib/utils/popups/CustomSnackBarType.dart: -------------------------------------------------------------------------------- 1 | enum CustomSnackBarType { 2 | success, 3 | error, 4 | } 5 | -------------------------------------------------------------------------------- /assets/image/home/cloudy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/assets/image/home/cloudy.png -------------------------------------------------------------------------------- /assets/image/home/moon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/assets/image/home/moon.png -------------------------------------------------------------------------------- /assets/image/home/morning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/assets/image/home/morning.png -------------------------------------------------------------------------------- /assets/image/home/ramadan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/assets/image/home/ramadan.png -------------------------------------------------------------------------------- /lib/ui/login/components/CustomLoginButtonType.dart: -------------------------------------------------------------------------------- 1 | enum CustomLoginButtonType { 2 | primary, 3 | text, 4 | } 5 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/image/home/half_moon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/assets/image/home/half_moon.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /assets/image/login/login_google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/assets/image/login/login_google.png -------------------------------------------------------------------------------- /assets/image/login/login_facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/assets/image/login/login_facebook.png -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /android/app/src/main/res/raw/cannon.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/android/app/src/main/res/raw/cannon.wav -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/cannon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/android/app/src/main/res/drawable/cannon.png -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lib/utils/exceptions/CustomException.dart: -------------------------------------------------------------------------------- 1 | final class CustomException implements Exception { 2 | CustomException(this.message); 3 | final String message; 4 | } 5 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ramadanAppChannelId 4 | 5 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sameetdmr/Ramazan2024/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/sameetdmr/eramadanapp/ramadan/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.sameetdmr.eramadanapp.ramadan; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /lib/model/domain/GridItemResult.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:ramadan/model/home/GridItem.dart'; 3 | 4 | final class GridItemResult { 5 | GridItemResult(this.gridItemList, this.isActiveList); 6 | final RxList gridItemList; 7 | final RxList isActiveList; 8 | } 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/services/common/core/ConfigurationService.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: one_member_abstracts 2 | 3 | abstract class IConfigurationService { 4 | String getApiServiceURL(); 5 | } 6 | 7 | final class ConfigurationService implements IConfigurationService { 8 | @override 9 | String getApiServiceURL() { 10 | return 'https://www.sabah.com.tr/imsakiye/'; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | 3 | 4 | analyzer: 5 | exclude: 6 | - "**/*.g.dart" 7 | - "**/*.freezed.dart" 8 | - "test/.test_coverage.dart" 9 | - "bin/cache/**" 10 | - "lib/generated_plugin_registrant.dart" 11 | - test 12 | - "lib/firebase_options.dart" 13 | 14 | linter: 15 | rules: 16 | public_member_api_docs: false 17 | lines_longer_than_80_chars: false 18 | file_names: false 19 | sort_pub_dependencies: false -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/utils/configuration/ProjectInfo.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_constructors_over_static_methods 2 | 3 | import 'package:get/get.dart'; 4 | import 'package:ramadan/model/home/GridItem.dart'; 5 | 6 | final class ProjectInfo { 7 | ProjectInfo._init(); 8 | static ProjectInfo? _instance; 9 | 10 | static ProjectInfo get instance { 11 | return _instance ??= ProjectInfo._init(); 12 | } 13 | 14 | RxList isActiveList = [].obs; 15 | RxList gridItemList = [].obs; 16 | RxString cityName = ''.obs; 17 | } 18 | -------------------------------------------------------------------------------- /lib/model/home/GridItem.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class GridItem { 5 | GridItem({ 6 | required this.id, 7 | required this.color, 8 | required this.iconPath, 9 | required this.title, 10 | required this.time, 11 | required this.date, 12 | required this.isActive, 13 | }); 14 | 15 | final int id; 16 | final Color color; 17 | final String iconPath; 18 | final String title; 19 | final String time; 20 | final String date; 21 | final RxBool isActive; 22 | } 23 | -------------------------------------------------------------------------------- /lib/model/domain/PrayerTimeDetails.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs 2 | 3 | final class PrayerTimeDetails { 4 | PrayerTimeDetails({ 5 | required this.date, 6 | required this.times, 7 | }); 8 | 9 | factory PrayerTimeDetails.fromJson(Map json) { 10 | return PrayerTimeDetails( 11 | date: json['date'] as String, 12 | times: List.from(json['times'] as List), 13 | ); 14 | } 15 | final String date; 16 | final List times; 17 | 18 | Map toJson() { 19 | return { 20 | 'date': date, 21 | 'times': times, 22 | }; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/utils/theme/CustomTextTheme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class CustomTextTheme { 5 | CustomTextTheme(this.context); 6 | final BuildContext context; 7 | 8 | TextStyle get bodyMedium => context.textTheme.bodyMedium!; 9 | 10 | TextStyle get labelMedium => context.textTheme.labelMedium!; 11 | 12 | TextStyle get titleMedium => context.textTheme.titleMedium!; 13 | 14 | TextStyle get bodySmall => context.textTheme.bodySmall!; 15 | 16 | TextStyle get headlineMedium => context.textTheme.headlineMedium!; 17 | 18 | TextStyle get labelSmall => context.textTheme.labelSmall!; 19 | } 20 | -------------------------------------------------------------------------------- /lib/model/domain/HadithModel.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs 2 | 3 | final class HadithModel { 4 | HadithModel({ 5 | required this.category, 6 | required this.hadith, 7 | required this.author, 8 | required this.id, 9 | }); 10 | 11 | factory HadithModel.fromJson(Map json) { 12 | return HadithModel( 13 | category: json['category'] as String, 14 | hadith: json['hadith'] as String, 15 | author: json['author'] as String, 16 | id: json['id'] as String, 17 | ); 18 | } 19 | final String category; 20 | final String hadith; 21 | final String author; 22 | final String id; 23 | } 24 | -------------------------------------------------------------------------------- /lib/ui/ViewModelBase.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_analytics/firebase_analytics.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:ramadan/services/common/ExceptionHandlingService.dart'; 4 | import 'package:ramadan/utils/servicelocator/ServiceLocator.dart'; 5 | 6 | class ViewModelBase extends GetxController { 7 | IExceptionHandlingService exceptionHandlingService = ServiceLocator().get(); 8 | 9 | Future setCurrentScreen(String screenName) async { 10 | final analytics = FirebaseAnalytics.instance; 11 | await analytics.setCurrentScreen(screenName: screenName, screenClassOverride: screenName); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | } 9 | settings.ext.flutterSdkPath = flutterSdkPath() 10 | 11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") 12 | 13 | plugins { 14 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false 15 | } 16 | } 17 | 18 | include ":app" 19 | 20 | apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle" 21 | -------------------------------------------------------------------------------- /lib/ui/login/components/SocialLoginButton.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | class SocialLoginButton extends StatelessWidget { 6 | const SocialLoginButton({ 7 | required this.onTap, 8 | required this.imageUrl, 9 | super.key, 10 | }); 11 | final void Function() onTap; 12 | final String imageUrl; 13 | @override 14 | Widget build(BuildContext context) { 15 | return InkWell( 16 | onTap: onTap, 17 | child: Container( 18 | width: 30.w, 19 | height: 30.h, 20 | decoration: BoxDecoration( 21 | image: DecorationImage( 22 | image: AssetImage(imageUrl), 23 | fit: BoxFit.cover, 24 | ), 25 | ), 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2' 12 | classpath 'com.google.gms:google-services:4.3.13' 13 | } 14 | 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | } 23 | 24 | rootProject.buildDir = '../build' 25 | subprojects { 26 | project.buildDir = "${rootProject.buildDir}/${project.name}" 27 | } 28 | subprojects { 29 | project.evaluationDependsOn(':app') 30 | } 31 | 32 | tasks.register("clean", Delete) { 33 | delete rootProject.buildDir 34 | } 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | firebase_auth 7 | firebase_core 8 | geolocator_windows 9 | permission_handler_windows 10 | share_plus 11 | url_launcher_windows 12 | ) 13 | 14 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 15 | ) 16 | 17 | set(PLUGIN_BUNDLED_LIBRARIES) 18 | 19 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 20 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 21 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 24 | endforeach(plugin) 25 | 26 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 27 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 28 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 29 | endforeach(ffi_plugin) 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # Ignore 14 | firebase_options.dart 15 | google-services.json 16 | google-services.plist 17 | GoogleService-Info.plist 18 | 19 | # IntelliJ related 20 | *.iml 21 | *.ipr 22 | *.iws 23 | .idea/ 24 | 25 | # The .vscode folder contains launch configuration and tasks you configure in 26 | # VS Code which you may wish to be included in version control, so this line 27 | # is commented out by default. 28 | #.vscode/ 29 | 30 | # Flutter/Dart/Pub related 31 | **/doc/api/ 32 | **/ios/Flutter/.last_build_id 33 | .dart_tool/ 34 | .flutter-plugins 35 | .flutter-plugins-dependencies 36 | .packages 37 | .pub-cache/ 38 | .pub/ 39 | /build/ 40 | 41 | # Symbolication related 42 | app.*.symbols 43 | 44 | # Obfuscation related 45 | app.*.map.json 46 | 47 | # Android Studio will place build artifacts here 48 | /android/app/debug 49 | /android/app/profile 50 | /android/app/release -------------------------------------------------------------------------------- /lib/utils/popups/CustomDialog.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: avoid_void_async 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:ramadan/utils/constants/color_constant.dart'; 6 | import 'package:ramadan/utils/navigation/CustomNavigator.dart'; 7 | 8 | final class CustomDialog { 9 | static void showCustomDialog(Widget widget, {bool barrierDismissible = false}) async { 10 | await Future.delayed(const Duration(milliseconds: 50)); 11 | await Get.dialog(widget, barrierDismissible: barrierDismissible); 12 | } 13 | 14 | static void showLoadingDialog({bool isOpaqueBackground = false}) async { 15 | await Future.delayed(const Duration(milliseconds: 50)); 16 | await Get.dialog(ColoredBox(color: (isOpaqueBackground != false) ? ColorCommonConstant.white : ColorCommonConstant.transparent, child: const Center(child: CupertinoActivityIndicator()))); 17 | } 18 | 19 | static void dismiss() { 20 | if (Get.isDialogOpen!) { 21 | CustomNavigator().popFromMain(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/ui/home/hadith/components/HadithCategoryFilterButton.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:ramadan/utils/constants/color_constant.dart'; 4 | 5 | class HadithCategoryFilterButton extends StatelessWidget { 6 | HadithCategoryFilterButton({required this.onSelected, required this.hadithCategory, super.key}); 7 | void Function(String)? onSelected; 8 | final List hadithCategory; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return PopupMenuButton( 13 | icon: Icon(Icons.filter_list_outlined, size: 24.sp, color: ColorCommonConstant.black), 14 | offset: const Offset(0, 32), 15 | onSelected: onSelected, 16 | itemBuilder: (context) { 17 | return hadithCategory 18 | .map( 19 | (item) => PopupMenuItem( 20 | value: item, 21 | child: Text(item), 22 | ), 23 | ) 24 | .toList(); 25 | }, 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/services/common/core/LocationService.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: one_member_abstracts 2 | 3 | import 'package:geocoding/geocoding.dart'; 4 | import 'package:geolocator/geolocator.dart'; 5 | import 'package:ramadan/utils/constants/string_constant.dart'; 6 | import 'package:ramadan/utils/exceptions/CustomException.dart'; 7 | 8 | abstract class ILocationService { 9 | Future getCityNameFromCoordinates(); 10 | } 11 | 12 | final class LocationService implements ILocationService { 13 | @override 14 | Future getCityNameFromCoordinates() async { 15 | try { 16 | final position = await Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high); 17 | final placemarks = await placemarkFromCoordinates(position.latitude, position.longitude); 18 | 19 | if (placemarks.isNotEmpty) { 20 | final cityName = placemarks.first.administrativeArea ?? ''; 21 | return cityName.toUpperCase(); 22 | } 23 | } catch (e) { 24 | throw CustomException(StringHomeConstant.coordinateError); 25 | } 26 | return ''; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/services/home/HadithService.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: lines_longer_than_80_chars, prefer_final_locals, one_member_abstracts 2 | 3 | import 'dart:convert'; 4 | 5 | import 'package:flutter/services.dart'; 6 | import 'package:ramadan/model/domain/HadithModel.dart'; 7 | import 'package:ramadan/utils/constants/string_constant.dart'; 8 | import 'package:ramadan/utils/exceptions/CustomException.dart'; 9 | 10 | abstract class IHadithService { 11 | Future> loadHadiths(); 12 | } 13 | 14 | final class HadithService implements IHadithService { 15 | @override 16 | Future> loadHadiths() async { 17 | try { 18 | var jsonString = await rootBundle.loadString(ProjectConstant.hadithJsonPath); 19 | dynamic decodedJson = json.decode(jsonString); 20 | 21 | var jsonList = decodedJson as List; 22 | 23 | var hadithList = jsonList.map((item) => HadithModel.fromJson(item as Map)).toList(); 24 | return hadithList; 25 | } catch (e) { 26 | throw CustomException(StringCommonConstant.anErrorHadithService); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/utils/popups/CustomSnackBar.dart: -------------------------------------------------------------------------------- 1 | import 'package:another_flushbar/flushbar.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:ramadan/utils/popups/CustomSnackBarType.dart'; 4 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 5 | 6 | class CustomSnackBar { 7 | static Future showSnackBar(BuildContext context, CustomSnackBarType snackBarType, String text) async { 8 | Color backgroundColor; 9 | switch (snackBarType) { 10 | case CustomSnackBarType.success: 11 | backgroundColor = const Color(0xFFa3c5a1); 12 | case CustomSnackBarType.error: 13 | backgroundColor = const Color(0xffe16e66); 14 | } 15 | 16 | await Flushbar( 17 | flushbarPosition: FlushbarPosition.TOP, 18 | messageText: Text( 19 | text, 20 | style: CustomTextTheme(context).bodyMedium.copyWith(fontWeight: FontWeight.w600), 21 | textAlign: TextAlign.center, 22 | ), 23 | backgroundColor: backgroundColor, 24 | duration: const Duration(seconds: 3), 25 | isDismissible: false, 26 | ).show(context); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 1.0.6 | :white_check_mark: | 11 | | < 1.0.6 | :x: | 12 | 13 | ## Reporting a Vulnerability 14 | 15 | To report a vulnerability, please create a new issue in the GitHub repository. We will review and respond to all reported vulnerabilities as quickly as possible. 16 | 17 | Once a vulnerability is reported: 18 | - We will acknowledge the receipt of the report within 2 business days. 19 | - Our team will investigate the reported vulnerability and determine its validity. 20 | - If the vulnerability is valid, we will prioritize fixing it based on its severity and impact. 21 | - We will provide updates on the progress of fixing the vulnerability in the GitHub issue. 22 | - Once the vulnerability is fixed, we will release a new version of the project with the security patch. 23 | 24 | Thank you for helping us keep our project secure. 25 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ramazan 2024", 3 | "short_name": "Ramazan 2024", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Samed Demir 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/ui/common/button/CustomLoginButton.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:ramadan/ui/login/components/CustomLoginButtonType.dart'; 3 | import 'package:ramadan/utils/constants/color_constant.dart'; 4 | 5 | class CustomButton { 6 | static Widget getButton({required CustomLoginButtonType customLoginButtonType, required String text, required TextStyle? textStyle, void Function()? onPressed}) { 7 | switch (customLoginButtonType) { 8 | case CustomLoginButtonType.primary: 9 | return ElevatedButton( 10 | onPressed: onPressed, 11 | style: ElevatedButton.styleFrom( 12 | backgroundColor: ColorBackgroundConstant.black, 13 | shape: RoundedRectangleBorder( 14 | borderRadius: BorderRadius.circular(12), 15 | ), 16 | ), 17 | child: Text( 18 | text, 19 | style: textStyle, 20 | ), 21 | ); 22 | 23 | case CustomLoginButtonType.text: 24 | return TextButton( 25 | onPressed: onPressed, 26 | child: Text( 27 | text, 28 | style: textStyle, 29 | ), 30 | ); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.github/workflows/dart.yml: -------------------------------------------------------------------------------- 1 | name: iOS-ipa-build 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | build-ios: 8 | name: 🎉 iOS Build 9 | runs-on: macos-latest 10 | steps: 11 | - uses: actions/checkout@v3 12 | 13 | - uses: subosito/flutter-action@v2 14 | with: 15 | channel: 'stable' 16 | architecture: x64 17 | - run: flutter pub get 18 | 19 | 20 | - run: pod repo update 21 | working-directory: ios 22 | 23 | - run: flutter build ios --release --no-codesign 24 | 25 | - run: mkdir Payload 26 | working-directory: build/ios/iphoneos 27 | 28 | - run: mv Runner.app/ Payload 29 | working-directory: build/ios/iphoneos 30 | 31 | - name: Zip output 32 | run: zip -qq -r -9 FlutterIpaExport.ipa Payload 33 | working-directory: build/ios/iphoneos 34 | 35 | - name: Upload binaries to release 36 | uses: svenstaro/upload-release-action@v2 37 | with: 38 | repo_token: ${{ secrets.GITHUB_TOKEN }} 39 | file: build/ios/iphoneos/FlutterIpaExport.ipa 40 | tag: v1.0 41 | overwrite: true 42 | body: "This is first release" 43 | -------------------------------------------------------------------------------- /lib/ui/common/dialogs/CustomDialogWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:ramadan/ui/common/button/CustomLoginButton.dart'; 3 | import 'package:ramadan/ui/login/components/CustomLoginButtonType.dart'; 4 | import 'package:ramadan/utils/constants/color_constant.dart'; 5 | import 'package:ramadan/utils/constants/string_constant.dart'; 6 | 7 | class CustomDialogWidget extends StatelessWidget { 8 | const CustomDialogWidget(this.title, this.message, this.onPressed, {super.key}); 9 | final String title; 10 | final String message; 11 | final void Function() onPressed; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return AlertDialog( 16 | shape: RoundedRectangleBorder( 17 | borderRadius: BorderRadius.circular(20), 18 | ), 19 | elevation: 0, 20 | backgroundColor: ColorBackgroundConstant.white, 21 | title: Text(title), 22 | content: Text(message), 23 | actions: [ 24 | CustomButton.getButton( 25 | customLoginButtonType: CustomLoginButtonType.primary, 26 | text: StringCommonConstant.submit, 27 | textStyle: null, 28 | onPressed: onPressed, 29 | ), 30 | ], 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/services/common/performance/PerformanceMonitoringService.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_performance/firebase_performance.dart'; 2 | import 'package:http/http.dart'; 3 | 4 | abstract class IPerformanceMonitoringService { 5 | Future startHttpMetric(String endpoint, HttpMethod httpMethod); 6 | Future stopHttpMetric(String endpoint, HttpMetric httpMetric, Response response); 7 | } 8 | 9 | final class PerformanceMonitoringService extends IPerformanceMonitoringService { 10 | final FirebasePerformance _performance = FirebasePerformance.instance; 11 | Trace? _trace; 12 | 13 | @override 14 | Future startHttpMetric(String endpoint, HttpMethod httpMethod) async { 15 | final metric = _performance.newHttpMetric(endpoint, httpMethod); 16 | await metric.start(); 17 | await _startTrace(); 18 | return metric; 19 | } 20 | 21 | @override 22 | Future stopHttpMetric(String endpoint, HttpMetric httpMetric, Response response) async { 23 | httpMetric.httpResponseCode = response.statusCode; 24 | _trace?.setMetric(endpoint, response.statusCode); 25 | await _trace?.stop(); 26 | } 27 | 28 | Future _startTrace() async { 29 | _trace = _performance.newTrace('service-trace'); 30 | await _trace?.start(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/model/domain/PrayerTimesModel.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, avoid_dynamic_calls 2 | 3 | import 'package:ramadan/model/domain/PrayerTimeDetails.dart'; 4 | 5 | class PrayerTimesModel { 6 | PrayerTimesModel({ 7 | required this.cityName, 8 | required this.region, 9 | required this.times, 10 | }); 11 | 12 | factory PrayerTimesModel.fromJson(Map json) { 13 | final timesList = []; 14 | json['times'].forEach((String key, dynamic value) { 15 | timesList.add( 16 | PrayerTimeDetails.fromJson({ 17 | 'date': key, 18 | 'times': value, 19 | }), 20 | ); 21 | }); 22 | 23 | return PrayerTimesModel( 24 | cityName: json['place']['city'] as String, 25 | region: json['place']['region'] as String, 26 | times: timesList, 27 | ); 28 | } 29 | final String cityName; 30 | final String region; 31 | final List times; 32 | 33 | Map toJson() { 34 | final timesListJson = times.map((time) => time.toJson()).toList(); 35 | 36 | return { 37 | 'place': { 38 | 'city': cityName, 39 | 'region': region, 40 | }, 41 | 'times': {for (final e in timesListJson) e['date']: e['times']}, 42 | }; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | void RegisterPlugins(flutter::PluginRegistry* registry) { 17 | FirebaseAuthPluginCApiRegisterWithRegistrar( 18 | registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi")); 19 | FirebaseCorePluginCApiRegisterWithRegistrar( 20 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 21 | GeolocatorWindowsRegisterWithRegistrar( 22 | registry->GetRegistrarForPlugin("GeolocatorWindows")); 23 | PermissionHandlerWindowsPluginRegisterWithRegistrar( 24 | registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); 25 | SharePlusWindowsPluginCApiRegisterWithRegistrar( 26 | registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); 27 | UrlLauncherWindowsRegisterWithRegistrar( 28 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 29 | } 30 | -------------------------------------------------------------------------------- /lib/utils/initialize/AppPreferences.dart: -------------------------------------------------------------------------------- 1 | import 'package:ramadan/utils/constants/string_constant.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | abstract class IAppPreferences { 5 | Future init(); 6 | Future isFirstOpen(); 7 | Future setFirstOpen({required bool value}); 8 | Future getNotificationPermission(); 9 | Future setNotificationPermission({required bool value}); 10 | } 11 | 12 | class AppPreferences implements IAppPreferences { 13 | late SharedPreferences _prefs; 14 | 15 | @override 16 | Future init() async { 17 | _prefs = await SharedPreferences.getInstance(); 18 | } 19 | 20 | // Uygulamanın ilk kez açılıp açılmadığını kontrol et 21 | @override 22 | Future isFirstOpen() async { 23 | return _prefs.getBool(StringCommonConstant.isFirstOpenKey) ?? true; 24 | } 25 | 26 | // Uygulamanın ilk kez açıldığını işaretle 27 | @override 28 | Future setFirstOpen({required bool value}) async { 29 | await _prefs.setBool(StringCommonConstant.isFirstOpenKey, value); 30 | } 31 | 32 | @override 33 | Future getNotificationPermission() async { 34 | return _prefs.getBool('Notification') ?? false; 35 | } 36 | 37 | @override 38 | Future setNotificationPermission({required bool value}) async { 39 | await _prefs.setBool('Notification', value); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"ramadan", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /lib/ui/home/home/components/TimeCard.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | import 'package:ramadan/utils/constants/color_constant.dart'; 5 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 6 | 7 | class TimeCard extends StatelessWidget { 8 | const TimeCard({required this.time, required this.header, required this.color, super.key}); 9 | final String time; 10 | final String header; 11 | final Color color; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Column( 16 | mainAxisAlignment: MainAxisAlignment.center, 17 | children: [ 18 | Container( 19 | padding: context.padding.low, 20 | decoration: BoxDecoration(color: ColorCommonConstant.white, borderRadius: BorderRadius.circular(16), border: Border.all(color: ColorTextConstant.black)), 21 | child: Text( 22 | time, 23 | style: CustomTextTheme(context).headlineMedium.copyWith( 24 | fontWeight: FontWeight.bold, 25 | color: color, 26 | ), 27 | ), 28 | ), 29 | SizedBox( 30 | height: 10.h, 31 | ), 32 | Text( 33 | header, 34 | style: CustomTextTheme(context).bodyMedium.copyWith(color: ColorTextConstant.black), 35 | ), 36 | ], 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/utils/constants/date_constant.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | @immutable 4 | final class DateConstant { 5 | const DateConstant._(); 6 | static String getValidDate() { 7 | final currentDate = DateTime.now(); 8 | final startDate = DateTime(2024, 3, 11); 9 | final endDate = DateTime(2024, 4, 9); 10 | 11 | // Eğer current date belirtilen aralığın dışındaysa, 11 Mart 2024'ü döndür 12 | if (currentDate.isBefore(startDate) || currentDate.isAfter(endDate)) { 13 | return '11 ${_getMonthName(startDate.month)} ${_getDayOfWeek(startDate)}'; 14 | } 15 | 16 | // Eğer current date belirtilen aralıkta ise, current date'i döndür 17 | return '${currentDate.day} ${_getMonthName(currentDate.month)} ${_getDayOfWeek(currentDate)}'; 18 | } 19 | 20 | static String _getMonthName(int month) { 21 | switch (month) { 22 | case 3: 23 | return 'Mart'; 24 | case 4: 25 | return 'Nisan'; 26 | default: 27 | return ''; 28 | } 29 | } 30 | 31 | static String _getDayOfWeek(DateTime date) { 32 | switch (date.weekday) { 33 | case 1: 34 | return 'Pazartesi'; 35 | case 2: 36 | return 'Salı'; 37 | case 3: 38 | return 'Çarşamba'; 39 | case 4: 40 | return 'Perşembe'; 41 | case 5: 42 | return 'Cuma'; 43 | case 6: 44 | return 'Cumartesi'; 45 | case 7: 46 | return 'Pazar'; 47 | default: 48 | return ''; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/services/common/ExceptionHandlingService.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: one_member_abstracts 2 | 3 | import 'dart:io'; 4 | 5 | import 'package:firebase_crashlytics/firebase_crashlytics.dart'; 6 | import 'package:ramadan/ui/common/dialogs/CustomDialogWidget.dart'; 7 | import 'package:ramadan/utils/constants/string_constant.dart'; 8 | import 'package:ramadan/utils/exceptions/CustomException.dart'; 9 | import 'package:ramadan/utils/popups/CustomDialog.dart'; 10 | 11 | abstract class IExceptionHandlingService { 12 | Future handleException(dynamic exception); 13 | } 14 | 15 | final class ExceptionHandlingService implements IExceptionHandlingService { 16 | @override 17 | Future handleException(dynamic exception) async { 18 | String dialogMessageKey; 19 | 20 | await FirebaseCrashlytics.instance.log('${StackTrace.current} / ${exception is! CustomException ? exception : exception.message}'); 21 | await FirebaseCrashlytics.instance.setCustomKey('ExceptionType', exception is! CustomException ? 'Exception' : 'CustomException'); 22 | await FirebaseCrashlytics.instance.recordError('${exception is! CustomException ? exception : exception.message}', StackTrace.current, printDetails: true); 23 | 24 | if (exception is! CustomException) { 25 | dialogMessageKey = StringCommonConstant.anErrorOccured; 26 | } else { 27 | dialogMessageKey = exception.message; 28 | } 29 | 30 | CustomDialog.showCustomDialog(CustomDialogWidget(StringCommonConstant.appName, dialogMessageKey, () => exit(1))); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/ui/home/components/CustomBottomNavigation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:ramadan/utils/constants/color_constant.dart'; 3 | 4 | enum TabItem { home, calendar } 5 | 6 | const Map tabIcons = { 7 | TabItem.home: Icons.home_outlined, 8 | TabItem.calendar: Icons.mosque_outlined, 9 | }; 10 | 11 | class CustomBottomNavigation extends StatelessWidget { 12 | const CustomBottomNavigation({ 13 | required this.onSelectedTab, 14 | required this.tabController, 15 | super.key, 16 | }); 17 | final ValueChanged onSelectedTab; 18 | final TabController tabController; 19 | 20 | static const _notcMarginSize = 10.0; 21 | @override 22 | Widget build(BuildContext context) { 23 | return BottomAppBar( 24 | notchMargin: _notcMarginSize, 25 | elevation: 0, 26 | shape: const CircularNotchedRectangle(), 27 | child: TabBar( 28 | controller: tabController, 29 | indicatorColor: ColorCommonConstant.blue, 30 | labelPadding: EdgeInsets.zero, 31 | onTap: (value) { 32 | onSelectedTab(TabItem.values[value]); 33 | }, 34 | tabs: [ 35 | _buildItem(TabItem.home), 36 | _buildItem(TabItem.calendar), 37 | ], 38 | ), 39 | ); 40 | } 41 | 42 | Tab _buildItem(TabItem tabItem) { 43 | return Tab( 44 | iconMargin: EdgeInsets.zero, 45 | icon: Icon( 46 | tabIcons[tabItem], 47 | color: ColorCommonConstant.black, 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/ui/splash/SplashPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | import 'package:ramadan/ui/splash/SplashPageViewModel.dart'; 5 | import 'package:ramadan/utils/constants/color_constant.dart'; 6 | import 'package:ramadan/utils/constants/image_constant.dart'; 7 | import 'package:ramadan/utils/constants/string_constant.dart'; 8 | 9 | class SplashPage extends StatelessWidget { 10 | SplashPage({super.key}); 11 | late SplashPageViewModel _splashPageViewModel; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | _splashPageViewModel = Get.put(SplashPageViewModel()); 16 | return Obx( 17 | () => Scaffold( 18 | backgroundColor: ColorBackgroundConstant.white, 19 | body: !_splashPageViewModel.isCurrentVersionOk.value 20 | ? Padding( 21 | padding: context.padding.medium, 22 | child: Column( 23 | mainAxisAlignment: MainAxisAlignment.center, 24 | children: [ 25 | AppSplashLottiesConstant.splash.toLottie, 26 | Text( 27 | StringCommonConstant.appVersionInformation.replaceAll('%s', _splashPageViewModel.appVersion.value), 28 | style: context.textTheme.labelSmall, 29 | textAlign: TextAlign.center, 30 | ), 31 | ], 32 | ), 33 | ) 34 | : const SizedBox(), 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a 17 | base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a 18 | - platform: android 19 | create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a 20 | base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a 21 | - platform: ios 22 | create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a 23 | base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a 24 | - platform: web 25 | create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a 26 | base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a 27 | - platform: windows 28 | create_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a 29 | base_revision: ff5b5b5fa6f35b717667719ddfdb1521d8bdd05a 30 | 31 | # User provided section 32 | 33 | # List of Local paths (relative to this file) that should be 34 | # ignored by the migrate tool. 35 | # 36 | # Files that are not part of the templates will be ignored by default. 37 | unmanaged_files: 38 | - 'lib/main.dart' 39 | - 'ios/Runner.xcodeproj/project.pbxproj' 40 | -------------------------------------------------------------------------------- /lib/utils/constants/color_constant.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:hexcolor/hexcolor.dart'; 3 | 4 | @immutable 5 | final class ColorBackgroundConstant { 6 | const ColorBackgroundConstant._(); 7 | 8 | static Color white = HexColor('#FFFFFF'); 9 | static Color black = HexColor('#000000'); 10 | } 11 | 12 | @immutable 13 | final class ColorTextConstant { 14 | const ColorTextConstant._(); 15 | 16 | static Color forestMaid = HexColor('#5CB85C'); 17 | static Color white = HexColor('#FFFFFF'); 18 | static Color black = HexColor('#000000'); 19 | static Color orangeAccent = HexColor('#FF9800'); 20 | } 21 | 22 | @immutable 23 | final class PrayerTimeColor { 24 | const PrayerTimeColor._(); 25 | 26 | static Color imsak = HexColor('#4B0082'); 27 | static Color gunes = HexColor('#FFD700'); 28 | static Color ogle = HexColor('#228B22'); 29 | static Color ikindi = HexColor('#FF4500'); 30 | static Color iftar = HexColor('#8B4513'); 31 | static Color yatsi = HexColor('#00008B'); 32 | } 33 | 34 | @immutable 35 | final class ColorCommonConstant { 36 | const ColorCommonConstant._(); 37 | 38 | static Color transparent = Colors.transparent; 39 | static Color white = HexColor('#FFFFFF'); 40 | static Color black = HexColor('#000000'); 41 | static Color saddleBrown = HexColor('#8B4513'); 42 | 43 | //TextField 44 | static Color grey = HexColor('#9E9E9E'); 45 | static Color greyShade100 = HexColor('#F5F5F5'); 46 | static Color red = HexColor('#F44336'); 47 | 48 | //BottomNavigation 49 | static Color blue = HexColor('#2196F3'); 50 | } 51 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /lib/utils/theme/AppThemeLight.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_constructors_over_static_methods 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:ramadan/utils/constants/color_constant.dart'; 5 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 6 | 7 | class AppThemeLight { 8 | AppThemeLight._init(this.context); 9 | final BuildContext context; 10 | 11 | static AppThemeLight? _instance; 12 | 13 | static AppThemeLight getInstance(BuildContext context) { 14 | _instance ??= AppThemeLight._init(context); 15 | return _instance!; 16 | } 17 | 18 | ThemeData get theme => ThemeData( 19 | primaryTextTheme: _textThemes, 20 | textTheme: _textThemes, 21 | highlightColor: Colors.transparent, 22 | splashColor: Colors.transparent, 23 | appBarTheme: appBarTheme, 24 | ); 25 | 26 | AppBarTheme get appBarTheme { 27 | return ThemeData.light().appBarTheme.copyWith( 28 | backgroundColor: ColorCommonConstant.transparent, 29 | elevation: 0, 30 | centerTitle: false, 31 | ); 32 | } 33 | 34 | TextTheme get _textThemes { 35 | return ThemeData.light().textTheme.copyWith( 36 | bodyMedium: CustomTextTheme(context).bodyMedium, 37 | titleMedium: CustomTextTheme(context).titleMedium, 38 | labelMedium: CustomTextTheme(context).labelMedium, 39 | bodySmall: CustomTextTheme(context).bodySmall, 40 | headlineMedium: CustomTextTheme(context).headlineMedium, 41 | labelSmall: CustomTextTheme(context).labelSmall, 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ramadan 2 | description: E-Ramadan App 3 | 4 | publish_to: 'none' 5 | 6 | 7 | version: 1.0.6+1060 8 | 9 | environment: 10 | sdk: '>=3.1.0 <4.0.0' 11 | 12 | dependencies: 13 | flutter: 14 | sdk: flutter 15 | 16 | #State Management 17 | get: ^4.6.6 18 | 19 | #Firebasess 20 | firebase_core: ^2.24.2 21 | firebase_crashlytics: ^3.4.9 22 | firebase_analytics: ^10.8.0 23 | firebase_core_platform_interface: ^5.0.0 24 | firebase_auth: ^4.10.0 25 | google_sign_in: ^6.1.6 26 | firebase_remote_config: ^4.3.8 27 | firebase_performance: ^0.9.3+8 28 | 29 | #Maps 30 | permission_handler: ^11.0.1 31 | latlong2: ^0.9.0 32 | geolocator: ^10.1.0 33 | geocoding: ^2.1.1 34 | 35 | #Network 36 | intl: ^0.19.0 37 | http: ^1.0.0 38 | 39 | #UI Operations 40 | lottie: ^2.7.0 41 | flutter_screenutil: ^5.9.0 42 | kartal: ^3.5.0 43 | easy_logger: ^0.0.2 44 | logger: ^2.0.2+1 45 | animated_text_kit: ^4.2.2 46 | intro_slider: ^4.2.1 47 | hexcolor: ^3.0.1 48 | another_flushbar: ^1.12.30 49 | flutter_svg: ^2.0.7 50 | 51 | #Other 52 | cupertino_icons: ^1.0.6 53 | google_fonts: 6.1.0 54 | flutter_local_notifications: ^16.3.2 55 | 56 | #Database 57 | shared_preferences: ^2.2.2 58 | 59 | dev_dependencies: 60 | very_good_analysis: ^5.1.0 61 | 62 | 63 | flutter: 64 | uses-material-design: true 65 | assets: 66 | - assets/lottie/ 67 | - assets/lottie/splash_slider_lottie/ 68 | - assets/lottie/splash/ 69 | - assets/image/login/ 70 | - assets/image/home/ 71 | - assets/image/hadith/ 72 | - assets/json/hadiths.json 73 | 74 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 | import 'package:get/get.dart'; 6 | import 'package:ramadan/ui/splash/SplashPage.dart'; 7 | import 'package:ramadan/utils/constants/string_constant.dart'; 8 | import 'package:ramadan/utils/initialize/ProjectInitialize.dart'; 9 | import 'package:ramadan/utils/localization/CustomTranslations.dart'; 10 | import 'package:ramadan/utils/theme/AppThemeLight.dart'; 11 | 12 | GlobalKey mainNavigatorKey = GlobalKey(); 13 | GlobalKey _navigatorKeyHome = GlobalKey(); 14 | GlobalKey _navigatorKeyProfile = GlobalKey(); 15 | 16 | List> navigatorKeys = [_navigatorKeyHome, _navigatorKeyProfile]; 17 | 18 | Future main() async { 19 | await ProjectInitialize().make(); 20 | runApp(const MyApp()); 21 | } 22 | 23 | class MyApp extends StatelessWidget { 24 | const MyApp({super.key}); 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return ScreenUtilInit( 29 | minTextAdapt: true, 30 | builder: (__, _) { 31 | return GetMaterialApp( 32 | title: StringCommonConstant.appName, 33 | debugShowCheckedModeBanner: false, 34 | home: SplashPage(), 35 | translations: CustomTranslations(), 36 | theme: AppThemeLight.getInstance(context).theme, 37 | locale: Get.deviceLocale, 38 | fallbackLocale: const Locale('en', 'US'), 39 | navigatorKey: mainNavigatorKey, 40 | ); 41 | }, 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/utils/validator/LoginValidator.dart: -------------------------------------------------------------------------------- 1 | import 'package:ramadan/utils/constants/string_constant.dart'; 2 | import 'package:ramadan/utils/enums/LoginTypeEnum.dart'; 3 | 4 | final class LoginValidator { 5 | static String? validateEmail(String value) { 6 | if (value.isEmpty) { 7 | return StringCommonConstant.emptyEmailError; 8 | } else if (!RegExp(r'^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$').hasMatch(value)) { 9 | return StringCommonConstant.invalidEmailError; 10 | } 11 | return null; 12 | } 13 | 14 | static String? validatePassword(String value) { 15 | if (value.isEmpty) { 16 | return StringCommonConstant.emptyPasswordError; 17 | } else if (value.length < 6) { 18 | return StringCommonConstant.emptyPasswordError; 19 | } 20 | return null; 21 | } 22 | 23 | static String? validatePasswordConfirmation(String password, String? confirmPassword) { 24 | if (confirmPassword == null || confirmPassword.isEmpty) { 25 | return StringCommonConstant.emptyPasswordConfirmationError; 26 | } else if (confirmPassword != password) { 27 | return StringCommonConstant.mismatchedPasswordError; 28 | } 29 | return null; 30 | } 31 | 32 | static String? validateLogin(String value, LoginTypeEnum loginTypeEnum, [String? confirmPassword]) { 33 | switch (loginTypeEnum) { 34 | case LoginTypeEnum.email: 35 | return LoginValidator.validateEmail(value); 36 | case LoginTypeEnum.password: 37 | return LoginValidator.validatePassword(value); 38 | case LoginTypeEnum.confirm: 39 | return LoginValidator.validatePasswordConfirmation(value, confirmPassword); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/ui/home/home/components/CountdownWidget.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:ramadan/ui/home/home/components/TimeCard.dart'; 5 | import 'package:ramadan/utils/constants/color_constant.dart'; 6 | import 'package:ramadan/utils/constants/string_constant.dart'; 7 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 8 | 9 | class CountdownTimerWidget extends StatelessWidget { 10 | final String hours; 11 | final String minutes; 12 | final String seconds; 13 | final String title; 14 | final Color color; 15 | 16 | const CountdownTimerWidget({required this.title, required this.hours, required this.minutes, required this.seconds, required this.color, super.key}); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Column( 21 | children: [ 22 | Text( 23 | title, 24 | style: CustomTextTheme(context).titleMedium.copyWith(color: ColorTextConstant.black, fontWeight: FontWeight.bold), 25 | ), 26 | SizedBox( 27 | height: 10.h, 28 | ), 29 | Row( 30 | mainAxisAlignment: MainAxisAlignment.center, 31 | children: [ 32 | TimeCard(time: hours, color: color, header: StringHomeConstant.hours), 33 | SizedBox(width: 4.w), 34 | TimeCard(time: minutes, color: color, header: StringHomeConstant.minutes), 35 | SizedBox(width: 4.w), 36 | TimeCard(time: seconds, color: color, header: StringHomeConstant.seconds), 37 | ], 38 | ), 39 | ], 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/utils/constants/image_constant.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | import 'package:lottie/lottie.dart'; 4 | 5 | enum AppSplashSliderLottiesConstant { 6 | appLottie1('splash_slide-1'), 7 | appLottie2('splash_slide-2'), 8 | appLottie3('splash_slide-3'); 9 | 10 | const AppSplashSliderLottiesConstant(this.value); 11 | final String value; 12 | 13 | String get getLottie => 'assets/lottie/splash_slider_lottie/$value.json'; 14 | LottieBuilder get toLottie => Lottie.asset(getLottie); 15 | } 16 | 17 | enum AppSplashLottiesConstant { 18 | splash('splash_build_app'); 19 | 20 | const AppSplashLottiesConstant(this.value); 21 | final String value; 22 | 23 | String get getLottie => 'assets/lottie/splash/$value.json'; 24 | LottieBuilder get toLottie => Lottie.asset(getLottie); 25 | } 26 | 27 | enum AppImageConstant { 28 | facebook('login_facebook'), 29 | google('login_google'); 30 | 31 | const AppImageConstant(this.value); 32 | final String value; 33 | 34 | String get toPng => 'assets/image/login/$value.png'; 35 | AssetImage get toImg => AssetImage(toPng); 36 | } 37 | 38 | enum PrayerTimeIconConstant { 39 | imsak('moon'), 40 | gunes('sun'), 41 | ogle('cloudy'), 42 | ikindi('morning'), 43 | iftar('ramadan'), 44 | yatsi('half_moon'); 45 | 46 | const PrayerTimeIconConstant(this.value); 47 | final String value; 48 | 49 | String get toPng => 'assets/image/home/$value.png'; 50 | AssetImage get toImg => AssetImage(toPng); 51 | } 52 | 53 | enum HadithLogoConstant { 54 | logoHadith('logo_hadith'); 55 | 56 | const HadithLogoConstant(this.value); 57 | final String value; 58 | 59 | String get toSvg => 'assets/image/hadith/$value.svg'; 60 | SvgPicture get toImg => SvgPicture.asset(toSvg); 61 | } 62 | -------------------------------------------------------------------------------- /lib/utils/formatter/DateTimeFormatter.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:intl/intl.dart'; 3 | import 'package:ramadan/utils/constants/string_constant.dart'; 4 | 5 | class DateTimeFormatter { 6 | RxString formatTodayDate() { 7 | final today = DateTime.now(); 8 | 9 | // Türkçe gün isimleri için sabit bir liste oluştur 10 | final dayNames = [ 11 | StringHomeConstant.mon, 12 | StringHomeConstant.tue, 13 | StringHomeConstant.wed, 14 | StringHomeConstant.thu, 15 | StringHomeConstant.fri, 16 | StringHomeConstant.sat, 17 | StringHomeConstant.sun, 18 | ]; 19 | 20 | // Tarih bilgisini oluşturulan listeye göre formatla 21 | final formattedDate = '${dayNames[today.weekday - 1]}, ${today.day} ${_getMonth(today.month)}'; 22 | 23 | return formattedDate.obs; 24 | } 25 | 26 | String _getMonth(int month) { 27 | // Türkçe ay isimleri için sabit bir liste oluştur 28 | final monthNames = [ 29 | StringHomeConstant.jan, 30 | StringHomeConstant.feb, 31 | StringHomeConstant.mar, 32 | StringHomeConstant.apr, 33 | StringHomeConstant.may, 34 | StringHomeConstant.jun, 35 | StringHomeConstant.jul, 36 | StringHomeConstant.aug, 37 | StringHomeConstant.sep, 38 | StringHomeConstant.oct, 39 | StringHomeConstant.nov, 40 | StringHomeConstant.dec, 41 | ]; 42 | 43 | return monthNames[month - 1]; 44 | } 45 | 46 | DateTime getPrayerTime(String prayerDate) { 47 | final parsedData = DateFormat('dd MMMM, EEEE', 'tr_TR').parse(prayerDate); 48 | return DateTime(2024, parsedData.month, parsedData.day); 49 | } 50 | 51 | DateTime targetDateTime(String prayerTime) { 52 | final time = DateFormat('HH:mm', 'tr_TR').parse(prayerTime); 53 | return time; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/utils/initialize/AppVersionChecker.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_remote_config/firebase_remote_config.dart'; 2 | import 'package:kartal/kartal.dart'; 3 | import 'package:ramadan/utils/constants/string_constant.dart'; 4 | import 'package:ramadan/utils/exceptions/CustomException.dart'; 5 | 6 | final FirebaseRemoteConfig _firebaseRemoteConfig = FirebaseRemoteConfig.instance; 7 | 8 | abstract class IAppVersionChecker { 9 | Future checkAppVersion(); 10 | Future getAppVersion(); 11 | } 12 | 13 | class AppVersionChecker implements IAppVersionChecker { 14 | @override 15 | Future checkAppVersion() async { 16 | try { 17 | await _firebaseRemoteConfig.setConfigSettings( 18 | RemoteConfigSettings( 19 | fetchTimeout: const Duration(seconds: 30), 20 | minimumFetchInterval: const Duration(seconds: 30), 21 | ), 22 | ); 23 | await _firebaseRemoteConfig.fetchAndActivate(); 24 | 25 | final currentAppVersion = ''.ext.version; 26 | final activeAppVersion = _firebaseRemoteConfig.getString(StringCommonConstant.appVersion); 27 | 28 | return isVersionLessThan(currentAppVersion, activeAppVersion); 29 | } catch (e) { 30 | throw CustomException('message'); 31 | } 32 | } 33 | 34 | // Versiyonları karşılaştıran yardımcı bir fonksiyon 35 | bool isVersionLessThan(String currentVersion, String newVersion) { 36 | return newVersion.compareTo(currentVersion) <= 0; 37 | } 38 | 39 | @override 40 | Future getAppVersion() async { 41 | await _firebaseRemoteConfig.setConfigSettings( 42 | RemoteConfigSettings( 43 | fetchTimeout: const Duration(minutes: 1), 44 | minimumFetchInterval: const Duration(hours: 12), 45 | ), 46 | ); 47 | await _firebaseRemoteConfig.fetchAndActivate(); 48 | 49 | return _firebaseRemoteConfig.getString(StringCommonConstant.appVersion); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/utils/initialize/ProjectInitialize.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, lines_longer_than_80_chars 2 | 3 | import 'dart:async'; 4 | import 'dart:io'; 5 | 6 | import 'package:firebase_core/firebase_core.dart'; 7 | import 'package:firebase_crashlytics/firebase_crashlytics.dart'; 8 | import 'package:flutter/foundation.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter/services.dart'; 11 | import 'package:intl/date_symbol_data_local.dart'; 12 | import 'package:kartal/kartal.dart'; 13 | import 'package:logger/logger.dart'; 14 | import 'package:ramadan/firebase_options.dart'; 15 | import 'package:ramadan/utils/servicelocator/ServiceLocator.dart'; 16 | 17 | @immutable 18 | final class ProjectInitialize { 19 | Future make() async { 20 | WidgetsFlutterBinding.ensureInitialized(); 21 | 22 | await runZonedGuarded>(_initialize, (error, stack) { 23 | Logger().e(error); 24 | }); 25 | ServiceLocator().init(); 26 | } 27 | 28 | Future _initialize() async { 29 | await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); 30 | await DeviceUtility.instance.initPackageInfo(); // System data read or kartal package 31 | await SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.bottom]); 32 | await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); 33 | await initializeDateFormatting('tr_TR'); 34 | 35 | FlutterError.onError = (FlutterErrorDetails details) async { 36 | if (!kDebugMode) { 37 | await FirebaseCrashlytics.instance.log('${StackTrace.current} / ${details.exceptionAsString()}'); 38 | await FirebaseCrashlytics.instance.recordError(details.exceptionAsString(), StackTrace.current, printDetails: true, fatal: true); 39 | } 40 | Logger().e(details.exceptionAsString()); 41 | exit(1); 42 | }; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/ui/home/hadith/components/HadithCard.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | import 'package:ramadan/utils/constants/color_constant.dart'; 5 | import 'package:ramadan/utils/constants/image_constant.dart'; 6 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 7 | 8 | class HadithCard extends StatelessWidget { 9 | const HadithCard({ 10 | required this.text, 11 | required this.author, 12 | super.key, 13 | }); 14 | 15 | final String text; 16 | final String author; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Card( 21 | elevation: 0, 22 | margin: const EdgeInsets.symmetric(vertical: 8), 23 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12), side: BorderSide(color: ColorCommonConstant.black.withOpacity(0.1))), 24 | child: Padding( 25 | padding: context.padding.low, 26 | child: Column( 27 | mainAxisAlignment: MainAxisAlignment.center, 28 | crossAxisAlignment: CrossAxisAlignment.stretch, 29 | children: [ 30 | Align(alignment: Alignment.centerRight, child: SizedBox(width: 16.w, height: 24.h, child: HadithLogoConstant.logoHadith.toImg)), 31 | Text( 32 | text, 33 | textAlign: TextAlign.justify, 34 | style: CustomTextTheme(context).bodyMedium.copyWith(fontStyle: FontStyle.italic), 35 | ), 36 | SizedBox(height: 8.h), 37 | Align( 38 | alignment: Alignment.bottomRight, 39 | child: Text( 40 | author, 41 | style: CustomTextTheme(context).bodySmall.copyWith(color: ColorCommonConstant.saddleBrown), 42 | ), 43 | ), 44 | ], 45 | ), 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/services/home/TimeFormatterService.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:ramadan/utils/configuration/ProjectInfo.dart'; 4 | import 'package:ramadan/utils/constants/string_constant.dart'; 5 | 6 | final class TimeFormatterService { 7 | static (RxString, RxString, RxString) formatRemainingTime(int remainingSeconds) { 8 | final remainingDuration = Duration(seconds: remainingSeconds); 9 | 10 | final hours = remainingDuration.inHours; 11 | final minutes = remainingDuration.inMinutes % 60; 12 | final seconds = remainingDuration.inSeconds % 60; 13 | 14 | final formattedHours = hours.toString().padLeft(2, '0'); 15 | final formattedMinutes = minutes.toString().padLeft(2, '0'); 16 | final formattedSeconds = seconds.toString().padLeft(2, '0'); 17 | 18 | return (formattedHours.obs, formattedMinutes.obs, formattedSeconds.obs); 19 | } 20 | 21 | static RxString formatRemainingTimeName() { 22 | final indexOfTrue = ProjectInfo.instance.isActiveList.indexOf(true.obs); 23 | if (indexOfTrue == 0) { 24 | return StringHomeConstant.timeUntilFajr.obs; 25 | } else if (indexOfTrue < 5 && indexOfTrue > 0) { 26 | return StringHomeConstant.timeUntilSunset.obs; 27 | } else { 28 | return StringHomeConstant.timeUntilFajr.obs; 29 | } 30 | } 31 | 32 | static Rx formatRemainingTimeColor() { 33 | final indexOfTrue = ProjectInfo.instance.isActiveList.indexOf(true.obs); 34 | if (indexOfTrue == 0) { 35 | return ProjectInfo.instance.gridItemList.firstWhere((element) => element.id == indexOfTrue).color.obs; 36 | } else if (indexOfTrue < 5 && indexOfTrue > 0) { 37 | return ProjectInfo.instance.gridItemList.firstWhere((element) => element.id == 4).color.obs; 38 | } else { 39 | return ProjectInfo.instance.gridItemList.firstWhere((element) => element.id == indexOfTrue).color.obs; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/ui/home/home/components/GridCard.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:ramadan/model/home/GridItem.dart'; 4 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 5 | 6 | class GridCard extends StatelessWidget { 7 | const GridCard(this.item, {super.key}); 8 | final GridItem item; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Obx( 13 | () => Card( 14 | shape: RoundedRectangleBorder( 15 | borderRadius: BorderRadius.circular(12), 16 | side: item.isActive.value ? BorderSide(color: item.color, width: 2) : BorderSide.none, 17 | ), 18 | color: item.isActive.value ? item.color.withOpacity(0.5) : item.color.withOpacity(0.1), 19 | elevation: 0, 20 | child: Padding( 21 | padding: const EdgeInsets.fromLTRB(8, 8, 8, 0), 22 | child: Center( 23 | child: Column( 24 | mainAxisAlignment: MainAxisAlignment.center, 25 | children: [ 26 | const Spacer(flex: 2), 27 | Align(alignment: Alignment.topLeft, child: Text(item.title, style: CustomTextTheme(context).bodyMedium.copyWith(fontWeight: FontWeight.bold))), 28 | const Spacer(), 29 | Flexible( 30 | flex: 20, 31 | child: Align( 32 | alignment: Alignment.centerRight, 33 | child: Image.asset( 34 | item.iconPath, 35 | fit: BoxFit.contain, 36 | ), 37 | ), 38 | ), 39 | Align(alignment: Alignment.bottomLeft, child: Text(item.time, style: CustomTextTheme(context).titleMedium.copyWith())), 40 | const Spacer(flex: 2), 41 | ], 42 | ), 43 | ), 44 | ), 45 | ), 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/utils/navigation/CustomNavigator.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: cascade_invocations, public_member_api_docs, sort_unnamed_constructors_first, omit_local_variable_types, prefer_final_locals 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:ramadan/main.dart'; 6 | import 'package:ramadan/ui/home/CustomNavigationPageViewModel.dart'; 7 | import 'package:ramadan/ui/home/hadith/HadithPage.dart'; 8 | import 'package:ramadan/ui/home/home/HomePage.dart'; 9 | 10 | class CustomNavigator { 11 | factory CustomNavigator() { 12 | return _singleton; 13 | } 14 | CustomNavigator._internal(); 15 | static final CustomNavigator _singleton = CustomNavigator._internal(); 16 | 17 | static List navigators = [ 18 | Navigator( 19 | key: navigatorKeys[0], 20 | onGenerateRoute: (route) => MaterialPageRoute( 21 | settings: route, 22 | builder: (context) => HomePage(), 23 | ), 24 | ), 25 | Navigator( 26 | key: navigatorKeys[1], 27 | onGenerateRoute: (route) => MaterialPageRoute( 28 | settings: route, 29 | builder: (context) => HadithPage(), 30 | ), 31 | ), 32 | ]; 33 | 34 | Future pushToMain(Widget widget) async { 35 | Get.addKey(mainNavigatorKey); 36 | return await Get.to(widget); 37 | } 38 | 39 | void popFromMain([dynamic result]) { 40 | Get.addKey(mainNavigatorKey); 41 | Get.back(result: result); 42 | } 43 | 44 | Future pushAndRemoveUntil(Widget widget) async { 45 | Get.addKey(mainNavigatorKey); 46 | await Get.offAll(widget); 47 | } 48 | 49 | void popUntilCurrentTab() { 50 | // ignore: no_leading_underscores_for_local_identifiers 51 | CustomNavigationPageViewModel _customNavigationPageViewModel = Get.find(); 52 | Get.addKey(navigatorKeys[_customNavigationPageViewModel.currentStateIndex.value]); 53 | Get.until((route) => route.isFirst); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /lib/ui/home/CustomNavigationPageViewModel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:ramadan/ui/ViewModelBase.dart'; 4 | import 'package:ramadan/ui/home/city/CityListPage.dart'; 5 | import 'package:ramadan/ui/home/components/CustomBottomNavigation.dart'; 6 | import 'package:ramadan/ui/home/home/HomePageViewModel.dart'; 7 | import 'package:ramadan/utils/configuration/ProjectInfo.dart'; 8 | import 'package:ramadan/utils/navigation/CustomNavigator.dart'; 9 | 10 | class CustomNavigationPageViewModel extends ViewModelBase with GetSingleTickerProviderStateMixin { 11 | CustomNavigationPageViewModel(); 12 | Rx? tabController; 13 | 14 | Rx currentTab = TabItem.home.obs; 15 | RxInt currentTabIndex = 0.obs; 16 | RxInt currentStateIndex = 0.obs; 17 | 18 | late HomePageViewModel _homePageViewModel; 19 | 20 | void changeTab(TabItem newTab) { 21 | currentStateIndex.value = newTab.index; 22 | currentTabIndex.value = newTab.index; 23 | currentTab.value = newTab; 24 | tabController!.value.animateTo(currentTabIndex.value); 25 | } 26 | 27 | @override 28 | void onInit() { 29 | _homePageViewModel = Get.put(HomePageViewModel()); 30 | tabController = TabController(length: 2, vsync: this).obs; 31 | tabController!.value.addListener(() { 32 | currentTabIndex.value = tabController!.value.index; 33 | }); 34 | super.onInit(); 35 | } 36 | 37 | Future changeCity() async { 38 | final result = await CustomNavigator().pushToMain( 39 | CityListPage( 40 | turkeyCities: _homePageViewModel.citiesList, 41 | ), 42 | ); 43 | if (result != null) { 44 | ProjectInfo.instance.cityName.value = _homePageViewModel.citiesList[result].name; 45 | await _homePageViewModel.refreshPage(_homePageViewModel.citiesList[result].lowercaseName); 46 | } else { 47 | await _homePageViewModel.refreshPage(null); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Ramazan 2024 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ramadan 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | CADisableMinimumFrameDurationOnPhone 45 | 46 | UIApplicationSupportsIndirectInputEvents 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/ui/slider/SliderPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:intro_slider/intro_slider.dart'; 5 | import 'package:ramadan/ui/login/LoginPage.dart'; 6 | import 'package:ramadan/ui/slider/SliderPageViewModel.dart'; 7 | import 'package:ramadan/utils/constants/color_constant.dart'; 8 | import 'package:ramadan/utils/constants/string_constant.dart'; 9 | import 'package:ramadan/utils/navigation/CustomNavigator.dart'; 10 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 11 | 12 | class SliderPage extends StatelessWidget { 13 | SliderPage({super.key}); 14 | late SliderPageViewModel _sliderPageViewModel; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | _sliderPageViewModel = Get.put(SliderPageViewModel(context)); 19 | return IntroSlider( 20 | key: UniqueKey(), 21 | listContentConfig: _sliderPageViewModel.slides, 22 | onDonePress: () { 23 | CustomNavigator().pushAndRemoveUntil(LoginPage()); 24 | }, 25 | onTabChangeCompleted: (index) { 26 | _sliderPageViewModel.updateCurrentIndex(index); 27 | }, 28 | isShowSkipBtn: false, 29 | renderNextBtn: Text( 30 | StringSplashSliderConstant.splashSliderNextButtonText, 31 | style: GoogleFonts.nunito( 32 | textStyle: CustomTextTheme(context).bodyMedium.copyWith(color: ColorTextConstant.forestMaid), 33 | ), 34 | ), 35 | renderPrevBtn: Text( 36 | StringSplashSliderConstant.splashSliderPrevButtonText, 37 | style: GoogleFonts.nunito( 38 | textStyle: CustomTextTheme(context).bodyMedium.copyWith(color: ColorTextConstant.forestMaid), 39 | ), 40 | ), 41 | renderDoneBtn: Text( 42 | StringSplashSliderConstant.splashSliderDoneButtonText, 43 | style: GoogleFonts.nunito( 44 | textStyle: CustomTextTheme(context).bodyMedium.copyWith(color: ColorTextConstant.forestMaid), 45 | ), 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr) 51 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length <= 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | ramadan 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /lib/ui/home/hadith/HadithPageViewModel.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: cascade_invocations 2 | 3 | import 'package:get/get.dart'; 4 | import 'package:ramadan/model/domain/HadithModel.dart'; 5 | import 'package:ramadan/services/home/HadithService.dart'; 6 | import 'package:ramadan/ui/ViewModelBase.dart'; 7 | import 'package:ramadan/utils/constants/string_constant.dart'; 8 | import 'package:ramadan/utils/servicelocator/ServiceLocator.dart'; 9 | 10 | class HadithPageViewModel extends ViewModelBase { 11 | HadithPageViewModel() { 12 | setCurrentScreen('Hadith Page'); 13 | } 14 | RxBool isLoading = false.obs; 15 | RxString categoryName = ''.obs; 16 | 17 | RxList hadithList = [].obs; 18 | RxList uniqueCategoryList = [].obs; 19 | final IHadithService _iHadithService = ServiceLocator().get(); 20 | 21 | @override 22 | Future onInit() async { 23 | try { 24 | await fillHadithList(); 25 | } catch (e) { 26 | await exceptionHandlingService.handleException(e); 27 | } 28 | super.onInit(); 29 | } 30 | 31 | Future fillHadithList() async { 32 | hadithList.value = await _iHadithService.loadHadiths(); 33 | if (hadithList.isNotEmpty) { 34 | fillHadithCategoryList(); 35 | isLoading.value = true; 36 | } 37 | } 38 | 39 | void fillHadithCategoryList() { 40 | final uniqueCategorySet = hadithList.map((element) => element.category).toSet(); 41 | // Set kullanmanın avantajlarından biri, otomatik olarak benzersiz elemanları içermesidir 42 | uniqueCategoryList.add(StringHadithConstant.allCategory); 43 | uniqueCategoryList.addAll(uniqueCategorySet.toList()); 44 | } 45 | 46 | Future> getHadithsByCategory(String category) async { 47 | hadithList.value = await _iHadithService.loadHadiths(); 48 | if (category == StringHadithConstant.allCategory) { 49 | categoryName.value = ''; 50 | hadithList = hadithList; 51 | } else { 52 | categoryName.value = category; 53 | hadithList.value = hadithList.where((hadith) => hadith.category == category).toList(); 54 | } 55 | hadithList.refresh(); 56 | return hadithList; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/utils/servicelocator/ServiceLocator.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, unnecessary_lambdas, cascade_invocations 2 | 3 | import 'package:get/get.dart'; 4 | import 'package:ramadan/rest/ramadan/RamadanDataProvider.dart'; 5 | import 'package:ramadan/services/common/ExceptionHandlingService.dart'; 6 | import 'package:ramadan/services/common/core/AuthService.dart'; 7 | import 'package:ramadan/services/common/core/ConfigurationService.dart'; 8 | import 'package:ramadan/services/common/core/LocationService.dart'; 9 | import 'package:ramadan/services/common/core/PermissionManager.dart'; 10 | import 'package:ramadan/services/common/notification/LocalNotificationService.dart'; 11 | import 'package:ramadan/services/common/performance/PerformanceMonitoringService.dart'; 12 | import 'package:ramadan/services/home/HadithService.dart'; 13 | import 'package:ramadan/utils/initialize/AppPreferences.dart'; 14 | import 'package:ramadan/utils/initialize/AppVersionChecker.dart'; 15 | 16 | class ServiceLocator { 17 | factory ServiceLocator() { 18 | return _singleton; 19 | } 20 | 21 | ServiceLocator._internal(); 22 | static final ServiceLocator _singleton = ServiceLocator._internal(); 23 | 24 | T get() { 25 | return Get.find(); 26 | } 27 | 28 | void init() { 29 | Get.lazyPut(() => ExceptionHandlingService(), fenix: true); 30 | Get.lazyPut(() => LocalNotificationService(), fenix: true); 31 | Get.lazyPut(() => PerformanceMonitoringService(), fenix: true); 32 | Get.lazyPut(() => AuthService(), fenix: true); 33 | Get.lazyPut(() => PermissionManager(), fenix: true); 34 | Get.lazyPut(() => AppVersionChecker(), fenix: true); 35 | Get.lazyPut(() => AppPreferences(), fenix: true); 36 | Get.lazyPut(() => ConfigurationService(), fenix: true); 37 | Get.lazyPut(() => RamadanDataProvider(), fenix: true); 38 | Get.lazyPut(() => LocationService(), fenix: true); 39 | Get.lazyPut(() => HadithService(), fenix: true); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/utils/manager/TimeManager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | @immutable 5 | final class TimeManager { 6 | static List calculatePrayerTimes(List times) { 7 | final now = DateTime.now(); 8 | final isActiveList = List.filled(times.length, false.obs); // İlk olarak tüm zamanları false olarak işaretliyoruz. 9 | 10 | // Zaman farklarını hesapla daha sonra listeye ekle 11 | final remainingTimes = []; 12 | for (var i = 0; i < times.length; i++) { 13 | final currentTime = _parseTime(times[i], now); 14 | final currentDifference = currentTime.difference(now); 15 | remainingTimes.add(currentDifference); 16 | } 17 | 18 | // Negatif olmayan en küçük farkı bul 19 | var closestDifference = const Duration(days: 1); // 1 gün olarak başlangıç değeri 20 | var closestIndex = -1; 21 | 22 | for (var i = 0; i < remainingTimes.length; i++) { 23 | if (remainingTimes[i].inSeconds >= 0 && remainingTimes[i].inSeconds < closestDifference.inSeconds) { 24 | closestDifference = remainingTimes[i]; 25 | closestIndex = i; 26 | } 27 | } 28 | 29 | // En yakın olanı true, diğerlerini false yap 30 | if (closestIndex != -1) { 31 | isActiveList[closestIndex] = true.obs; 32 | } 33 | 34 | return isActiveList; 35 | } 36 | 37 | static int remainingSeconds(String time) { 38 | final now = DateTime.now(); 39 | final targetTime = _parseTime(time, now); 40 | 41 | // Zaman farkını hesapla 42 | final difference = targetTime.difference(now); 43 | 44 | // Negatif değilse saniye cinsinden dön, negatifse 0 dön 45 | return difference.isNegative ? 0 : difference.inSeconds; 46 | } 47 | 48 | static DateTime _parseTime(String time, DateTime now) { 49 | final parts = time.split(':').map(int.parse).toList(); 50 | 51 | var targetTime = DateTime(now.year, now.month, now.day, parts[0], parts[1]); 52 | 53 | // Eğer hedef zaman şu anki zamandan geçmişse bir sonraki güne atla 54 | if (targetTime.isBefore(now)) { 55 | targetTime = targetTime.add(const Duration(days: 1)); 56 | } 57 | 58 | return targetTime; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/ui/login/register/RegisterPageViewModel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:ramadan/services/common/core/AuthService.dart'; 4 | import 'package:ramadan/ui/ViewModelBase.dart'; 5 | import 'package:ramadan/utils/constants/string_constant.dart'; 6 | import 'package:ramadan/utils/navigation/CustomNavigator.dart'; 7 | import 'package:ramadan/utils/popups/CustomSnackBar.dart'; 8 | import 'package:ramadan/utils/popups/CustomSnackBarType.dart'; 9 | import 'package:ramadan/utils/servicelocator/ServiceLocator.dart'; 10 | 11 | class RegisterPageViewModel extends ViewModelBase { 12 | RegisterPageViewModel() { 13 | setCurrentScreen('Register Page'); 14 | } 15 | final TextEditingController emailTextController = TextEditingController(); 16 | final TextEditingController passwordTextController = TextEditingController(); 17 | final TextEditingController confirmPasswordController = TextEditingController(); 18 | 19 | final GlobalKey formKey = GlobalKey(); 20 | 21 | final IAuthService _authService = ServiceLocator().get(); 22 | 23 | RxBool obscureText = false.obs; 24 | 25 | @override 26 | void dispose() { 27 | emailTextController.dispose(); 28 | passwordTextController.dispose(); 29 | confirmPasswordController.dispose(); 30 | super.dispose(); 31 | } 32 | 33 | Future register(BuildContext context, String email, String password) async { 34 | try { 35 | final userCredential = await _authService.register(email, password); 36 | 37 | if (userCredential != null) { 38 | CustomNavigator().popFromMain(); 39 | if (context.mounted) await CustomSnackBar.showSnackBar(context, CustomSnackBarType.success, StringLoginConstant.snackbarSuccessRegisterText); 40 | } else { 41 | if (context.mounted) await CustomSnackBar.showSnackBar(context, CustomSnackBarType.error, StringLoginConstant.snackbarErrorEmailControlText); 42 | 43 | emailTextController.clear(); 44 | passwordTextController.clear(); 45 | confirmPasswordController.clear(); 46 | } 47 | } catch (e) { 48 | await exceptionHandlingService.handleException(e); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/rest/RestServiceManager.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: null_argument_to_non_null_type, unnecessary_new, cascade_invocations, prefer_collection_literals, prefer_final_locals, omit_local_variable_types, depend_on_referenced_packages, directives_ordering 2 | 3 | import 'package:firebase_performance/firebase_performance.dart'; 4 | import 'package:http/http.dart' as http; 5 | import 'package:html/dom.dart' as dom; 6 | import 'dart:async'; 7 | 8 | import 'package:http/http.dart'; 9 | import 'package:ramadan/services/common/performance/PerformanceMonitoringService.dart'; 10 | import 'package:ramadan/utils/constants/string_constant.dart'; 11 | import 'package:ramadan/utils/exceptions/CustomException.dart'; 12 | import 'package:ramadan/utils/servicelocator/ServiceLocator.dart'; 13 | 14 | FirebasePerformance performance = FirebasePerformance.instance; 15 | 16 | final IPerformanceMonitoringService _iPerformanceMonitoringService = ServiceLocator().get(); 17 | 18 | class RestServiceManager { 19 | static const defaultheader = {'Content-Type': 'application/json'}; 20 | 21 | static Future> call(String url, String endpoint, Map? requestHeader) async { 22 | Map header = new Map(); 23 | header.addAll(defaultheader); 24 | 25 | if (requestHeader != null) { 26 | header.addAll(requestHeader); 27 | } 28 | 29 | HttpMetric metric = await _iPerformanceMonitoringService.startHttpMetric(endpoint, HttpMethod.Get); 30 | 31 | try { 32 | Response response; 33 | Uri uri = Uri.parse(url + endpoint); 34 | 35 | response = await http.get(uri, headers: header); 36 | await _iPerformanceMonitoringService.stopHttpMetric(endpoint, metric, response); 37 | switch (response.statusCode) { 38 | case 200: 39 | dom.Document ramadanTimesHtmlSource = dom.Document.html(response.body); 40 | final ramadanTimesTable = ramadanTimesHtmlSource.querySelectorAll('tr[data-dateint] > td'); 41 | return ramadanTimesTable.map((e) => e.innerHtml.trim()).toList(); 42 | default: 43 | throw CustomException(StringCommonConstant.anErrorOccured); 44 | } 45 | } catch (ex) { 46 | throw CustomException(StringCommonConstant.anErrorOccured); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | // Flutter can complete the first frame before the "show window" callback is 35 | // registered. The following call ensures a frame is pending to ensure the 36 | // window is shown. It is a no-op if the first frame hasn't completed yet. 37 | flutter_controller_->ForceRedraw(); 38 | 39 | return true; 40 | } 41 | 42 | void FlutterWindow::OnDestroy() { 43 | if (flutter_controller_) { 44 | flutter_controller_ = nullptr; 45 | } 46 | 47 | Win32Window::OnDestroy(); 48 | } 49 | 50 | LRESULT 51 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 52 | WPARAM const wparam, 53 | LPARAM const lparam) noexcept { 54 | // Give Flutter, including plugins, an opportunity to handle window messages. 55 | if (flutter_controller_) { 56 | std::optional result = 57 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 58 | lparam); 59 | if (result) { 60 | return *result; 61 | } 62 | } 63 | 64 | switch (message) { 65 | case WM_FONTCHANGE: 66 | flutter_controller_->engine()->ReloadSystemFonts(); 67 | break; 68 | } 69 | 70 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 71 | } 72 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Codemagic build status](https://api.codemagic.io/apps/65f0be96f45e54589b271055/65f0be96f45e54589b271054/status_badge.svg)](https://codemagic.io/app/65f0be96f45e54589b271055/build/6609ce7c2ba7389d8681049b) 2 | 3 | 4 | # Ramazan 2024 🌙 5 | 6 | This application aims to provide users with easy and fast access to daily fasting hours, prayer times, and spiritual content during the month of Ramadan. 7 | 8 | ## Key Features: 9 | 10 | 1. **Fasting Hours and Prayer Times:** Daily fasting hours and prayer times can be instantly viewed. Organize your worship with accurate and up-to-date information. 11 | 12 | 2. **Colorful and User-Friendly Interface:** Our application stands out with its visual richness and user-friendly interface. The colorful design makes information clear and attractive. 13 | 14 | 3. **Hadiths for Special Days:** Strengthen your spirituality by reading hadiths on special days of the Ramadan month. Add meaning to your prayers. 15 | 16 | 4. **Reminders with Notifications:** Keep the application up-to-date with reminders that will notify you at important times, such as iftar times. 17 | 18 | 5. **Privacy and Security:** We value user privacy. We do not share information with third parties. 19 | 20 | ## Screenshots 21 | 22 |

23 | 24 | 25 | 26 | 27 | 28 |

29 | 30 | ## Contribute 🤝 31 | 32 | If you want to contribute to this project, please fork and send a pull request. You can also share issues or suggestions in the [Issues](https://github.com/sameetdmr/RamadanApp/issues) section. 33 | 34 | ## Contact 📧 35 | 36 | If you have any questions or suggestions, you can contact us at [dsamed568@gmail.com](mailto:dsamed568@gmail.com). 37 | 38 | ## License 39 | 40 | [![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE) 41 | 42 | 2024 created for [@Sameetdmr](https://github.com/Sameetdmr) 43 | -------------------------------------------------------------------------------- /lib/ui/login/components/CustomTextField.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:ramadan/utils/constants/color_constant.dart'; 3 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 4 | 5 | class CustomTextField extends StatelessWidget { 6 | CustomTextField({required this.textEditingController, required this.onChanged, required this.hintText, required this.prefixIcon, required this.validator, super.key, this.obscureText = false, this.suffixIcon}); 7 | final TextEditingController textEditingController; 8 | final String hintText; 9 | final Widget? suffixIcon; 10 | final IconData prefixIcon; 11 | final bool obscureText; 12 | String? Function(String?)? validator; 13 | void Function(String)? onChanged; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return DecoratedBox( 18 | decoration: BoxDecoration( 19 | borderRadius: BorderRadius.circular(12), 20 | color: ColorCommonConstant.greyShade100, 21 | ), 22 | child: TextFormField( 23 | controller: textEditingController, 24 | obscureText: obscureText, 25 | validator: validator, 26 | onChanged: onChanged, 27 | textInputAction: TextInputAction.done, 28 | autovalidateMode: AutovalidateMode.onUserInteraction, 29 | decoration: InputDecoration( 30 | iconColor: ColorCommonConstant.red, 31 | hintText: hintText, 32 | hintStyle: CustomTextTheme(context).bodySmall.copyWith( 33 | color: ColorCommonConstant.grey, 34 | ), 35 | prefixIcon: Icon( 36 | prefixIcon, 37 | color: ColorCommonConstant.grey, 38 | ), 39 | suffixIcon: suffixIcon, 40 | border: OutlineInputBorder( 41 | borderRadius: BorderRadius.circular(12), 42 | borderSide: BorderSide( 43 | color: ColorCommonConstant.grey, 44 | ), 45 | ), 46 | enabledBorder: OutlineInputBorder( 47 | borderRadius: BorderRadius.circular(12), 48 | borderSide: BorderSide( 49 | color: ColorCommonConstant.white, 50 | ), 51 | ), 52 | focusedBorder: OutlineInputBorder( 53 | borderRadius: BorderRadius.circular(12), 54 | borderSide: BorderSide( 55 | color: ColorCommonConstant.grey, 56 | ), 57 | ), 58 | ), 59 | ), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/firebase_options.dart: -------------------------------------------------------------------------------- 1 | // File generated by FlutterFire CLI. 2 | // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members 3 | import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; 4 | import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; 5 | 6 | /// Default [FirebaseOptions] for use with your Firebase apps. 7 | /// 8 | /// Example: 9 | /// ```dart 10 | /// import 'firebase_options.dart'; 11 | /// // ... 12 | /// await Firebase.initializeApp( 13 | /// options: DefaultFirebaseOptions.currentPlatform, 14 | /// ); 15 | /// ``` 16 | class DefaultFirebaseOptions { 17 | static FirebaseOptions get currentPlatform { 18 | if (kIsWeb) { 19 | throw UnsupportedError( 20 | 'DefaultFirebaseOptions have not been configured for web - ' 21 | 'you can reconfigure this by running the FlutterFire CLI again.', 22 | ); 23 | } 24 | switch (defaultTargetPlatform) { 25 | case TargetPlatform.android: 26 | return android; 27 | case TargetPlatform.iOS: 28 | throw UnsupportedError( 29 | 'DefaultFirebaseOptions have not been configured for ios - ' 30 | 'you can reconfigure this by running the FlutterFire CLI again.', 31 | ); 32 | case TargetPlatform.macOS: 33 | throw UnsupportedError( 34 | 'DefaultFirebaseOptions have not been configured for macos - ' 35 | 'you can reconfigure this by running the FlutterFire CLI again.', 36 | ); 37 | case TargetPlatform.windows: 38 | throw UnsupportedError( 39 | 'DefaultFirebaseOptions have not been configured for windows - ' 40 | 'you can reconfigure this by running the FlutterFire CLI again.', 41 | ); 42 | case TargetPlatform.linux: 43 | throw UnsupportedError( 44 | 'DefaultFirebaseOptions have not been configured for linux - ' 45 | 'you can reconfigure this by running the FlutterFire CLI again.', 46 | ); 47 | default: 48 | throw UnsupportedError( 49 | 'DefaultFirebaseOptions are not supported for this platform.', 50 | ); 51 | } 52 | } 53 | 54 | static const FirebaseOptions android = FirebaseOptions( 55 | apiKey: 'AIzaSyA7GE0saobr15V_d7wqmTTTkbQ-821N0bU', 56 | appId: '1:14384038248:android:442d25a1d96d59968756dd', 57 | messagingSenderId: '14384038248', 58 | projectId: 'ramadanapp-fb663', 59 | storageBucket: 'ramadanapp-fb663.appspot.com', 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /lib/ui/home/CustomNavigationPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:ramadan/ui/home/CustomNavigationPageViewModel.dart'; 5 | import 'package:ramadan/ui/home/components/CustomBottomNavigation.dart'; 6 | import 'package:ramadan/utils/constants/color_constant.dart'; 7 | import 'package:ramadan/utils/navigation/CustomNavigator.dart'; 8 | 9 | class CustomNavigationPage extends StatelessWidget { 10 | CustomNavigationPage({super.key}); 11 | 12 | late CustomNavigationPageViewModel _customNavigationPageViewModel; 13 | @override 14 | Widget build(BuildContext context) { 15 | _customNavigationPageViewModel = Get.put(CustomNavigationPageViewModel()); 16 | return Obx( 17 | () => WillPopScope( 18 | onWillPop: () async { 19 | CustomNavigator().popFromMain(); 20 | return false; 21 | }, 22 | child: GestureDetector( 23 | child: DefaultTabController( 24 | length: CustomNavigator.navigators.length, 25 | child: Scaffold( 26 | body: TabBarView( 27 | physics: const NeverScrollableScrollPhysics(), 28 | controller: _customNavigationPageViewModel.tabController!.value, 29 | children: CustomNavigator.navigators, 30 | ), 31 | bottomNavigationBar: CustomBottomNavigation( 32 | tabController: _customNavigationPageViewModel.tabController!.value, 33 | onSelectedTab: (value) { 34 | if (value == _customNavigationPageViewModel.currentTab.value) { 35 | CustomNavigator().popUntilCurrentTab(); 36 | } else { 37 | _customNavigationPageViewModel.changeTab(value); 38 | } 39 | }, 40 | ), 41 | floatingActionButtonLocation: FloatingActionButtonLocation.miniCenterDocked, 42 | floatingActionButton: FloatingActionButton( 43 | elevation: 5, 44 | backgroundColor: ColorCommonConstant.white, 45 | child: Icon(Icons.location_on_outlined, size: 32.sp, color: ColorTextConstant.forestMaid), 46 | onPressed: () async { 47 | await _customNavigationPageViewModel.changeCity(); 48 | }, 49 | ), 50 | ), 51 | ), 52 | ), 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/ui/splash/SplashPageViewModel.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:ramadan/services/common/core/PermissionManager.dart'; 3 | import 'package:ramadan/ui/ViewModelBase.dart'; 4 | import 'package:ramadan/ui/home/CustomNavigationPage.dart'; 5 | import 'package:ramadan/ui/slider/SliderPage.dart'; 6 | import 'package:ramadan/utils/constants/string_constant.dart'; 7 | import 'package:ramadan/utils/exceptions/CustomException.dart'; 8 | import 'package:ramadan/utils/initialize/AppPreferences.dart'; 9 | import 'package:ramadan/utils/initialize/AppVersionChecker.dart'; 10 | import 'package:ramadan/utils/navigation/CustomNavigator.dart'; 11 | import 'package:ramadan/utils/servicelocator/ServiceLocator.dart'; 12 | 13 | class SplashPageViewModel extends ViewModelBase { 14 | SplashPageViewModel() { 15 | setCurrentScreen('Splash Page'); 16 | } 17 | final IAppPreferences _appPreferences = ServiceLocator().get(); 18 | final IPermissionManager _iPermissionManager = ServiceLocator().get(); 19 | final IAppVersionChecker _appVersionChecker = ServiceLocator().get(); 20 | 21 | RxBool isCurrentVersionOk = true.obs; 22 | RxString appVersion = ''.obs; 23 | 24 | @override 25 | Future onInit() async { 26 | super.onInit(); 27 | try { 28 | final result = await _appVersionChecker.checkAppVersion(); 29 | appVersion.value = await _appVersionChecker.getAppVersion(); 30 | if (result) { 31 | isCurrentVersionOk.value = true; 32 | await _checkStartConditions(); 33 | } else { 34 | isCurrentVersionOk.value = false; 35 | } 36 | } catch (e) { 37 | await exceptionHandlingService.handleException(e); 38 | } 39 | } 40 | 41 | Future _checkStartConditions() async { 42 | try { 43 | await _appPreferences.init(); 44 | final isFirstOpen = await _appPreferences.isFirstOpen(); 45 | final hasNotificationPermission = await _iPermissionManager.checkAndRequestNotificationPermission(); 46 | await _appPreferences.setNotificationPermission(value: hasNotificationPermission); 47 | 48 | if (isFirstOpen) { 49 | // Uygulama ilk defa mı açıldı. 50 | await _appPreferences.setFirstOpen(value: false); 51 | await CustomNavigator().pushAndRemoveUntil(SliderPage()); 52 | } else { 53 | await CustomNavigator().pushAndRemoveUntil(CustomNavigationPage()); 54 | } 55 | } catch (e) { 56 | throw CustomException(StringHomeConstant.loginError); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/services/common/core/PermissionManager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:geolocator/geolocator.dart'; 3 | import 'package:permission_handler/permission_handler.dart'; 4 | import 'package:ramadan/utils/constants/string_constant.dart'; 5 | import 'package:ramadan/utils/exceptions/CustomException.dart'; 6 | 7 | abstract class IPermissionManager { 8 | Future checkLocationPermission(); 9 | Future getCurrentLocation(); 10 | Future checkAndRequestNotificationPermission(); 11 | } 12 | 13 | @immutable 14 | final class PermissionManager extends IPermissionManager { 15 | @override 16 | Future checkLocationPermission() async { 17 | try { 18 | LocationPermission permission; 19 | 20 | permission = await Geolocator.checkPermission(); 21 | 22 | if (permission == LocationPermission.denied) { 23 | permission = await Geolocator.requestPermission(); 24 | 25 | if (permission == LocationPermission.whileInUse || permission == LocationPermission.always) { 26 | return true; 27 | } else if (permission == LocationPermission.deniedForever) { 28 | await Geolocator.openAppSettings(); 29 | return false; 30 | } 31 | } else if (permission == LocationPermission.whileInUse || permission == LocationPermission.always) { 32 | return true; 33 | } 34 | 35 | return false; 36 | } catch (e) { 37 | throw CustomException(StringCommonConstant.checkLocationPermissionError); 38 | } 39 | } 40 | 41 | @override 42 | Future getCurrentLocation() async { 43 | try { 44 | final hasPermission = await checkLocationPermission(); 45 | 46 | if (hasPermission) { 47 | return await Geolocator.getCurrentPosition( 48 | desiredAccuracy: LocationAccuracy.high, 49 | ); 50 | } else { 51 | return null; 52 | } 53 | } catch (e) { 54 | throw CustomException(StringCommonConstant.getCurrentLocationError); 55 | } 56 | } 57 | 58 | @override 59 | Future checkAndRequestNotificationPermission() async { 60 | final status = await Permission.notification.request(); 61 | 62 | if (status == PermissionStatus.granted) { 63 | // Kullanıcı zaten izin verdi. 64 | return true; 65 | } else { 66 | // Kullanıcı izin vermedi, izin talep et. 67 | final requestedStatus = await Permission.notification.request(); 68 | 69 | // Kullanıcı izin verdiyse true döner, aksi takdirde false döner. 70 | return requestedStatus == PermissionStatus.granted; 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | id "dev.flutter.flutter-gradle-plugin" 5 | id 'com.google.gms.google-services' 6 | id 'com.google.firebase.crashlytics' 7 | } 8 | 9 | def localProperties = new Properties() 10 | def localPropertiesFile = rootProject.file('local.properties') 11 | if (localPropertiesFile.exists()) { 12 | localPropertiesFile.withReader('UTF-8') { reader -> 13 | localProperties.load(reader) 14 | } 15 | } 16 | 17 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 18 | if (flutterVersionCode == null) { 19 | flutterVersionCode = '1' 20 | } 21 | 22 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 23 | if (flutterVersionName == null) { 24 | flutterVersionName = '1.0' 25 | } 26 | 27 | def keystoreProperties = new Properties() 28 | def keystorePropertiesFile = rootProject.file('key.properties') 29 | if (keystorePropertiesFile.exists()) { 30 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 31 | } 32 | 33 | android { 34 | namespace "com.sameetdmr.eramadanapp.ramadan" 35 | compileSdkVersion flutter.compileSdkVersion 36 | ndkVersion flutter.ndkVersion 37 | 38 | compileOptions { 39 | sourceCompatibility JavaVersion.VERSION_1_8 40 | targetCompatibility JavaVersion.VERSION_1_8 41 | } 42 | 43 | defaultConfig { 44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 45 | applicationId "com.sameetdmr.eramadanapp.ramadan" 46 | // You can update the following values to match your application needs. 47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 48 | minSdkVersion 21 49 | targetSdkVersion flutter.targetSdkVersion 50 | versionCode flutterVersionCode.toInteger() 51 | versionName flutterVersionName 52 | multiDexEnabled true 53 | } 54 | 55 | signingConfigs { 56 | release { 57 | keyAlias keystoreProperties['keyAlias'] 58 | keyPassword keystoreProperties['keyPassword'] 59 | storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null 60 | storePassword keystoreProperties['storePassword'] 61 | } 62 | } 63 | 64 | buildTypes { 65 | release { 66 | // TODO: Add your own signing config for the release build. 67 | // Signing with the debug keys for now, so `flutter run --release` works. 68 | signingConfig signingConfigs.release 69 | } 70 | debug { 71 | // TODO: Add your own signing config for the release build. 72 | // Signing with the debug keys for now, so `flutter run --release` works. 73 | signingConfig signingConfigs.debug 74 | } 75 | } 76 | } 77 | 78 | flutter { 79 | source '../..' 80 | } 81 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /lib/rest/ramadan/RamadanDataProvider.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: one_member_abstracts 2 | 3 | import 'dart:async'; 4 | import 'package:ramadan/model/domain/PrayerTimeDetails.dart'; 5 | import 'package:ramadan/model/domain/PrayerTimesModel.dart'; 6 | import 'package:ramadan/rest/RestServiceManager.dart'; 7 | import 'package:ramadan/services/common/core/ConfigurationService.dart'; 8 | import 'package:ramadan/utils/constants/string_constant.dart'; 9 | import 'package:ramadan/utils/exceptions/CustomException.dart'; 10 | import 'package:ramadan/utils/servicelocator/ServiceLocator.dart'; 11 | 12 | abstract class IRamadanDataProvider { 13 | Future loadRamadanData({required String cityName, String? date}); 14 | } 15 | 16 | final class RamadanDataProvider implements IRamadanDataProvider { 17 | RamadanDataProvider() { 18 | final configurationService = ServiceLocator().get(); 19 | _apiUrl = configurationService.getApiServiceURL(); 20 | } 21 | late String _apiUrl; 22 | 23 | @override 24 | Future loadRamadanData({required String cityName, String? date}) async { 25 | try { 26 | final lowercaseUserCityChoiceString = cityName.toLowerCase(); 27 | final rawData = await RestServiceManager.call(_apiUrl, lowercaseUserCityChoiceString, null); 28 | if (date != null) { 29 | return _convertDataForDate(rawData, cityName, date); 30 | } else { 31 | return _convertData(rawData, cityName); 32 | } 33 | } catch (e) { 34 | throw CustomException(StringHomeConstant.prayerTimesError); 35 | } 36 | } 37 | 38 | PrayerTimesModel _convertDataForDate(List rawData, String cityName, String date) { 39 | final prayerTimeDetailsList = []; 40 | 41 | for (var i = 0; i < rawData.length / 8; i++) { 42 | final currentRawDate = rawData[8 * i + 1]; 43 | 44 | if (currentRawDate.contains(date)) { 45 | final times = rawData.sublist(8 * i + 2, 8 * i + 8); 46 | 47 | // Date formatını düzenle 48 | final dateParts = currentRawDate.split(' '); 49 | final formattedDate = '${dateParts[0]} ${dateParts[1]}, ${dateParts[2]}'; 50 | 51 | // times listesini map'e ekle 52 | prayerTimeDetailsList.add(PrayerTimeDetails(date: formattedDate, times: times)); 53 | } 54 | } 55 | 56 | return PrayerTimesModel(cityName: cityName, region: cityName, times: prayerTimeDetailsList); 57 | } 58 | 59 | PrayerTimesModel _convertData(List rawData, String cityName) { 60 | final prayerTimeDetailsList = []; 61 | 62 | for (var i = 0; i < rawData.length / 8; i++) { 63 | final date = rawData[8 * i + 1]; 64 | final times = rawData.sublist(8 * i + 2, 8 * i + 8); 65 | 66 | // Date formatını düzenle 67 | final dateParts = date.split(' '); 68 | final formattedDate = '${dateParts[0]} ${dateParts[1]}, ${dateParts[2]}'; 69 | 70 | // times listesini map'e ekle 71 | prayerTimeDetailsList.add(PrayerTimeDetails(date: formattedDate, times: times)); 72 | } 73 | 74 | return PrayerTimesModel(cityName: cityName, region: cityName, times: prayerTimeDetailsList); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/services/common/core/AuthService.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:google_sign_in/google_sign_in.dart'; 3 | import 'package:ramadan/utils/constants/string_constant.dart'; 4 | import 'package:ramadan/utils/exceptions/CustomException.dart'; 5 | 6 | abstract class IAuthService { 7 | Future isUserLoggedIn(); 8 | Future signInWithEmailAndPassword(String email, String password); 9 | Future signInWithGoogle(); 10 | Future signOut(); 11 | Future resetPassword(String email); 12 | Future register(String email, String password); 13 | } 14 | 15 | final class AuthService implements IAuthService { 16 | final FirebaseAuth _auth = FirebaseAuth.instance; 17 | 18 | @override 19 | Future isUserLoggedIn() async { 20 | final user = _auth.currentUser; 21 | return user != null; 22 | } 23 | 24 | @override 25 | Future signInWithEmailAndPassword(String email, String password) async { 26 | try { 27 | final userCredential = await _auth.signInWithEmailAndPassword( 28 | email: email, 29 | password: password, 30 | ); 31 | if (userCredential.user != null) { 32 | return userCredential.user; 33 | } else { 34 | return null; 35 | } 36 | } catch (e) { 37 | if (e is FirebaseAuthException) { 38 | if (e.code == StringCommonConstant.firebaseLoginErrorCode) { 39 | return null; 40 | } else { 41 | throw CustomException(StringCommonConstant.firebaseLoginError); 42 | } 43 | } 44 | throw CustomException(StringCommonConstant.firebaseLoginError); 45 | } 46 | } 47 | 48 | @override 49 | Future signInWithGoogle() async { 50 | try { 51 | final googleSignInAccount = await GoogleSignIn().signIn(); 52 | final googleSignInAuthentication = await googleSignInAccount!.authentication; 53 | 54 | final AuthCredential credential = GoogleAuthProvider.credential( 55 | accessToken: googleSignInAuthentication.accessToken, 56 | idToken: googleSignInAuthentication.idToken, 57 | ); 58 | 59 | final userCredential = await _auth.signInWithCredential(credential); 60 | if (userCredential.user != null) { 61 | return userCredential.user; 62 | } else { 63 | return null; 64 | } 65 | } catch (e) { 66 | throw CustomException(StringCommonConstant.googleLoginError); 67 | } 68 | } 69 | 70 | @override 71 | Future signOut() async { 72 | await _auth.signOut(); 73 | } 74 | 75 | @override 76 | Future resetPassword(String email) async { 77 | try { 78 | await _auth.sendPasswordResetEmail(email: email); 79 | } catch (e) { 80 | throw CustomException(StringCommonConstant.resetPasswordError); 81 | } 82 | } 83 | 84 | @override 85 | Future register(String email, String password) async { 86 | try { 87 | final userCredential = await _auth.createUserWithEmailAndPassword(email: email, password: password); 88 | 89 | if (userCredential.user != null) { 90 | return userCredential; 91 | } else { 92 | return null; 93 | } 94 | } catch (e) { 95 | throw CustomException(StringCommonConstant.registerError); 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /lib/ui/slider/SliderPageViewModel.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: use_setters_to_change_properties 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:google_fonts/google_fonts.dart'; 6 | import 'package:intro_slider/intro_slider.dart'; 7 | import 'package:ramadan/ui/ViewModelBase.dart'; 8 | import 'package:ramadan/utils/constants/color_constant.dart'; 9 | import 'package:ramadan/utils/constants/image_constant.dart'; 10 | import 'package:ramadan/utils/constants/string_constant.dart'; 11 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 12 | 13 | class SliderPageViewModel extends ViewModelBase { 14 | SliderPageViewModel(BuildContext context) { 15 | setCurrentScreen('Slider Page'); 16 | _context = context; 17 | } 18 | late BuildContext _context; 19 | 20 | // Intro 21 | List slides = []; 22 | RxInt currentIndex = 0.obs; 23 | 24 | RxBool isLocationOk = false.obs; 25 | 26 | @override 27 | void onInit() { 28 | slides.addAll([ 29 | ContentConfig( 30 | title: StringSplashSliderConstant.splashSlider1TitleText, 31 | styleTitle: GoogleFonts.nunito( 32 | textStyle: CustomTextTheme(_context).bodyMedium.copyWith( 33 | color: ColorTextConstant.forestMaid, 34 | fontWeight: FontWeight.bold, 35 | ), 36 | ), 37 | description: StringSplashSliderConstant.splashSlider1SubTitleText, 38 | styleDescription: GoogleFonts.nunito( 39 | textStyle: CustomTextTheme(_context).labelMedium.copyWith(color: ColorTextConstant.black), 40 | ), 41 | centerWidget: AppSplashSliderLottiesConstant.appLottie1.toLottie, 42 | backgroundColor: ColorBackgroundConstant.white, 43 | ), 44 | ContentConfig( 45 | title: StringSplashSliderConstant.splashSlider2TitleText, 46 | styleTitle: GoogleFonts.nunito( 47 | textStyle: CustomTextTheme(_context).bodyMedium.copyWith( 48 | color: ColorTextConstant.forestMaid, 49 | fontWeight: FontWeight.bold, 50 | ), 51 | ), 52 | description: StringSplashSliderConstant.splashSlider2SubTitleText, 53 | styleDescription: GoogleFonts.nunito( 54 | textStyle: CustomTextTheme(_context).labelMedium.copyWith(color: ColorTextConstant.black), 55 | ), 56 | centerWidget: AppSplashSliderLottiesConstant.appLottie2.toLottie, 57 | backgroundColor: ColorBackgroundConstant.white, 58 | ), 59 | ContentConfig( 60 | title: StringSplashSliderConstant.splashSlider3TitleText, 61 | maxLineTitle: 3, 62 | styleTitle: GoogleFonts.nunito( 63 | textStyle: CustomTextTheme(_context).bodyMedium.copyWith( 64 | color: ColorTextConstant.forestMaid, 65 | fontWeight: FontWeight.bold, 66 | ), 67 | ), 68 | description: StringSplashSliderConstant.splashSlider3SubTitleText, 69 | styleDescription: GoogleFonts.nunito( 70 | textStyle: CustomTextTheme(_context).labelMedium.copyWith(color: ColorTextConstant.black), 71 | ), 72 | centerWidget: AppSplashSliderLottiesConstant.appLottie3.toLottie, 73 | backgroundColor: ColorBackgroundConstant.white, 74 | ), 75 | ]); 76 | 77 | super.onInit(); 78 | } 79 | 80 | void updateCurrentIndex(int index) { 81 | currentIndex.value = index; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /lib/ui/home/city/CityListPage.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:flutter/material.dart'; 3 | import 'package:kartal/kartal.dart'; 4 | 5 | import 'package:ramadan/model/domain/TurkeyCity.dart'; 6 | import 'package:ramadan/utils/constants/color_constant.dart'; 7 | import 'package:ramadan/utils/constants/string_constant.dart'; 8 | import 'package:ramadan/utils/navigation/CustomNavigator.dart'; 9 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 10 | 11 | class CityListPage extends StatelessWidget { 12 | List turkeyCities; 13 | CityListPage({ 14 | required this.turkeyCities, 15 | super.key, 16 | }); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return SafeArea( 21 | child: Scaffold( 22 | backgroundColor: ColorCommonConstant.white, 23 | appBar: AppBar( 24 | centerTitle: false, 25 | actions: [IconButton(onPressed: () {}, icon: const Icon(Icons.search_outlined))], 26 | leading: IconButton( 27 | icon: Icon( 28 | Icons.arrow_back_outlined, 29 | color: ColorCommonConstant.black, 30 | ), 31 | onPressed: () { 32 | CustomNavigator().popFromMain(); 33 | }, 34 | ), 35 | elevation: 0, 36 | title: Text( 37 | 'Şehir Seçiniz', 38 | style: CustomTextTheme(context).bodyMedium.copyWith(color: ColorTextConstant.black, fontWeight: FontWeight.bold), 39 | ), 40 | backgroundColor: ColorCommonConstant.transparent, 41 | ), 42 | body: Padding( 43 | padding: context.padding.low, 44 | child: Column( 45 | children: [ 46 | GestureDetector( 47 | onTap: () async { 48 | CustomNavigator().popFromMain(); 49 | }, 50 | child: ListTile( 51 | title: Text(StringHomeConstant.usePreciseLocation, style: CustomTextTheme(context).bodyMedium.copyWith(color: ColorTextConstant.orangeAccent)), 52 | trailing: Icon( 53 | Icons.location_on_outlined, 54 | color: ColorTextConstant.orangeAccent, 55 | ), 56 | ), 57 | ), 58 | Expanded( 59 | child: ListView.separated( 60 | separatorBuilder: (context, index) { 61 | return Divider( 62 | color: ColorCommonConstant.black, 63 | ); 64 | }, 65 | itemCount: turkeyCities.length, 66 | itemBuilder: (context, index) { 67 | return GestureDetector( 68 | onTap: () { 69 | CustomNavigator().popFromMain(index); 70 | }, 71 | child: ListTile( 72 | title: Text( 73 | turkeyCities[index].name, 74 | style: CustomTextTheme(context).labelMedium, 75 | ), 76 | trailing: Icon( 77 | Icons.arrow_forward_outlined, 78 | color: ColorCommonConstant.black, 79 | ), 80 | ), 81 | ); 82 | }, 83 | ), 84 | ), 85 | ], 86 | ), 87 | ), 88 | ), 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /lib/ui/login/passwordReset/PasswordResetPage.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:kartal/kartal.dart'; 5 | 6 | import 'package:ramadan/ui/common/button/CustomLoginButton.dart'; 7 | import 'package:ramadan/ui/login/components/CustomLoginButtonType.dart'; 8 | import 'package:ramadan/ui/login/components/CustomTextField.dart'; 9 | import 'package:ramadan/utils/constants/color_constant.dart'; 10 | import 'package:ramadan/utils/constants/string_constant.dart'; 11 | import 'package:ramadan/utils/enums/LoginTypeEnum.dart'; 12 | import 'package:ramadan/utils/navigation/CustomNavigator.dart'; 13 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 14 | import 'package:ramadan/utils/validator/LoginValidator.dart'; 15 | 16 | class PasswordResetScreen extends StatelessWidget { 17 | final TextEditingController textEditingController; 18 | final GlobalKey formKey; 19 | const PasswordResetScreen({ 20 | required this.textEditingController, 21 | required this.formKey, 22 | super.key, 23 | }); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return SingleChildScrollView( 28 | padding: MediaQuery.of(context).viewInsets, 29 | child: Padding( 30 | padding: context.padding.low, 31 | child: Form( 32 | key: formKey, 33 | autovalidateMode: AutovalidateMode.onUserInteraction, 34 | child: Column( 35 | crossAxisAlignment: CrossAxisAlignment.stretch, 36 | mainAxisSize: MainAxisSize.min, 37 | children: [ 38 | Row( 39 | mainAxisAlignment: MainAxisAlignment.end, 40 | children: [ 41 | IconButton( 42 | icon: const Icon(Icons.close), 43 | onPressed: () { 44 | CustomNavigator().popFromMain([false]); 45 | textEditingController.clear(); 46 | }, 47 | ), 48 | ], 49 | ), 50 | SizedBox(height: 10.h), 51 | Text(StringLoginConstant.passwordResetEmailText, style: CustomTextTheme(context).bodyMedium), 52 | SizedBox(height: 20.h), 53 | CustomTextField( 54 | textEditingController: textEditingController, 55 | hintText: StringLoginConstant.passwordResetEmailHintText, 56 | prefixIcon: Icons.mail_outlined, 57 | validator: (value) { 58 | if (value != null) { 59 | return LoginValidator.validateLogin(value, LoginTypeEnum.email); 60 | } 61 | return null; 62 | }, 63 | onChanged: null, 64 | ), 65 | SizedBox(height: 20.h), 66 | CustomButton.getButton( 67 | onPressed: () { 68 | if (formKey.currentState!.validate()) { 69 | CustomNavigator().popFromMain([true, textEditingController.text]); 70 | textEditingController.clear(); 71 | } 72 | }, 73 | customLoginButtonType: CustomLoginButtonType.primary, 74 | textStyle: CustomTextTheme(context).bodyMedium.copyWith(color: ColorTextConstant.white), 75 | text: StringLoginConstant.passwordResetApplyButton, 76 | ), 77 | SizedBox(height: 20.h), 78 | ], 79 | ), 80 | ), 81 | ), 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.sameetdmr.eramadanapp" "\0" 93 | VALUE "FileDescription", "ramadan" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "ramadan" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2024 com.sameetdmr.eramadanapp. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "ramadan.exe" "\0" 98 | VALUE "ProductName", "ramadan" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /lib/ui/home/hadith/HadithPage.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: must_be_immutable 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 | import 'package:get/get.dart'; 6 | import 'package:kartal/kartal.dart'; 7 | import 'package:ramadan/ui/home/hadith/HadithPageViewModel.dart'; 8 | import 'package:ramadan/ui/home/hadith/components/HadithCard.dart'; 9 | import 'package:ramadan/ui/home/hadith/components/HadithCategoryFilterButton.dart'; 10 | import 'package:ramadan/utils/constants/color_constant.dart'; 11 | import 'package:ramadan/utils/constants/string_constant.dart'; 12 | import 'package:ramadan/utils/theme/CustomTextTheme.dart'; 13 | 14 | class HadithPage extends StatelessWidget { 15 | HadithPage({super.key}); 16 | late HadithPageViewModel _hadithPageViewModel; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | _hadithPageViewModel = Get.put(HadithPageViewModel()); 21 | return SafeArea( 22 | child: Obx( 23 | () => Scaffold( 24 | backgroundColor: ColorBackgroundConstant.white, 25 | appBar: AppBar( 26 | elevation: 0, 27 | backgroundColor: ColorCommonConstant.transparent, 28 | automaticallyImplyLeading: false, 29 | title: _Header( 30 | title: StringHadithConstant.hadithAppBarTitle, 31 | hadithCategory: _hadithPageViewModel.uniqueCategoryList, 32 | categoryName: _hadithPageViewModel.categoryName.value, 33 | onSelected: (String value) async { 34 | await _hadithPageViewModel.getHadithsByCategory(value); 35 | }, 36 | ), 37 | ), 38 | body: Obx( 39 | () => _hadithPageViewModel.isLoading.value 40 | ? Padding( 41 | padding: context.padding.low, 42 | child: ListView.builder( 43 | itemCount: _hadithPageViewModel.hadithList.length, 44 | itemBuilder: (BuildContext context, int index) { 45 | return HadithCard( 46 | text: _hadithPageViewModel.hadithList[index].hadith, 47 | author: _hadithPageViewModel.hadithList[index].author, 48 | ); 49 | }, 50 | ), 51 | ) 52 | : const Center( 53 | child: CircularProgressIndicator(), 54 | ), 55 | ), 56 | ), 57 | ), 58 | ); 59 | } 60 | } 61 | 62 | class _Header extends StatelessWidget { 63 | const _Header({ 64 | required this.title, 65 | required this.hadithCategory, 66 | required this.categoryName, 67 | required this.onSelected, 68 | }); 69 | final String title; 70 | final List hadithCategory; 71 | final String categoryName; 72 | final void Function(String)? onSelected; 73 | @override 74 | Widget build(BuildContext context) { 75 | return Row( 76 | children: [ 77 | Column( 78 | crossAxisAlignment: CrossAxisAlignment.start, 79 | children: [ 80 | Text( 81 | title, 82 | style: CustomTextTheme(context).bodyMedium.copyWith(color: ColorTextConstant.black), 83 | ), 84 | SizedBox( 85 | height: 5.h, 86 | ), 87 | Text( 88 | categoryName, 89 | style: CustomTextTheme(context).bodySmall.copyWith(color: ColorTextConstant.orangeAccent), 90 | ), 91 | ], 92 | ), 93 | const Spacer(), 94 | HadithCategoryFilterButton( 95 | hadithCategory: hadithCategory, 96 | onSelected: onSelected, 97 | ), 98 | ], 99 | ); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates a win32 window with |title| that is positioned and sized using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # === Flutter Library === 14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 15 | 16 | # Published to parent scope for install step. 17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 21 | 22 | list(APPEND FLUTTER_LIBRARY_HEADERS 23 | "flutter_export.h" 24 | "flutter_windows.h" 25 | "flutter_messenger.h" 26 | "flutter_plugin_registrar.h" 27 | "flutter_texture_registrar.h" 28 | ) 29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 30 | add_library(flutter INTERFACE) 31 | target_include_directories(flutter INTERFACE 32 | "${EPHEMERAL_DIR}" 33 | ) 34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 35 | add_dependencies(flutter flutter_assemble) 36 | 37 | # === Wrapper === 38 | list(APPEND CPP_WRAPPER_SOURCES_CORE 39 | "core_implementations.cc" 40 | "standard_codec.cc" 41 | ) 42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 44 | "plugin_registrar.cc" 45 | ) 46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 47 | list(APPEND CPP_WRAPPER_SOURCES_APP 48 | "flutter_engine.cc" 49 | "flutter_view_controller.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 52 | 53 | # Wrapper sources needed for a plugin. 54 | add_library(flutter_wrapper_plugin STATIC 55 | ${CPP_WRAPPER_SOURCES_CORE} 56 | ${CPP_WRAPPER_SOURCES_PLUGIN} 57 | ) 58 | apply_standard_settings(flutter_wrapper_plugin) 59 | set_target_properties(flutter_wrapper_plugin PROPERTIES 60 | POSITION_INDEPENDENT_CODE ON) 61 | set_target_properties(flutter_wrapper_plugin PROPERTIES 62 | CXX_VISIBILITY_PRESET hidden) 63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 64 | target_include_directories(flutter_wrapper_plugin PUBLIC 65 | "${WRAPPER_ROOT}/include" 66 | ) 67 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 68 | 69 | # Wrapper sources needed for the runner. 70 | add_library(flutter_wrapper_app STATIC 71 | ${CPP_WRAPPER_SOURCES_CORE} 72 | ${CPP_WRAPPER_SOURCES_APP} 73 | ) 74 | apply_standard_settings(flutter_wrapper_app) 75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 76 | target_include_directories(flutter_wrapper_app PUBLIC 77 | "${WRAPPER_ROOT}/include" 78 | ) 79 | add_dependencies(flutter_wrapper_app flutter_assemble) 80 | 81 | # === Flutter tool backend === 82 | # _phony_ is a non-existent file to force this command to run every time, 83 | # since currently there's no way to get a full input/output list from the 84 | # flutter tool. 85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 87 | add_custom_command( 88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 90 | ${CPP_WRAPPER_SOURCES_APP} 91 | ${PHONY_OUTPUT} 92 | COMMAND ${CMAKE_COMMAND} -E env 93 | ${FLUTTER_TOOL_ENVIRONMENT} 94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 95 | windows-x64 $ 96 | VERBATIM 97 | ) 98 | add_custom_target(flutter_assemble DEPENDS 99 | "${FLUTTER_LIBRARY}" 100 | ${FLUTTER_LIBRARY_HEADERS} 101 | ${CPP_WRAPPER_SOURCES_CORE} 102 | ${CPP_WRAPPER_SOURCES_PLUGIN} 103 | ${CPP_WRAPPER_SOURCES_APP} 104 | ) 105 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(ramadan LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "Ramazan 2024") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(VERSION 3.14...3.25) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | 56 | # Generated plugin build rules, which manage building the plugins and adding 57 | # them to the application. 58 | include(flutter/generated_plugins.cmake) 59 | 60 | 61 | # === Installation === 62 | # Support files are copied into place next to the executable, so that it can 63 | # run in place. This is done instead of making a separate bundle (as on Linux) 64 | # so that building and running from within Visual Studio will work. 65 | set(BUILD_BUNDLE_DIR "$") 66 | # Make the "install" step default, as it's required to run. 67 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 68 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 69 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 70 | endif() 71 | 72 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 73 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 74 | 75 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 76 | COMPONENT Runtime) 77 | 78 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 79 | COMPONENT Runtime) 80 | 81 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 82 | COMPONENT Runtime) 83 | 84 | if(PLUGIN_BUNDLED_LIBRARIES) 85 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 86 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 87 | COMPONENT Runtime) 88 | endif() 89 | 90 | # Fully re-copy the assets directory on each build to avoid having stale files 91 | # from a previous install. 92 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 93 | install(CODE " 94 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 95 | " COMPONENT Runtime) 96 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 97 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 98 | 99 | # Install the AOT library on non-Debug builds only. 100 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 101 | CONFIGURATIONS Profile;Release 102 | COMPONENT Runtime) 103 | -------------------------------------------------------------------------------- /lib/services/common/notification/LocalNotificationService.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: depend_on_referenced_packages, directives_ordering 2 | 3 | import 'dart:async'; 4 | import 'dart:math'; 5 | 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 8 | import 'package:ramadan/utils/constants/string_constant.dart'; 9 | import 'package:ramadan/utils/exceptions/CustomException.dart'; 10 | import 'package:timezone/timezone.dart' as tz; 11 | import 'package:timezone/data/latest.dart' as tz; 12 | 13 | FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); 14 | Random random = Random(); 15 | 16 | abstract class ILocalNotificationService { 17 | Future notificationDetails(); 18 | Future initializePlatformNotifications(); 19 | Future showFirebaseNotification(String title, String body); 20 | Future schedulePrayerTimeNotification(String city, DateTime notificationDate); 21 | } 22 | 23 | final class LocalNotificationService implements ILocalNotificationService { 24 | @override 25 | Future notificationDetails() async { 26 | const androidNotificationChannel = AndroidNotificationChannel( 27 | 'ramadanAppChannelId-1', 28 | 'E-Imsakiye Ramadan', 29 | description: 'Ramadan App Push Notifications With Sound', 30 | sound: RawResourceAndroidNotificationSound('cannon'), 31 | importance: Importance.max, 32 | ); 33 | 34 | await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation()?.createNotificationChannel(androidNotificationChannel); 35 | 36 | final platformChannelSpecificsWithoutCabinSound = NotificationDetails( 37 | android: AndroidNotificationDetails( 38 | androidNotificationChannel.id, 39 | androidNotificationChannel.name, 40 | importance: androidNotificationChannel.importance, 41 | priority: Priority.high, 42 | enableLights: true, 43 | sound: androidNotificationChannel.sound, 44 | icon: '@drawable/cannon', 45 | showWhen: false, 46 | color: const Color.fromRGBO(0, 0, 0, 0), 47 | channelDescription: androidNotificationChannel.description, 48 | ), 49 | iOS: const DarwinNotificationDetails(), 50 | ); 51 | 52 | return platformChannelSpecificsWithoutCabinSound; 53 | } 54 | 55 | @override 56 | Future initializePlatformNotifications() async { 57 | const initializationSettingsAndroid = AndroidInitializationSettings('@drawable/cannon'); 58 | 59 | const initializationSettings = InitializationSettings(android: initializationSettingsAndroid); 60 | 61 | await flutterLocalNotificationsPlugin.initialize( 62 | initializationSettings, 63 | onDidReceiveNotificationResponse: (details) {}, 64 | onDidReceiveBackgroundNotificationResponse: (details) {}, 65 | ); 66 | } 67 | 68 | @override 69 | Future showFirebaseNotification(String title, String body) async { 70 | await flutterLocalNotificationsPlugin.show(random.nextInt(1 << 31), title, body, await notificationDetails()); 71 | } 72 | 73 | @override 74 | Future schedulePrayerTimeNotification(String city, DateTime notificationDate) async { 75 | try { 76 | await flutterLocalNotificationsPlugin.cancelAll(); 77 | final id = DateTime.now().millisecondsSinceEpoch.remainder(100000); 78 | final timeZone = await _setup(); 79 | final originalTZDateTime = tz.TZDateTime.from(notificationDate, timeZone); 80 | 81 | await flutterLocalNotificationsPlugin.zonedSchedule( 82 | id, 83 | '$city için İftar Vakti!', 84 | StringCommonConstant.notificationBody, 85 | originalTZDateTime, 86 | await notificationDetails(), 87 | androidScheduleMode: AndroidScheduleMode.inexactAllowWhileIdle, 88 | uiLocalNotificationDateInterpretation: UILocalNotificationDateInterpretation.absoluteTime, 89 | matchDateTimeComponents: DateTimeComponents.dateAndTime, 90 | ); 91 | } catch (e) { 92 | throw CustomException(StringCommonConstant.anErrorOccured); 93 | } 94 | } 95 | 96 | Future _setup() async { 97 | tz.initializeTimeZones(); 98 | tz.getLocation('Europe/Istanbul'); 99 | return tz.local; 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /lib/ui/login/LoginPageViewModel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:ramadan/services/common/core/AuthService.dart'; 4 | import 'package:ramadan/ui/ViewModelBase.dart'; 5 | import 'package:ramadan/ui/home/CustomNavigationPage.dart'; 6 | import 'package:ramadan/utils/constants/string_constant.dart'; 7 | import 'package:ramadan/utils/enums/LoginTypeEnum.dart'; 8 | import 'package:ramadan/utils/navigation/CustomNavigator.dart'; 9 | import 'package:ramadan/utils/popups/CustomDialog.dart'; 10 | import 'package:ramadan/utils/popups/CustomSnackBar.dart'; 11 | import 'package:ramadan/utils/popups/CustomSnackBarType.dart'; 12 | import 'package:ramadan/utils/servicelocator/ServiceLocator.dart'; 13 | import 'package:ramadan/utils/validator/LoginValidator.dart'; 14 | 15 | class LoginPageViewModel extends ViewModelBase { 16 | LoginPageViewModel(BuildContext context) { 17 | setCurrentScreen('Login Page'); 18 | _context = context; 19 | } 20 | late final BuildContext _context; 21 | 22 | // Secure 23 | RxInt failedSignInCount = 0.obs; 24 | 25 | // TextEditingController 26 | final TextEditingController emailTextController = TextEditingController(); 27 | final TextEditingController passwordTextController = TextEditingController(); 28 | final TextEditingController forgotPasswordTextController = TextEditingController(); 29 | 30 | // Form 31 | final GlobalKey formKey = GlobalKey(); 32 | final GlobalKey forgotPasswordFormKey = GlobalKey(); 33 | 34 | // Password Icon Config 35 | RxBool obscureText = false.obs; 36 | 37 | final IAuthService _authService = ServiceLocator().get(); 38 | 39 | @override 40 | void dispose() { 41 | emailTextController.dispose(); 42 | passwordTextController.dispose(); 43 | super.dispose(); 44 | } 45 | 46 | void clearTextController() { 47 | emailTextController.clear(); 48 | passwordTextController.clear(); 49 | } 50 | 51 | void loginTextFormFieldOnChanged(String? value, TextEditingController controller, LoginTypeEnum loginTypeEnum) { 52 | if (value!.isEmpty) { 53 | return; 54 | } else { 55 | final result = LoginValidator.validateLogin(value, loginTypeEnum); 56 | if (result == null) { 57 | controller.text = value; 58 | } 59 | } 60 | } 61 | 62 | Future signInWithEmailAndPassword(String email, String password) async { 63 | try { 64 | CustomDialog.showLoadingDialog(); 65 | final user = await _authService.signInWithEmailAndPassword(email, password); 66 | if (user != null) { 67 | CustomDialog.dismiss(); 68 | failedSignInCount.value = 0; 69 | await CustomNavigator().pushAndRemoveUntil(CustomNavigationPage()); 70 | } else { 71 | CustomDialog.dismiss(); 72 | failedSignInCount.value++; 73 | if (_context.mounted) await CustomSnackBar.showSnackBar(_context, CustomSnackBarType.error, StringLoginConstant.snackbarErrorEmailPasswordControlText); 74 | } 75 | } catch (e) { 76 | await exceptionHandlingService.handleException(e); 77 | } 78 | } 79 | 80 | RxBool get signInButtonVisible => failedSignInCount.value >= 3 ? false.obs : true.obs; 81 | 82 | Future signInGoogle() async { 83 | try { 84 | final user = await _authService.signInWithGoogle(); 85 | clearTextController(); 86 | if (user != null) { 87 | await CustomNavigator().pushAndRemoveUntil(CustomNavigationPage()); 88 | } else { 89 | if (_context.mounted) await CustomSnackBar.showSnackBar(_context, CustomSnackBarType.error, StringLoginConstant.snackbarErrorRetryText); 90 | } 91 | } catch (e) { 92 | await exceptionHandlingService.handleException(e); 93 | } 94 | } 95 | 96 | void withoutSignIn(BuildContext context) { 97 | try { 98 | CustomNavigator().pushAndRemoveUntil(CustomNavigationPage()); 99 | } catch (e) { 100 | exceptionHandlingService.handleException(e); 101 | } 102 | } 103 | 104 | Future resetPassword(String email) async { 105 | try { 106 | await _authService.resetPassword(email); 107 | if (_context.mounted) await CustomSnackBar.showSnackBar(_context, CustomSnackBarType.success, StringLoginConstant.snackbarErrorEmailControlText); 108 | } catch (e) { 109 | await exceptionHandlingService.handleException(e); 110 | if (_context.mounted) await CustomSnackBar.showSnackBar(_context, CustomSnackBarType.error, StringLoginConstant.snackbarErrorRetryText); 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /lib/model/home/PrayerTimeWord.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | class PrayerTimeWord { 3 | final int id; 4 | final String trWord; 5 | final String enWord; 6 | PrayerTimeWord({ 7 | required this.id, 8 | required this.trWord, 9 | required this.enWord, 10 | }); 11 | 12 | static List ramadanWordList = [ 13 | PrayerTimeWord(id: 1, trWord: 'Ramazan ayı bereket ve huzur getirsin.', enWord: 'May the month of Ramadan bring blessings and peace.'), 14 | PrayerTimeWord(id: 2, trWord: 'Dualarınız kabul olsun.', enWord: 'May your prayers be accepted.'), 15 | PrayerTimeWord(id: 3, trWord: 'Oruç, sabır ve dayanıklılığın simgesidir.', enWord: 'Fasting is a symbol of patience and resilience.'), 16 | PrayerTimeWord(id: 4, trWord: 'Ramazan, kalp ve ruhumuzu temizler.', enWord: 'Ramadan cleanses our hearts and souls.'), 17 | PrayerTimeWord(id: 5, trWord: 'İftar sofraları sevdiklerimizle birleştirir.', enWord: 'Iftar tables bring us together with our loved ones.'), 18 | PrayerTimeWord(id: 6, trWord: 'Ramazan, manevi bir yolculuktur.', enWord: 'Ramadan is a spiritual journey.'), 19 | PrayerTimeWord(id: 7, trWord: 'Oruç, kendimizi kontrol etme sanatıdır.', enWord: 'Fasting is the art of self-control.'), 20 | PrayerTimeWord(id: 8, trWord: 'Güzel dualarla dolu bir Ramazan geçirmeniz dileğiyle.', enWord: 'Wishing you a Ramadan filled with beautiful prayers.'), 21 | PrayerTimeWord(id: 9, trWord: 'Rahmet ve mağfiret ayı olan Ramazan hoş geldin.', enWord: 'Welcome, Ramadan, the month of mercy and forgiveness.'), 22 | PrayerTimeWord(id: 10, trWord: 'Ramazan, güzellikleriyle dolu bir mücevher gibidir.', enWord: 'Ramadan is like a jewel filled with beauties.'), 23 | PrayerTimeWord(id: 11, trWord: 'İftar sofralarınız şen olsun.', enWord: 'May your iftar tables be joyful.'), 24 | PrayerTimeWord(id: 12, trWord: "Allah'ın rahmeti üzerinize olsun.", enWord: 'May the mercy of Allah be upon you.'), 25 | PrayerTimeWord(id: 13, trWord: 'Ruhunuzu ve bedeninizi arındıran bir Ramazan geçirmeniz dileğiyle.', enWord: 'Wishing you a Ramadan that purifies your soul and body.'), 26 | PrayerTimeWord(id: 14, trWord: 'İyi niyetlerle dolu bir ay geçirmeniz dileğiyle.', enWord: 'Wishing you a month filled with good intentions.'), 27 | PrayerTimeWord(id: 15, trWord: 'Dualarınızın kabul olduğu bir Ramazan geçirmeniz dileğiyle.', enWord: 'Wishing you a Ramadan where your prayers are answered.'), 28 | PrayerTimeWord(id: 16, trWord: "Ramazan'ın huzurunu ve mutluluğunu yaşayın.", enWord: 'Experience the peace and joy of Ramadan.'), 29 | PrayerTimeWord(id: 17, trWord: 'Oruç, şükür ve minnettarlık duygularını güçlendirir.', enWord: 'Fasting strengthens feelings of gratitude and thankfulness.'), 30 | PrayerTimeWord(id: 18, trWord: 'Rahmet dolu bir Ramazan ayı geçirmeniz dileğiyle.', enWord: 'Wishing you a Ramadan filled with mercy.'), 31 | PrayerTimeWord(id: 19, trWord: 'Dualarınızın gerçekleştiği bir ay olsun.', enWord: 'May it be a month where your prayers come true.'), 32 | PrayerTimeWord(id: 20, trWord: 'Sevdiklerinizle bir araya geldiğiniz neşeli iftarlar geçirmeniz dileğiyle.', enWord: 'Wishing you joyful iftars with your loved ones.'), 33 | PrayerTimeWord(id: 21, trWord: 'Oruç, manevi bir detoks gibidir.', enWord: 'Fasting is like a spiritual detox.'), 34 | PrayerTimeWord(id: 22, trWord: 'Kalbinizdeki güzellikleri paylaşmanız dileğiyle.', enWord: 'Wishing you share the beauty in your heart.'), 35 | PrayerTimeWord(id: 23, trWord: 'Ruhunuza huzur veren bir Ramazan geçirmeniz dileğiyle.', enWord: 'Wishing you a Ramadan that brings peace to your soul.'), 36 | PrayerTimeWord(id: 24, trWord: 'İyilik ve sevgi dolu bir ay geçirmeniz dileğiyle.', enWord: 'Wishing you a month filled with goodness and love.'), 37 | PrayerTimeWord(id: 25, trWord: 'Dualarınızın ve ibadetlerinizin kabul olduğu bir Ramazan olsun.', enWord: 'May it be a Ramadan where your prayers and worship are accepted.'), 38 | PrayerTimeWord(id: 26, trWord: 'Oruç, kendimizi daha iyi tanımamıza yardımcı olur.', enWord: 'Fasting helps us better understand ourselves.'), 39 | PrayerTimeWord(id: 27, trWord: "Allah'ın rahmeti ve mağfireti üzerinize olsun.", enWord: 'May the mercy and forgiveness of Allah be upon you.'), 40 | PrayerTimeWord(id: 28, trWord: 'Ruhunuzun derinliklerine yolculuk yapın.', enWord: 'Take a journey into the depths of your soul.'), 41 | PrayerTimeWord(id: 29, trWord: 'Dualarınızın gerçekleştiği bir ay dilerim.', enWord: 'I wish you a month where your prayers come true.'), 42 | PrayerTimeWord(id: 30, trWord: 'Ramazan bayramınız kutlu olsun!', enWord: 'Wishing you a blessed Ramadan holiday!'), 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /lib/utils/manager/GridItemManager.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: lines_longer_than_80_chars, public_member_api_docs 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:ramadan/model/domain/GridItemResult.dart'; 6 | import 'package:ramadan/model/domain/PrayerTimeDetails.dart'; 7 | import 'package:ramadan/model/home/GridItem.dart'; 8 | import 'package:ramadan/utils/constants/color_constant.dart'; 9 | import 'package:ramadan/utils/constants/image_constant.dart'; 10 | import 'package:ramadan/utils/constants/string_constant.dart'; 11 | import 'package:ramadan/utils/manager/TimeManager.dart'; 12 | 13 | final class GridItemManager { 14 | int? id; 15 | String? prayerIcon; 16 | Color? prayerColor; 17 | String? prayerTimeTitle; 18 | RxBool? isActive; 19 | String? prayerDate; 20 | String? prayerTimeText; 21 | GridItemResult fillGridItem(List prayerTimes, RxList gridItemList, RxList isActiveList) { 22 | for (var i = 0; i < prayerTimes.length; i++) { 23 | for (var j = 0; j < prayerTimes[i].times.length; j++) { 24 | final prayerTime = prayerTimes[i]; 25 | 26 | isActiveList.value = TimeManager.calculatePrayerTimes(prayerTimes[i].times); 27 | 28 | switch (j) { 29 | case 0: // İmsak 30 | id = j; 31 | prayerIcon = PrayerTimeIconConstant.imsak.toPng; 32 | prayerColor = PrayerTimeColor.imsak; 33 | prayerTimeTitle = StringHomeConstant.fajr; 34 | isActive = isActiveList[j]; 35 | prayerDate = prayerTime.date.isNotEmpty ? prayerTimes[i].date : StringCommonConstant.noDateInformation; 36 | prayerTimeText = prayerTime.times.isNotEmpty ? prayerTimes[i].times[j] : StringCommonConstant.noTimeInformation; 37 | case 1: // Güneş 38 | id = j; 39 | prayerIcon = PrayerTimeIconConstant.gunes.toPng; 40 | prayerColor = PrayerTimeColor.gunes; 41 | prayerTimeTitle = StringHomeConstant.sunrise; 42 | isActive = isActiveList[j]; 43 | prayerDate = prayerTime.date.isNotEmpty ? prayerTimes[i].date : StringCommonConstant.noDateInformation; 44 | 45 | prayerTimeText = prayerTime.times.isNotEmpty ? prayerTimes[i].times[j] : StringCommonConstant.noTimeInformation; 46 | case 2: // Öğle 47 | id = j; 48 | prayerIcon = PrayerTimeIconConstant.ogle.toPng; 49 | prayerColor = PrayerTimeColor.ogle; 50 | prayerTimeTitle = StringHomeConstant.dhuhr; 51 | isActive = isActiveList[j]; 52 | prayerDate = prayerTime.date.isNotEmpty ? prayerTimes[i].date : StringCommonConstant.noDateInformation; 53 | 54 | prayerTimeText = prayerTime.times.isNotEmpty ? prayerTimes[i].times[j] : StringCommonConstant.noTimeInformation; 55 | case 3: // İkindi 56 | id = j; 57 | prayerIcon = PrayerTimeIconConstant.ikindi.toPng; 58 | prayerColor = PrayerTimeColor.ikindi; 59 | prayerTimeTitle = StringHomeConstant.asr; 60 | isActive = isActiveList[j]; 61 | prayerDate = prayerTime.date.isNotEmpty ? prayerTimes[i].date : StringCommonConstant.noDateInformation; 62 | 63 | prayerTimeText = prayerTime.times.isNotEmpty ? prayerTimes[i].times[j] : StringCommonConstant.noTimeInformation; 64 | case 4: // İftar 65 | id = j; 66 | prayerIcon = PrayerTimeIconConstant.iftar.toPng; 67 | prayerColor = PrayerTimeColor.iftar; 68 | prayerTimeTitle = StringHomeConstant.sunset; 69 | isActive = isActiveList[j]; 70 | prayerDate = prayerTime.date.isNotEmpty ? prayerTimes[i].date : StringCommonConstant.noDateInformation; 71 | 72 | prayerTimeText = prayerTime.times.isNotEmpty ? prayerTimes[i].times[j] : StringCommonConstant.noTimeInformation; 73 | case 5: // Yatsı 74 | id = j; 75 | prayerIcon = PrayerTimeIconConstant.yatsi.toPng; 76 | prayerColor = PrayerTimeColor.yatsi; 77 | prayerTimeTitle = StringHomeConstant.isha; 78 | isActive = isActiveList[j]; 79 | prayerDate = prayerTime.date.isNotEmpty ? prayerTimes[i].date : StringCommonConstant.noDateInformation; 80 | 81 | prayerTimeText = prayerTime.times.isNotEmpty ? prayerTimes[i].times[j] : StringCommonConstant.noTimeInformation; 82 | default: 83 | break; 84 | } 85 | 86 | gridItemList.add( 87 | GridItem( 88 | id: id!, 89 | color: prayerColor!, 90 | iconPath: prayerIcon!, 91 | title: prayerTimeTitle!, 92 | time: prayerTimeText!, 93 | date: prayerDate!, 94 | isActive: isActive!, 95 | ), 96 | ); 97 | } 98 | } 99 | return GridItemResult(gridItemList, isActiveList); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /assets/image/hadith/logo_hadith.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 48 | -------------------------------------------------------------------------------- /lib/model/domain/TurkeyCity.dart: -------------------------------------------------------------------------------- 1 | class TurkeyCity { 2 | TurkeyCity({required this.id, required this.name, required this.lowercaseName}); 3 | final int id; 4 | final String name; 5 | final String lowercaseName; 6 | 7 | static List turkeyCities = [ 8 | TurkeyCity(id: 1, name: 'ADANA', lowercaseName: 'adana'), 9 | TurkeyCity(id: 2, name: 'ADIYAMAN', lowercaseName: 'adiyaman'), 10 | TurkeyCity(id: 3, name: 'AFYONKARAHİSAR', lowercaseName: 'afyonkarahisar'), 11 | TurkeyCity(id: 4, name: 'AĞRI', lowercaseName: 'agri'), 12 | TurkeyCity(id: 68, name: 'AKSARAY', lowercaseName: 'aksaray'), 13 | TurkeyCity(id: 5, name: 'AMASYA', lowercaseName: 'amasya'), 14 | TurkeyCity(id: 6, name: 'ANKARA', lowercaseName: 'ankara'), 15 | TurkeyCity(id: 7, name: 'ANTALYA', lowercaseName: 'antalya'), 16 | TurkeyCity(id: 75, name: 'ARDAHAN', lowercaseName: 'ardahan'), 17 | TurkeyCity(id: 8, name: 'ARTVİN', lowercaseName: 'artvin'), 18 | TurkeyCity(id: 9, name: 'AYDIN', lowercaseName: 'aydin'), 19 | TurkeyCity(id: 10, name: 'BALIKESİR', lowercaseName: 'balikesir'), 20 | TurkeyCity(id: 74, name: 'BARTIN', lowercaseName: 'bartin'), 21 | TurkeyCity(id: 72, name: 'BATMAN', lowercaseName: 'batman'), 22 | TurkeyCity(id: 69, name: 'BAYBURT', lowercaseName: 'bayburt'), 23 | TurkeyCity(id: 11, name: 'BİLECİK', lowercaseName: 'bilecik'), 24 | TurkeyCity(id: 12, name: 'BİNGÖL', lowercaseName: 'bingol'), 25 | TurkeyCity(id: 13, name: 'BİTLİS', lowercaseName: 'bitlis'), 26 | TurkeyCity(id: 14, name: 'BOLU', lowercaseName: 'bolu'), 27 | TurkeyCity(id: 15, name: 'BURDUR', lowercaseName: 'burdur'), 28 | TurkeyCity(id: 16, name: 'BURSA', lowercaseName: 'bursa'), 29 | TurkeyCity(id: 17, name: 'ÇANAKKALE', lowercaseName: 'canakkale'), 30 | TurkeyCity(id: 18, name: 'ÇANKIRI', lowercaseName: 'cankiri'), 31 | TurkeyCity(id: 19, name: 'ÇORUM', lowercaseName: 'corum'), 32 | TurkeyCity(id: 20, name: 'DENİZLİ', lowercaseName: 'denizli'), 33 | TurkeyCity(id: 21, name: 'DİYARBAKIR', lowercaseName: 'diyarbakir'), 34 | TurkeyCity(id: 81, name: 'DÜZCE', lowercaseName: 'duzce'), 35 | TurkeyCity(id: 22, name: 'EDİRNE', lowercaseName: 'edirne'), 36 | TurkeyCity(id: 23, name: 'ELAZIĞ', lowercaseName: 'elazig'), 37 | TurkeyCity(id: 24, name: 'ERZİNCAN', lowercaseName: 'erzincan'), 38 | TurkeyCity(id: 25, name: 'ERZURUM', lowercaseName: 'erzurum'), 39 | TurkeyCity(id: 26, name: 'ESKİŞEHİR', lowercaseName: 'eskisehir'), 40 | TurkeyCity(id: 27, name: 'GAZİANTEP', lowercaseName: 'gaziantep'), 41 | TurkeyCity(id: 28, name: 'GİRESUN', lowercaseName: 'giresun'), 42 | TurkeyCity(id: 29, name: 'GÜMÜŞHANE', lowercaseName: 'gumushane'), 43 | TurkeyCity(id: 30, name: 'HAKKARİ', lowercaseName: 'hakkari'), 44 | TurkeyCity(id: 31, name: 'HATAY', lowercaseName: 'hatay'), 45 | TurkeyCity(id: 76, name: 'IĞDIR', lowercaseName: 'igdir'), 46 | TurkeyCity(id: 32, name: 'ISPARTA', lowercaseName: 'isparta'), 47 | TurkeyCity(id: 34, name: 'İSTANBUL', lowercaseName: 'istanbul'), 48 | TurkeyCity(id: 35, name: 'İZMİR', lowercaseName: 'izmir'), 49 | TurkeyCity(id: 46, name: 'KAHRAMANMARAŞ', lowercaseName: 'kahramanmaras'), 50 | TurkeyCity(id: 78, name: 'KARABÜK', lowercaseName: 'karabuk'), 51 | TurkeyCity(id: 70, name: 'KARAMAN', lowercaseName: 'karaman'), 52 | TurkeyCity(id: 36, name: 'KARS', lowercaseName: 'kars'), 53 | TurkeyCity(id: 37, name: 'KASTAMONU', lowercaseName: 'kastamonu'), 54 | TurkeyCity(id: 38, name: 'KAYSERİ', lowercaseName: 'kayseri'), 55 | TurkeyCity(id: 71, name: 'KIRIKKALE', lowercaseName: 'kirikkale'), 56 | TurkeyCity(id: 39, name: 'KIRKLARELİ', lowercaseName: 'kirklareli'), 57 | TurkeyCity(id: 40, name: 'KIRŞEHİR', lowercaseName: 'kirsehir'), 58 | TurkeyCity(id: 79, name: 'KİLİS', lowercaseName: 'kilis'), 59 | TurkeyCity(id: 41, name: 'KOCAELİ', lowercaseName: 'kocaeli'), 60 | TurkeyCity(id: 42, name: 'KONYA', lowercaseName: 'konya'), 61 | TurkeyCity(id: 43, name: 'KÜTAHYA', lowercaseName: 'kutahya'), 62 | TurkeyCity(id: 44, name: 'MALATYA', lowercaseName: 'malatya'), 63 | TurkeyCity(id: 45, name: 'MANİSA', lowercaseName: 'manisa'), 64 | TurkeyCity(id: 47, name: 'MARDİN', lowercaseName: 'mardin'), 65 | TurkeyCity(id: 33, name: 'MERSİN', lowercaseName: 'mersin'), 66 | TurkeyCity(id: 48, name: 'MUĞLA', lowercaseName: 'mugla'), 67 | TurkeyCity(id: 49, name: 'MUŞ', lowercaseName: 'mus'), 68 | TurkeyCity(id: 50, name: 'NEVŞEHİR', lowercaseName: 'nevsehir'), 69 | TurkeyCity(id: 51, name: 'NİĞDE', lowercaseName: 'nigde'), 70 | TurkeyCity(id: 52, name: 'ORDU', lowercaseName: 'ordu'), 71 | TurkeyCity(id: 80, name: 'OSMANİYE', lowercaseName: 'osmaniye'), 72 | TurkeyCity(id: 53, name: 'RİZE', lowercaseName: 'rize'), 73 | TurkeyCity(id: 54, name: 'SAKARYA', lowercaseName: 'sakarya'), 74 | TurkeyCity(id: 55, name: 'SAMSUN', lowercaseName: 'samsun'), 75 | TurkeyCity(id: 56, name: 'SİİRT', lowercaseName: 'siirt'), 76 | TurkeyCity(id: 57, name: 'SİNOP', lowercaseName: 'sinop'), 77 | TurkeyCity(id: 58, name: 'SİVAS', lowercaseName: 'sivas'), 78 | TurkeyCity(id: 63, name: 'ŞANLIURFA', lowercaseName: 'sanliurfa'), 79 | TurkeyCity(id: 73, name: 'ŞIRNAK', lowercaseName: 'sirnak'), 80 | TurkeyCity(id: 59, name: 'TEKİRDAĞ', lowercaseName: 'tekirdag'), 81 | TurkeyCity(id: 60, name: 'TOKAT', lowercaseName: 'tokat'), 82 | TurkeyCity(id: 61, name: 'TRABZON', lowercaseName: 'trabzon'), 83 | TurkeyCity(id: 62, name: 'TUNCELİ', lowercaseName: 'tunceli'), 84 | TurkeyCity(id: 64, name: 'UŞAK', lowercaseName: 'usak'), 85 | TurkeyCity(id: 65, name: 'VAN', lowercaseName: 'van'), 86 | TurkeyCity(id: 77, name: 'YALOVA', lowercaseName: 'yalova'), 87 | TurkeyCity(id: 66, name: 'YOZGAT', lowercaseName: 'yozgat'), 88 | TurkeyCity(id: 67, name: 'ZONGULDAK', lowercaseName: 'zonguldak'), 89 | ]; 90 | } 91 | --------------------------------------------------------------------------------