├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt ├── my_application.h ├── my_application.cc └── CMakeLists.txt ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── 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 │ │ └── LaunchBackground.imageset │ │ │ ├── background.png │ │ │ ├── darkbackground.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.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 ├── macos ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_64.png │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_512.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme └── RunnerTests │ └── RunnerTests.swift ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── .vscode └── settings.json ├── assets ├── icon │ ├── icon.png │ ├── background.png │ ├── splash-dark.png │ ├── splash-light.png │ ├── foreground-black.png │ └── foreground-white.png ├── images │ ├── thumbs │ │ ├── 4k.jpg │ │ ├── Dark.jpg │ │ ├── Foods.jpg │ │ ├── Love.jpg │ │ ├── Ocean.jpg │ │ ├── Pets.jpg │ │ ├── Rain.jpg │ │ ├── River.jpg │ │ ├── Erotic.jpg │ │ ├── Fantasy.jpg │ │ ├── Fields.jpg │ │ ├── Flowers.jpg │ │ ├── Forest.jpg │ │ ├── Galaxy.jpg │ │ ├── Hiking.jpg │ │ ├── Lingerie.jpg │ │ ├── Nature.jpg │ │ ├── Portrait.jpg │ │ ├── Street.jpg │ │ ├── Topless.jpg │ │ ├── Village.jpg │ │ ├── Monochrome.jpg │ │ ├── Mountains.jpg │ │ └── Architecture.jpg │ ├── pixabay-black.png │ └── pixabay-white.png └── fonts │ └── PixelifySans-Regular.ttf ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── drawable │ │ │ │ │ ├── background.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ ├── background.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-night │ │ │ │ │ ├── background.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-night-v21 │ │ │ │ │ ├── background.png │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-hdpi │ │ │ │ │ ├── ic_launcher_background.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ ├── ic_launcher_background.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ ├── ic_launcher_background.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ ├── ic_launcher_background.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ ├── ic_launcher_background.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ └── ic_launcher.xml │ │ │ │ ├── values-v31 │ │ │ │ │ └── styles.xml │ │ │ │ ├── values-night-v31 │ │ │ │ │ └── styles.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── pixelperks │ │ │ │ │ └── android │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── build.gradle └── settings.gradle ├── .env ├── 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_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt └── CMakeLists.txt ├── lib ├── Hive │ ├── hive_dark_mode.dart │ ├── hive_fav.dart │ ├── hive_dark_mode.g.dart │ └── hive_fav.g.dart ├── controller │ ├── safe_content_controller.dart │ ├── detailed_controller.dart │ ├── favorite_controller.dart │ ├── preview_controller.dart │ └── theme_controller.dart ├── utils │ ├── get_smack.dart │ ├── splash_screen.dart │ └── screen_operation.dart ├── widget │ ├── center_error.dart │ ├── center_loader.dart │ ├── bouncable.dart │ ├── preview_grid.dart │ └── detailed_view.dart ├── model │ ├── preview.dart │ ├── full.dart │ └── category_item.dart ├── screens │ ├── latest.dart │ ├── ec.dart │ ├── trending.dart │ ├── categorized.dart │ ├── choice.dart │ ├── landing.dart │ ├── favorites.dart │ ├── downloaded.dart │ └── settings.dart └── main.dart ├── .gitignore ├── test └── widget_test.dart ├── analysis_options.yaml ├── .metadata ├── pubspec.yaml ├── CONTRIBUTING.md ├── README.md └── CODE_OF_CONDUCT.md /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/web/favicon.png -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "interactive" 3 | } -------------------------------------------------------------------------------- /assets/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/icon/icon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/icon/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/icon/background.png -------------------------------------------------------------------------------- /assets/icon/splash-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/icon/splash-dark.png -------------------------------------------------------------------------------- /assets/icon/splash-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/icon/splash-light.png -------------------------------------------------------------------------------- /assets/images/thumbs/4k.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/4k.jpg -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/images/thumbs/Dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Dark.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Foods.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Foods.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Love.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Love.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Ocean.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Ocean.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Pets.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Pets.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Rain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Rain.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/River.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/River.jpg -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /assets/icon/foreground-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/icon/foreground-black.png -------------------------------------------------------------------------------- /assets/icon/foreground-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/icon/foreground-white.png -------------------------------------------------------------------------------- /assets/images/pixabay-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/pixabay-black.png -------------------------------------------------------------------------------- /assets/images/pixabay-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/pixabay-white.png -------------------------------------------------------------------------------- /assets/images/thumbs/Erotic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Erotic.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Fantasy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Fantasy.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Fields.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Fields.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Flowers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Flowers.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Forest.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Forest.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Galaxy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Galaxy.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Hiking.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Hiking.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Lingerie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Lingerie.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Nature.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Nature.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Portrait.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Portrait.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Street.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Street.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Topless.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Topless.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Village.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Village.jpg -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | SECRET="YOUR_PIXABAY_SECRET_KEY" 2 | 3 | # PIXABY API DOCS : https://pixabay.com/api/docs/ 4 | 5 | EMAIL="YOUR_EMAIL_ID" 6 | -------------------------------------------------------------------------------- /assets/images/thumbs/Monochrome.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Monochrome.jpg -------------------------------------------------------------------------------- /assets/images/thumbs/Mountains.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Mountains.jpg -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /assets/fonts/PixelifySans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/fonts/PixelifySans-Regular.ttf -------------------------------------------------------------------------------- /assets/images/thumbs/Architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/assets/images/thumbs/Architecture.jpg -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-v21/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-night/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night-v21/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-night-v21/background.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/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/Moinak-Majumdar/PixelPerks/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moinak-Majumdar/PixelPerks/HEAD/ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/pixelperks/android/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.pixelperks.android 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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/Hive/hive_dark_mode.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive/hive.dart'; 2 | 3 | part 'hive_dark_mode.g.dart'; 4 | 5 | @HiveType(typeId: 2) 6 | class HiveDarkMode { 7 | HiveDarkMode({required this.isDarkMode}); 8 | @HiveField(0) 9 | bool isDarkMode; 10 | } 11 | -------------------------------------------------------------------------------- /lib/controller/safe_content_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class SafeContentController extends GetxController { 4 | RxBool safeContent = true.obs; 5 | 6 | void toggleSafeContent(bool val) { 7 | safeContent.value = val; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/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 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/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/controller/detailed_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:pixelperks/model/full.dart'; 3 | 4 | class DetailedController extends GetxController { 5 | RxMap items = {}.obs; 6 | 7 | void addFullStateCache(FullImage item) { 8 | items.value = {...items, '${item.id}': item}; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 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 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /lib/Hive/hive_fav.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive/hive.dart'; 2 | 3 | part 'hive_fav.g.dart'; 4 | 5 | @HiveType(typeId: 1) 6 | class HiveFav { 7 | HiveFav({ 8 | required this.id, 9 | required this.web340, 10 | required this.isSafe, 11 | }); 12 | 13 | @HiveField(0) 14 | int id; 15 | 16 | @HiveField(1) 17 | String web340; 18 | 19 | @HiveField(2) 20 | bool isSafe; 21 | } 22 | -------------------------------------------------------------------------------- /linux/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 fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "background.png", 5 | "idiom" : "universal" 6 | }, 7 | { 8 | "appearances" : [ 9 | { 10 | "appearance" : "luminosity", 11 | "value" : "dark" 12 | } 13 | ], 14 | "filename" : "darkbackground.png", 15 | "idiom" : "universal" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /linux/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 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "LaunchImage.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "LaunchImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "LaunchImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = pixelperks 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.pixelperks 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 13 | void RegisterPlugins(flutter::PluginRegistry* registry) { 14 | PermissionHandlerWindowsPluginRegisterWithRegistrar( 15 | registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); 16 | SharePlusWindowsPluginCApiRegisterWithRegistrar( 17 | registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); 18 | UrlLauncherWindowsRegisterWithRegistrar( 19 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 20 | } 21 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import device_info_plus 9 | import path_provider_foundation 10 | import share_plus 11 | import sqflite 12 | import url_launcher_macos 13 | 14 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 15 | DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) 16 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 17 | SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) 18 | SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) 19 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 20 | } 21 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /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/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | permission_handler_windows 7 | share_plus 8 | url_launcher_windows 9 | ) 10 | 11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 12 | ) 13 | 14 | set(PLUGIN_BUNDLED_LIBRARIES) 15 | 16 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 21 | endforeach(plugin) 22 | 23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 26 | endforeach(ffi_plugin) 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 | -------------------------------------------------------------------------------- /.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 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | .env 36 | *.env 37 | /lib/utils/message.dart 38 | /lib/utils/splash_screen.dart 39 | 40 | # Symbolication related 41 | app.*.symbols 42 | 43 | # Obfuscation related 44 | app.*.map.json 45 | 46 | # Android Studio will place build artifacts here 47 | /android/app/debug 48 | /android/app/profile 49 | /android/app/release 50 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pixelperks", 3 | "short_name": "pixelperks", 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 | } 36 | -------------------------------------------------------------------------------- /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-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /lib/utils/get_smack.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class GetSmack { 5 | GetSmack({ 6 | required this.body, 7 | required this.icon, 8 | required this.title, 9 | this.position = SnackPosition.TOP, 10 | }) { 11 | Get.showSnackbar( 12 | GetSnackBar( 13 | titleText: Text( 14 | title, 15 | style: const TextStyle( 16 | fontFamily: 'PixelifySans', 17 | color: Colors.amber, 18 | fontSize: 24, 19 | ), 20 | ), 21 | message: body, 22 | duration: const Duration(seconds: 5), 23 | isDismissible: true, 24 | backgroundColor: const Color.fromARGB(255, 11, 11, 11), 25 | borderRadius: 18, 26 | snackPosition: position, 27 | margin: const EdgeInsets.all(8), 28 | padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24), 29 | icon: Icon( 30 | icon, 31 | size: 36, 32 | color: Colors.amber, 33 | ), 34 | ), 35 | ); 36 | } 37 | final String title, body; 38 | final IconData icon; 39 | final SnackPosition position; 40 | } 41 | -------------------------------------------------------------------------------- /lib/widget/center_error.dart: -------------------------------------------------------------------------------- 1 | import 'package:eva_icons_flutter/eva_icons_flutter.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CenterError extends StatelessWidget { 5 | const CenterError( 6 | {super.key, this.error = 'Oops! Failed to connect server.'}); 7 | const CenterError.custom({super.key, required this.error}); 8 | 9 | final String error; 10 | 11 | @override 12 | Widget build(context) { 13 | return Center( 14 | child: Column( 15 | mainAxisSize: MainAxisSize.max, 16 | crossAxisAlignment: CrossAxisAlignment.center, 17 | mainAxisAlignment: MainAxisAlignment.center, 18 | children: [ 19 | const Icon( 20 | EvaIcons.alertTriangleOutline, 21 | color: Colors.red, 22 | size: 50, 23 | ), 24 | const SizedBox(height: 32), 25 | Text( 26 | error, 27 | textAlign: TextAlign.center, 28 | style: const TextStyle( 29 | fontFamily: 'PixelifySans', 30 | color: Colors.blueGrey, 31 | fontSize: 24, 32 | ), 33 | ) 34 | ], 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:pixelperks/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /lib/model/preview.dart: -------------------------------------------------------------------------------- 1 | class PreviewImage { 2 | const PreviewImage({ 3 | required this.id, 4 | required this.web340, 5 | required this.fromSafeSource, 6 | this.cdn, 7 | this.web640, 8 | }); 9 | 10 | final int id; 11 | final String web340; 12 | final bool fromSafeSource; 13 | final String? cdn, web640; 14 | } 15 | 16 | class PreviewImageServer { 17 | const PreviewImageServer({required this.images, required this.itemCount}); 18 | final List images; 19 | final int itemCount; 20 | 21 | factory PreviewImageServer.fromJson(Map json, 22 | {required bool fromSafeSource}) { 23 | final List data = []; 24 | final int itemCount = json['items'] as int; 25 | 26 | for (final elm in json['collection']) { 27 | data.add( 28 | PreviewImage( 29 | id: elm['id'] as int, 30 | // not using in this app. 31 | // cdn: elm['cdn'], 32 | web340: elm['web340'], 33 | fromSafeSource: fromSafeSource 34 | // web640: elm['web640'], 35 | ), 36 | ); 37 | } 38 | 39 | return PreviewImageServer(images: data, itemCount: itemCount); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/Hive/hive_dark_mode.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'hive_dark_mode.dart'; 4 | 5 | // ************************************************************************** 6 | // TypeAdapterGenerator 7 | // ************************************************************************** 8 | 9 | class HiveDarkModeAdapter extends TypeAdapter { 10 | @override 11 | final int typeId = 2; 12 | 13 | @override 14 | HiveDarkMode read(BinaryReader reader) { 15 | final numOfFields = reader.readByte(); 16 | final fields = { 17 | for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), 18 | }; 19 | return HiveDarkMode( 20 | isDarkMode: fields[0] as bool, 21 | ); 22 | } 23 | 24 | @override 25 | void write(BinaryWriter writer, HiveDarkMode obj) { 26 | writer 27 | ..writeByte(1) 28 | ..writeByte(0) 29 | ..write(obj.isDarkMode); 30 | } 31 | 32 | @override 33 | int get hashCode => typeId.hashCode; 34 | 35 | @override 36 | bool operator ==(Object other) => 37 | identical(this, other) || 38 | other is HiveDarkModeAdapter && 39 | runtimeType == other.runtimeType && 40 | typeId == other.typeId; 41 | } 42 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /lib/Hive/hive_fav.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'hive_fav.dart'; 4 | 5 | // ************************************************************************** 6 | // TypeAdapterGenerator 7 | // ************************************************************************** 8 | 9 | class HiveFavAdapter extends TypeAdapter { 10 | @override 11 | final int typeId = 1; 12 | 13 | @override 14 | HiveFav read(BinaryReader reader) { 15 | final numOfFields = reader.readByte(); 16 | final fields = { 17 | for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), 18 | }; 19 | return HiveFav( 20 | id: fields[0] as int, 21 | web340: fields[1] as String, 22 | isSafe: fields[2] as bool, 23 | ); 24 | } 25 | 26 | @override 27 | void write(BinaryWriter writer, HiveFav obj) { 28 | writer 29 | ..writeByte(3) 30 | ..writeByte(0) 31 | ..write(obj.id) 32 | ..writeByte(1) 33 | ..write(obj.web340) 34 | ..writeByte(2) 35 | ..write(obj.isSafe); 36 | } 37 | 38 | @override 39 | int get hashCode => typeId.hashCode; 40 | 41 | @override 42 | bool operator ==(Object other) => 43 | identical(this, other) || 44 | other is HiveFavAdapter && 45 | runtimeType == other.runtimeType && 46 | typeId == other.typeId; 47 | } 48 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /lib/model/full.dart: -------------------------------------------------------------------------------- 1 | class FullImage { 2 | const FullImage({ 3 | required this.id, 4 | this.cdn, 5 | required this.web340, 6 | this.tags, 7 | this.web640, 8 | required this.image, 9 | required this.imageSize, 10 | required this.likes, 11 | required this.views, 12 | required this.downloads, 13 | required this.owner, 14 | required this.ownerDp, 15 | required this.imgName, 16 | }); 17 | 18 | final int id, imageSize, likes, downloads, views; 19 | final String image, owner, ownerDp, web340, imgName; 20 | final String? cdn, web640, tags; 21 | } 22 | 23 | class FullImageServer { 24 | const FullImageServer({required this.detailed}); 25 | final FullImage detailed; 26 | 27 | factory FullImageServer.fromJson(Map json) { 28 | final Map data = json['fullImage']; 29 | final splitters = data['cdn'].split('/') as List; 30 | 31 | return FullImageServer( 32 | detailed: FullImage( 33 | id: data['id'] as int, 34 | image: data['image'], 35 | web340: data['web340'], 36 | imgName: splitters.last, 37 | // tags: data['tags'], 38 | imageSize: data['imageSize'], 39 | likes: data['likes'], 40 | views: data['view'], 41 | downloads: data['downloads'], 42 | owner: data['owner'], 43 | ownerDp: data['ownerDp'], 44 | ), 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/widget/center_loader.dart: -------------------------------------------------------------------------------- 1 | import 'package:animated_text_kit/animated_text_kit.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:pixelperks/controller/theme_controller.dart'; 5 | 6 | class CenterLoader extends StatelessWidget { 7 | const CenterLoader({super.key, required this.msg}); 8 | final String msg; 9 | 10 | @override 11 | Widget build(context) { 12 | DarkModeController modeController = Get.put(DarkModeController()); 13 | 14 | return Center( 15 | child: Column( 16 | mainAxisSize: MainAxisSize.max, 17 | mainAxisAlignment: MainAxisAlignment.center, 18 | crossAxisAlignment: CrossAxisAlignment.center, 19 | children: [ 20 | const CircularProgressIndicator(), 21 | const SizedBox(height: 36), 22 | Obx( 23 | () => DefaultTextStyle( 24 | style: TextStyle( 25 | fontFamily: 'PixelifySans', 26 | color: 27 | modeController.darkMode.value ? Colors.white : Colors.black, 28 | fontSize: 24, 29 | ), 30 | child: AnimatedTextKit( 31 | isRepeatingAnimation: false, 32 | animatedTexts: [ 33 | TyperAnimatedText(msg), 34 | ], 35 | ), 36 | ), 37 | ) 38 | ], 39 | ), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/screens/latest.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:pixelperks/controller/preview_controller.dart'; 5 | import 'package:pixelperks/widget/center_error.dart'; 6 | import 'package:pixelperks/widget/center_loader.dart'; 7 | import 'package:pixelperks/widget/preview_grid.dart'; 8 | 9 | class Latest extends StatelessWidget { 10 | const Latest({super.key}); 11 | 12 | @override 13 | Widget build(context) { 14 | final PreviewController pc = Get.put(PreviewController()); 15 | 16 | return Obx( 17 | () { 18 | // state cached :') 19 | if (pc.server[Endpoint.latest]!.isNotEmpty) { 20 | return PreviewGrid(server: pc.server[Endpoint.latest]!); 21 | } 22 | 23 | return FutureBuilder( 24 | future: fetchInitial('latest'), 25 | builder: (ctx, snap) { 26 | if (snap.hasData) { 27 | Timer(const Duration(microseconds: 100), () { 28 | pc.addSateCache(snap.data!.images, Endpoint.latest); 29 | }); 30 | 31 | // return PreviewGrid(server: snap.data!.images); 32 | } 33 | 34 | if (snap.hasError) { 35 | return const CenterError(); 36 | } 37 | 38 | return const CenterLoader(msg: 'Each pixel with unique perks..'); 39 | }, 40 | ); 41 | }, 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /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"pixelperks", 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/screens/ec.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:pixelperks/controller/preview_controller.dart'; 6 | import 'package:pixelperks/widget/center_error.dart'; 7 | import 'package:pixelperks/widget/center_loader.dart'; 8 | import 'package:pixelperks/widget/preview_grid.dart'; 9 | 10 | class EditorsChoice extends StatelessWidget { 11 | const EditorsChoice({super.key}); 12 | 13 | @override 14 | Widget build(context) { 15 | final PreviewController pc = Get.put(PreviewController()); 16 | 17 | return Obx( 18 | () { 19 | // state cached :') 20 | if (pc.server[Endpoint.ec]!.isNotEmpty) { 21 | return PreviewGrid(server: pc.server[Endpoint.ec]!); 22 | } 23 | 24 | return FutureBuilder( 25 | future: fetchInitial('editorsChoice'), 26 | builder: (ctx, snap) { 27 | if (snap.hasData) { 28 | Timer(const Duration(microseconds: 100), () { 29 | pc.addSateCache(snap.data!.images, Endpoint.ec); 30 | }); 31 | 32 | // return PreviewGrid(server: snap.data!.images); 33 | } 34 | 35 | if (snap.hasError) { 36 | return const CenterError(); 37 | } 38 | 39 | return const CenterLoader(msg: 'Each pixel with unique perks..'); 40 | }, 41 | ); 42 | }, 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/screens/trending.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:pixelperks/controller/preview_controller.dart'; 5 | import 'package:pixelperks/widget/center_error.dart'; 6 | import 'package:pixelperks/widget/center_loader.dart'; 7 | import 'package:pixelperks/widget/preview_grid.dart'; 8 | 9 | class Trending extends StatelessWidget { 10 | const Trending({super.key}); 11 | 12 | @override 13 | Widget build(context) { 14 | final PreviewController pc = Get.put(PreviewController()); 15 | 16 | return Obx( 17 | () { 18 | // state cached :') 19 | if (pc.server[Endpoint.trending]!.isNotEmpty) { 20 | return PreviewGrid(server: pc.server[Endpoint.trending]!); 21 | } 22 | 23 | return FutureBuilder( 24 | future: fetchInitial('trending'), 25 | builder: (ctx, snap) { 26 | if (snap.hasData) { 27 | Timer(const Duration(microseconds: 100), () { 28 | pc.addSateCache(snap.data!.images, Endpoint.trending); 29 | }); 30 | 31 | // return PreviewGrid(server: snap.data!.images); 32 | } 33 | 34 | if (snap.hasError) { 35 | return const CenterError(); 36 | } 37 | 38 | return const CenterLoader(msg: 'Each pixel with unique perks..'); 39 | }, 40 | ); 41 | }, 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at https://dart.dev/lints. 17 | # 18 | # Instead of disabling a lint rule for the entire project in the 19 | # section below, it can also be suppressed for a single line of code 20 | # or a specific dart file by using the `// ignore: name_of_lint` and 21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 22 | # producing the lint. 23 | rules: 24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 26 | 27 | # Additional information about this file can be found at 28 | # https://dart.dev/guides/language/analysis-options 29 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 4 | import 'package:flutter_native_splash/flutter_native_splash.dart'; 5 | import 'package:get/get.dart'; 6 | import 'package:hive_flutter/adapters.dart'; 7 | import 'package:pixelperks/Hive/hive_dark_mode.dart'; 8 | import 'package:pixelperks/Hive/hive_fav.dart'; 9 | import 'package:pixelperks/controller/theme_controller.dart'; 10 | import 'package:pixelperks/screens/landing.dart'; 11 | // import 'package:pixelperks/utils/splash_screen.dart'; 12 | 13 | void main() async { 14 | FlutterNativeSplash.preserve( 15 | widgetsBinding: WidgetsFlutterBinding.ensureInitialized(), 16 | ); 17 | await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); 18 | await Hive.initFlutter(); 19 | Hive.registerAdapter(HiveFavAdapter()); 20 | Hive.registerAdapter(HiveDarkModeAdapter()); 21 | await dotenv.load(fileName: '.env'); 22 | 23 | runApp( 24 | // const GetMaterialApp( 25 | const MyApp(), 26 | // ), 27 | ); 28 | } 29 | 30 | class MyApp extends StatelessWidget { 31 | const MyApp({super.key}); 32 | 33 | @override 34 | Widget build(context) { 35 | FlutterNativeSplash.remove(); 36 | final DarkModeController modeController = Get.put(DarkModeController()); 37 | 38 | return Obx( 39 | () => GetMaterialApp( 40 | title: 'Pixel Perks', 41 | debugShowCheckedModeBanner: false, 42 | theme: modeController.darkMode.value 43 | ? AppTheme.darkTheme 44 | : AppTheme.lightTheme, 45 | home: const Landing(), 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/utils/splash_screen.dart: -------------------------------------------------------------------------------- 1 | // hl5 design splash screen and take screenshot. 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class SplashScreen extends StatelessWidget { 6 | const SplashScreen({super.key}); 7 | 8 | @override 9 | Widget build(context) { 10 | return Container( 11 | height: double.infinity, 12 | width: double.infinity, 13 | decoration: const BoxDecoration( 14 | gradient: LinearGradient( 15 | begin: Alignment.topLeft, 16 | end: Alignment.bottomRight, 17 | colors: [ 18 | Color.fromARGB(255, 233, 252, 255), 19 | Color.fromARGB(255, 255, 255, 255), 20 | Color.fromARGB(255, 255, 236, 248), 21 | ], 22 | ), 23 | ), 24 | child: Stack( 25 | children: [ 26 | Center( 27 | child: Image.asset('assets/icon/foreground-black.png'), 28 | ), 29 | const SizedBox(height: 60), 30 | Positioned( 31 | bottom: 20, 32 | left: 0, 33 | right: 0, 34 | child: Center( 35 | child: Column( 36 | crossAxisAlignment: CrossAxisAlignment.start, 37 | children: [ 38 | Text( 39 | 'Power by', 40 | style: Theme.of(context) 41 | .textTheme 42 | .titleMedium! 43 | .copyWith(color: Colors.black), 44 | ), 45 | Image.asset('assets/images/pixabay-black.png'), 46 | ], 47 | ), 48 | ), 49 | ) 50 | ], 51 | ), 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.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: "12fccda598477eddd19f93040a1dba24f915b9be" 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: 12fccda598477eddd19f93040a1dba24f915b9be 17 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 18 | - platform: android 19 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 20 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 21 | - platform: ios 22 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 23 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 24 | - platform: linux 25 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 26 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 27 | - platform: macos 28 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 29 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 30 | - platform: web 31 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 32 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 33 | - platform: windows 34 | create_revision: 12fccda598477eddd19f93040a1dba24f915b9be 35 | base_revision: 12fccda598477eddd19f93040a1dba24f915b9be 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /lib/widget/bouncable.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class WidgetBounce extends StatefulWidget { 4 | const WidgetBounce({ 5 | super.key, 6 | required this.child, 7 | required this.isAnimating, 8 | this.onEnd, 9 | required this.duration, 10 | this.alwaysAnimated = false, 11 | }); 12 | 13 | final Widget child; 14 | final bool isAnimating; 15 | final Duration duration; 16 | final void Function()? onEnd; 17 | final bool alwaysAnimated; 18 | 19 | @override 20 | State createState() => _WidgetBounceState(); 21 | } 22 | 23 | class _WidgetBounceState extends State 24 | with SingleTickerProviderStateMixin { 25 | late AnimationController _ac; 26 | late Animation scale; 27 | 28 | @override 29 | void initState() { 30 | _ac = AnimationController( 31 | vsync: this, 32 | duration: Duration( 33 | milliseconds: widget.duration.inMilliseconds ~/ 2, 34 | ), 35 | ); 36 | 37 | super.initState(); 38 | } 39 | 40 | @override 41 | void didUpdateWidget(covariant WidgetBounce oldWidget) { 42 | if (widget.isAnimating != oldWidget.isAnimating) { 43 | if (widget.isAnimating || widget.alwaysAnimated) { 44 | doAnimation(); 45 | } 46 | } 47 | super.didUpdateWidget(oldWidget); 48 | } 49 | 50 | Future doAnimation() async { 51 | await _ac.forward(); 52 | await _ac.reverse(); 53 | await Future.delayed(const Duration(milliseconds: 200)); 54 | 55 | if (widget.onEnd != null) { 56 | widget.onEnd!(); 57 | } 58 | } 59 | 60 | @override 61 | void dispose() { 62 | _ac.dispose(); 63 | super.dispose(); 64 | } 65 | 66 | @override 67 | Widget build(context) { 68 | return ScaleTransition( 69 | scale: Tween(begin: 1, end: 1.5).animate(_ac), 70 | child: widget.child, 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Pixelperks 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | pixelperks 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 | UIStatusBarHidden 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | pixelperks 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | id "dev.flutter.flutter-gradle-plugin" 5 | } 6 | 7 | def localProperties = new Properties() 8 | def localPropertiesFile = rootProject.file('local.properties') 9 | if (localPropertiesFile.exists()) { 10 | localPropertiesFile.withReader('UTF-8') { reader -> 11 | localProperties.load(reader) 12 | } 13 | } 14 | 15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 16 | if (flutterVersionCode == null) { 17 | flutterVersionCode = '1' 18 | } 19 | 20 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 21 | if (flutterVersionName == null) { 22 | flutterVersionName = '1.0' 23 | } 24 | 25 | android { 26 | namespace "com.pixelperks.android" 27 | compileSdkVersion 33 28 | ndkVersion flutter.ndkVersion 29 | 30 | compileOptions { 31 | sourceCompatibility JavaVersion.VERSION_1_8 32 | targetCompatibility JavaVersion.VERSION_1_8 33 | } 34 | 35 | kotlinOptions { 36 | jvmTarget = '1.8' 37 | } 38 | 39 | sourceSets { 40 | main.java.srcDirs += 'src/main/kotlin' 41 | } 42 | 43 | defaultConfig { 44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 45 | applicationId "com.pixelperks.android" 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 31 50 | versionCode flutterVersionCode.toInteger() 51 | versionName flutterVersionName 52 | } 53 | 54 | buildTypes { 55 | release { 56 | // TODO: Add your own signing config for the release build. 57 | // Signing with the debug keys for now, so `flutter run --release` works. 58 | signingConfig signingConfigs.debug 59 | } 60 | } 61 | } 62 | 63 | flutter { 64 | source '../..' 65 | } 66 | 67 | dependencies {} 68 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 21 | 25 | 29 | 30 | 31 | 32 | 33 | 34 | 36 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /lib/controller/favorite_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:hive_flutter/adapters.dart'; 3 | import 'package:pixelperks/Hive/hive_fav.dart'; 4 | import 'package:pixelperks/model/preview.dart'; 5 | 6 | const _boxName = 'HiveFavBox'; 7 | 8 | class FavoriteController extends GetxController { 9 | RxSet favList = {}.obs; 10 | RxBool isAnimate = false.obs; 11 | 12 | @override 13 | void onInit() async { 14 | final box = await Hive.openBox(_boxName); 15 | final data = box.values.toList(); 16 | 17 | if (data.isNotEmpty) { 18 | for (final elm in data) { 19 | favList.add(PreviewImage( 20 | id: elm.id, web340: elm.web340, fromSafeSource: elm.isSafe)); 21 | } 22 | } 23 | 24 | await box.close(); 25 | super.onInit(); 26 | } 27 | 28 | Future addImageToFav({ 29 | required int id, 30 | required String web340, 31 | required bool isSafe, 32 | }) async { 33 | final ack = favList.add(PreviewImage( 34 | id: id, 35 | web340: web340, 36 | fromSafeSource: isSafe, 37 | )); 38 | 39 | if (ack) { 40 | final box = await Hive.openBox(_boxName); 41 | await box.put( 42 | '$id', 43 | HiveFav( 44 | id: id, 45 | web340: web340, 46 | isSafe: isSafe, 47 | ), 48 | ); 49 | await box.close(); 50 | } 51 | } 52 | 53 | Future removeImageFromFav(int id) async { 54 | final elm = favList.where((element) => element.id == id).toList(); 55 | final ack = favList.remove(elm[0]); 56 | 57 | if (ack) { 58 | final box = await Hive.openBox(_boxName); 59 | await box.delete('$id'); 60 | await box.close(); 61 | } 62 | } 63 | 64 | bool alreadyFavorite(int id) { 65 | final fav = favList.where((elm) => elm.id == id).toList(); 66 | 67 | return fav.isNotEmpty; 68 | } 69 | 70 | Future clearFavList() async { 71 | final box = await Hive.openBox(_boxName); 72 | final data = box.values.toList(); 73 | 74 | if (data.isNotEmpty) { 75 | await box.clear(); 76 | } 77 | 78 | await box.close(); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/screens/categorized.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:pixelperks/controller/preview_controller.dart'; 5 | import 'package:pixelperks/widget/center_error.dart'; 6 | import 'package:pixelperks/widget/center_loader.dart'; 7 | import 'package:pixelperks/widget/preview_grid.dart'; 8 | import 'package:pixelperks/model/category_item.dart'; 9 | 10 | class Categorized extends StatelessWidget { 11 | const Categorized({super.key, required this.item}); 12 | final CategoryItem item; 13 | 14 | @override 15 | Widget build(context) { 16 | final PreviewController pc = Get.put(PreviewController()); 17 | 18 | return Scaffold( 19 | appBar: AppBar( 20 | title: Text( 21 | item.title, 22 | style: Theme.of(context).textTheme.headlineSmall, 23 | ), 24 | centerTitle: true, 25 | ), 26 | body: Scrollbar( 27 | child: Padding( 28 | padding: const EdgeInsets.all(8.0), 29 | child: Obx( 30 | () { 31 | // state cached :') 32 | if (pc.server[item.endpoint]!.isNotEmpty) { 33 | return PreviewGrid( 34 | server: pc.server[item.endpoint]!, 35 | isSafe: item.isSafe, 36 | ); 37 | } 38 | 39 | return FutureBuilder( 40 | future: fetchCategorized( 41 | category: item.category, 42 | isSafe: item.isSafe, 43 | ), 44 | builder: (ctx, snap) { 45 | if (snap.hasData) { 46 | Timer(const Duration(microseconds: 100), () { 47 | pc.addSateCache(snap.data!.images, item.endpoint); 48 | }); 49 | 50 | // return PreviewGrid(server: snap.data!.images); 51 | } 52 | 53 | if (snap.hasError) { 54 | return const CenterError(); 55 | } 56 | 57 | return const CenterLoader( 58 | msg: 'Each pixel with unique perks..'); 59 | }, 60 | ); 61 | }, 62 | ), 63 | ), 64 | ), 65 | ); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: pixelperks 2 | description: A new Flutter project. 3 | # The following line prevents the package from being accidentally published to 4 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 5 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 6 | 7 | 8 | version: 1.3.1+1 9 | 10 | environment: 11 | sdk: '>=3.1.2 <4.0.0' 12 | 13 | dependencies: 14 | flutter: 15 | sdk: flutter 16 | 17 | cupertino_icons: ^1.0.2 18 | get: ^4.6.6 19 | dio: ^5.3.3 20 | google_fonts: ^6.1.0 21 | flutter_staggered_grid_view: ^0.7.0 22 | flutter_dotenv: ^5.1.0 23 | cached_network_image: ^3.3.0 24 | flutter_wallpaper_manager: ^0.0.4 25 | flutter_native_splash: ^2.3.2 26 | eva_icons_flutter: ^3.1.0 27 | animated_text_kit: ^4.2.2 28 | circular_menu: ^2.0.1 29 | hive: ^2.2.3 30 | hive_flutter: ^1.1.0 31 | path_provider: ^2.1.1 32 | permission_handler: ^11.0.0 33 | flutter_cache_manager: ^3.3.1 34 | url_launcher: ^6.1.14 35 | device_info_plus: ^9.0.3 36 | share_plus: ^7.1.0 37 | liquid_pull_to_refresh: ^3.0.1 38 | curved_navigation_bar: ^1.0.3 39 | 40 | 41 | dev_dependencies: 42 | flutter_test: 43 | sdk: flutter 44 | 45 | flutter_lints: ^2.0.0 46 | pretty_dio_logger: ^1.3.1 47 | change_app_package_name: ^1.1.0 48 | flutter_launcher_icons: ^0.13.1 49 | hive_generator: ^2.0.1 50 | build_runner: ^2.4.6 51 | 52 | 53 | flutter_launcher_icons: 54 | android: true 55 | image_path: "assets/icon/icon.png" 56 | min_sdk_android: 21 57 | adaptive_icon_background: "assets/icon/background.png" 58 | adaptive_icon_foreground: "/assets/icon/foreground-white.png" 59 | 60 | flutter_native_splash: 61 | background_image: "assets/icon/splash-light.png" 62 | background_image_dark: "assets/icon/splash-dark.png" 63 | android: true 64 | ios: false 65 | web: false 66 | 67 | flutter: 68 | 69 | # The following line ensures that the Material Icons font is 70 | # included with your application, so that you can use the icons in 71 | # the material Icons class. 72 | uses-material-design: true 73 | 74 | fonts: 75 | - family: PixelifySans 76 | fonts: 77 | - asset: assets/fonts/PixelifySans-Regular.ttf 78 | 79 | # To add assets to your application, add an assets section, like this: 80 | assets: 81 | - assets/icon/ 82 | - assets/images/ 83 | - assets/images/thumbs/ 84 | - .env 85 | 86 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/screens/choice.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:pixelperks/controller/safe_content_controller.dart'; 4 | import 'package:pixelperks/model/category_item.dart'; 5 | import 'package:pixelperks/screens/categorized.dart'; 6 | 7 | class Choice extends StatelessWidget { 8 | const Choice({super.key}); 9 | 10 | @override 11 | Widget build(context) { 12 | final textTheme = Theme.of(context).textTheme; 13 | 14 | SafeContentController scc = Get.put(SafeContentController()); 15 | 16 | return Scaffold( 17 | appBar: AppBar( 18 | title: Text( 19 | 'Categories', 20 | style: textTheme.headlineSmall, 21 | ), 22 | centerTitle: true, 23 | ), 24 | body: Padding( 25 | padding: const EdgeInsets.all(8), 26 | child: Obx( 27 | () => GridView( 28 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 29 | crossAxisCount: 3, 30 | ), 31 | scrollDirection: Axis.horizontal, 32 | children: [ 33 | for (final elm 34 | in scc.safeContent.value ? safeCategoryItem : categoryItems) 35 | InkWell( 36 | onTap: () => Navigator.push( 37 | context, 38 | MaterialPageRoute( 39 | builder: (_) => Categorized(item: elm), 40 | ), 41 | ), 42 | child: Container( 43 | padding: const EdgeInsets.all(8), 44 | margin: const EdgeInsets.all(4), 45 | child: Stack( 46 | children: [ 47 | ClipRRect( 48 | borderRadius: BorderRadius.circular(16), 49 | child: Image.asset( 50 | 'assets/images/thumbs/${elm.title}.jpg', 51 | height: double.infinity, 52 | width: double.infinity, 53 | fit: BoxFit.cover, 54 | ), 55 | ), 56 | Center( 57 | child: Text( 58 | elm.title, 59 | style: textTheme.headlineMedium!.copyWith( 60 | color: elm.isSafe 61 | ? Colors.white 62 | : const Color.fromARGB(255, 255, 0, 153), 63 | ), 64 | ), 65 | ), 66 | ], 67 | ), 68 | ), 69 | ), 70 | ], 71 | ), 72 | ), 73 | ), 74 | ); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /lib/controller/preview_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:pixelperks/model/preview.dart'; 5 | 6 | enum Endpoint { 7 | latest, 8 | ec, 9 | trending, 10 | animal, 11 | village, 12 | uhd, 13 | erotic, 14 | fantasy, 15 | mountains, 16 | flowers, 17 | lingerie, 18 | topless, 19 | ocean, 20 | photography, 21 | fields, 22 | forest, 23 | architecture, 24 | street, 25 | dark, 26 | rain, 27 | food, 28 | hiking, 29 | river, 30 | monochrome, 31 | nature, 32 | galaxy, 33 | love, 34 | } 35 | 36 | class PreviewController extends GetxController { 37 | RxMap> server = >{ 38 | Endpoint.latest: [], 39 | Endpoint.ec: [], 40 | Endpoint.trending: [], 41 | Endpoint.animal: [], 42 | Endpoint.village: [], 43 | Endpoint.uhd: [], 44 | Endpoint.lingerie: [], 45 | Endpoint.fantasy: [], 46 | Endpoint.flowers: [], 47 | Endpoint.mountains: [], 48 | Endpoint.topless: [], 49 | Endpoint.ocean: [], 50 | Endpoint.erotic: [], 51 | Endpoint.photography: [], 52 | Endpoint.fields: [], 53 | Endpoint.forest: [], 54 | Endpoint.architecture: [], 55 | Endpoint.street: [], 56 | Endpoint.dark: [], 57 | Endpoint.rain: [], 58 | Endpoint.food: [], 59 | Endpoint.hiking: [], 60 | Endpoint.river: [], 61 | Endpoint.monochrome: [], 62 | Endpoint.nature: [], 63 | Endpoint.galaxy: [], 64 | Endpoint.love: [], 65 | }.obs; 66 | 67 | void addSateCache(List images, Endpoint e) { 68 | server.value = {...server, e: images}; 69 | } 70 | } 71 | 72 | Future fetchInitial(String route) async { 73 | final dio = Dio(); 74 | 75 | try { 76 | final res = await dio.get( 77 | 'https://pixel-perks.vercel.app/$route', 78 | queryParameters: {"secret": dotenv.env['SECRET']}, 79 | ); 80 | return PreviewImageServer.fromJson(res.data, fromSafeSource: true); 81 | } catch (e) { 82 | // print(e); 83 | throw Exception('error'); 84 | } 85 | } 86 | 87 | Future fetchCategorized( 88 | {required String category, bool isSafe = true}) async { 89 | final dio = Dio(); 90 | 91 | try { 92 | final res = await dio.get( 93 | 'https://pixel-perks.vercel.app/categorized', 94 | queryParameters: { 95 | "secret": dotenv.env['SECRET'], 96 | "category": category, 97 | "isSafe": isSafe, 98 | }, 99 | ); 100 | return PreviewImageServer.fromJson(res.data, fromSafeSource: isSafe); 101 | } catch (e) { 102 | // print(e); 103 | throw Exception('error'); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /lib/screens/landing.dart: -------------------------------------------------------------------------------- 1 | import 'package:curved_navigation_bar/curved_navigation_bar.dart'; 2 | import 'package:eva_icons_flutter/eva_icons_flutter.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:pixelperks/controller/theme_controller.dart'; 6 | import 'package:pixelperks/screens/ec.dart'; 7 | import 'package:pixelperks/screens/latest.dart'; 8 | import 'package:pixelperks/screens/trending.dart'; 9 | import 'package:pixelperks/widget/landing_drawer.dart'; 10 | 11 | class Landing extends StatefulWidget { 12 | const Landing({super.key}); 13 | 14 | @override 15 | State createState() => _LandingState(); 16 | } 17 | 18 | class _LandingState extends State { 19 | String _pageTitle = 'Latest'; 20 | Widget _body = const Latest(); 21 | 22 | @override 23 | Widget build(context) { 24 | DarkModeController modeController = Get.put(DarkModeController()); 25 | 26 | return Scaffold( 27 | appBar: AppBar( 28 | title: Text( 29 | _pageTitle, 30 | style: Theme.of(context).textTheme.headlineSmall, 31 | ), 32 | centerTitle: true, 33 | leading: Builder( 34 | builder: (ctx) => IconButton( 35 | onPressed: () { 36 | Scaffold.of(ctx).openDrawer(); 37 | }, 38 | icon: Obx( 39 | () => Icon( 40 | EvaIcons.menuArrowOutline, 41 | size: 24, 42 | color: 43 | modeController.darkMode.value ? Colors.white : Colors.black, 44 | ), 45 | ), 46 | ), 47 | ), 48 | ), 49 | drawer: const LandingDrawer(), 50 | body: Scrollbar( 51 | child: Padding( 52 | padding: const EdgeInsets.only(top: 8, left: 8, right: 8, bottom: 10), 53 | child: ClipRRect( 54 | borderRadius: BorderRadius.circular(16), 55 | child: _body, 56 | ), 57 | ), 58 | ), 59 | bottomNavigationBar: Obx( 60 | () => CurvedNavigationBar( 61 | backgroundColor: 62 | modeController.darkMode.value ? Colors.black : Colors.grey[200]!, 63 | color: modeController.darkMode.value ? Colors.white12 : Colors.white, 64 | onTap: _changeScreen, 65 | height: 50, 66 | items: const [ 67 | Icon(EvaIcons.optionsOutline), 68 | Icon(EvaIcons.award), 69 | Icon(EvaIcons.trendingUp), 70 | ], 71 | ), 72 | ), 73 | ); 74 | } 75 | 76 | void _changeScreen(int index) { 77 | switch (index) { 78 | case 0: 79 | setState(() { 80 | _pageTitle = 'Latest'; 81 | _body = const Latest(); 82 | }); 83 | break; 84 | case 1: 85 | setState(() { 86 | _pageTitle = 'Editors Choice'; 87 | _body = const EditorsChoice(); 88 | }); 89 | break; 90 | case 2: 91 | setState(() { 92 | _pageTitle = 'Trending'; 93 | _body = const Trending(); 94 | }); 95 | break; 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 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 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /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/screens/favorites.dart: -------------------------------------------------------------------------------- 1 | import 'package:animated_text_kit/animated_text_kit.dart'; 2 | import 'package:eva_icons_flutter/eva_icons_flutter.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:pixelperks/controller/favorite_controller.dart'; 6 | import 'package:pixelperks/controller/safe_content_controller.dart'; 7 | import 'package:pixelperks/controller/theme_controller.dart'; 8 | import 'package:pixelperks/model/preview.dart'; 9 | import 'package:pixelperks/widget/preview_grid.dart'; 10 | 11 | class Favorites extends StatelessWidget { 12 | const Favorites({super.key}); 13 | 14 | @override 15 | Widget build(context) { 16 | FavoriteController fc = Get.put(FavoriteController()); 17 | DarkModeController modeController = Get.put(DarkModeController()); 18 | SafeContentController scc = Get.put(SafeContentController()); 19 | 20 | return Scaffold( 21 | appBar: AppBar( 22 | title: Text( 23 | 'Favorites ❤️', 24 | style: Theme.of(context).textTheme.headlineSmall, 25 | ), 26 | centerTitle: true, 27 | ), 28 | body: Scrollbar( 29 | child: Padding( 30 | padding: const EdgeInsets.all(8.0), 31 | child: Obx( 32 | () { 33 | final isDark = modeController.darkMode.value; 34 | late List server; 35 | 36 | if (scc.safeContent.value) { 37 | final list = fc.favList 38 | .where((element) => element.fromSafeSource == true) 39 | .toList(); 40 | server = list; 41 | } else { 42 | server = fc.favList.toList(); 43 | } 44 | 45 | if (server.isEmpty) { 46 | return Center( 47 | child: Column( 48 | mainAxisSize: MainAxisSize.max, 49 | mainAxisAlignment: MainAxisAlignment.center, 50 | children: [ 51 | Icon( 52 | EvaIcons.searchOutline, 53 | size: 40, 54 | color: isDark ? Colors.amber : Colors.teal, 55 | ), 56 | const SizedBox(height: 20), 57 | DefaultTextStyle( 58 | style: TextStyle( 59 | fontFamily: 'PixelifySans', 60 | color: isDark ? Colors.white : Colors.black, 61 | fontSize: 24, 62 | ), 63 | child: AnimatedTextKit( 64 | isRepeatingAnimation: false, 65 | animatedTexts: [ 66 | TypewriterAnimatedText( 67 | 'No images are added to favorite yet.', 68 | textAlign: TextAlign.center, 69 | ), 70 | TypewriterAnimatedText( 71 | 'Double tap on any image to add as favorite.', 72 | textAlign: TextAlign.center, 73 | ), 74 | ], 75 | ), 76 | ), 77 | ], 78 | ), 79 | ); 80 | } 81 | 82 | return PreviewGrid(server: server); 83 | }, 84 | ), 85 | ), 86 | ), 87 | ); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /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 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /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.example" "\0" 93 | VALUE "FileDescription", "pixelperks" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "pixelperks" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "pixelperks.exe" "\0" 98 | VALUE "ProductName", "pixelperks" "\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/widget/preview_grid.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:eva_icons_flutter/eva_icons_flutter.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; 7 | import 'package:get/get.dart'; 8 | import 'package:liquid_pull_to_refresh/liquid_pull_to_refresh.dart'; 9 | import 'package:pixelperks/controller/theme_controller.dart'; 10 | import 'package:pixelperks/model/preview.dart'; 11 | import 'package:pixelperks/screens/detailed.dart'; 12 | 13 | class PreviewGrid extends StatefulWidget { 14 | const PreviewGrid({ 15 | super.key, 16 | required this.server, 17 | this.isSafe = true, 18 | }); 19 | final List server; 20 | final bool isSafe; 21 | 22 | @override 23 | State createState() => _PreviewGridState(); 24 | } 25 | 26 | class _PreviewGridState extends State { 27 | late List server; 28 | 29 | @override 30 | void initState() { 31 | server = widget.server..shuffle(); 32 | super.initState(); 33 | } 34 | 35 | @override 36 | Widget build(context) { 37 | DarkModeController modeController = Get.put(DarkModeController()); 38 | 39 | return Obx( 40 | () => LiquidPullToRefresh( 41 | color: modeController.darkMode.value ? Colors.white12 : Colors.white38, 42 | backgroundColor: 43 | modeController.darkMode.value ? Colors.cyan : Colors.teal[200], 44 | onRefresh: _onRefresh, 45 | child: GridView.custom( 46 | gridDelegate: SliverQuiltedGridDelegate( 47 | crossAxisCount: 4, 48 | pattern: const [ 49 | QuiltedGridTile(4, 2), 50 | QuiltedGridTile(3, 2), 51 | QuiltedGridTile(4, 2), 52 | QuiltedGridTile(4, 2), 53 | ], 54 | crossAxisSpacing: 8, 55 | mainAxisSpacing: 8, 56 | repeatPattern: QuiltedGridRepeatPattern.inverted, 57 | ), 58 | childrenDelegate: SliverChildBuilderDelegate( 59 | (context, index) => ClipRRect( 60 | borderRadius: BorderRadius.circular(16), 61 | child: GestureDetector( 62 | onTap: () { 63 | Navigator.push( 64 | context, 65 | MaterialPageRoute( 66 | builder: (_) => Detailed( 67 | imageId: server[index].id, 68 | isSafe: widget.isSafe, 69 | ), 70 | ), 71 | ); 72 | }, 73 | child: CachedNetworkImage( 74 | imageUrl: server[index].web340, 75 | fit: BoxFit.cover, 76 | errorWidget: (context, url, error) => const Center( 77 | child: Icon( 78 | EvaIcons.alertCircleOutline, 79 | size: 32, 80 | color: Colors.red, 81 | ), 82 | ), 83 | placeholder: (context, url) => Center( 84 | child: Icon( 85 | EvaIcons.bulbOutline, 86 | size: 32, 87 | color: modeController.darkMode.value 88 | ? Colors.amber 89 | : Colors.teal, 90 | ), 91 | ), 92 | ), 93 | ), 94 | ), 95 | childCount: server.length, 96 | ), 97 | ), 98 | ), 99 | ); 100 | } 101 | 102 | Future _onRefresh() async { 103 | await Future.delayed(const Duration(seconds: 2), () { 104 | setState(() { 105 | server = [...server]..shuffle(); 106 | }); 107 | }); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/widget/detailed_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:eva_icons_flutter/eva_icons_flutter.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:pixelperks/controller/favorite_controller.dart'; 6 | import 'package:pixelperks/model/full.dart'; 7 | import 'package:pixelperks/widget/bouncable.dart'; 8 | 9 | class DetailedView extends StatelessWidget { 10 | const DetailedView({ 11 | super.key, 12 | required this.details, 13 | required this.isDarkMode, 14 | required this.isSafe, 15 | }); 16 | final FullImage details; 17 | final bool isDarkMode, isSafe; 18 | 19 | @override 20 | Widget build(context) { 21 | FavoriteController fc = Get.put(FavoriteController()); 22 | 23 | return Obx( 24 | () { 25 | final alreadyFavorite = fc.alreadyFavorite(details.id); 26 | final isAnimated = fc.isAnimate.value; 27 | 28 | return GestureDetector( 29 | onDoubleTap: () { 30 | if (!alreadyFavorite) { 31 | fc.addImageToFav( 32 | id: details.id, 33 | web340: details.web340, 34 | isSafe: isSafe, 35 | ); 36 | } 37 | fc.isAnimate.value = true; 38 | }, 39 | child: Stack( 40 | alignment: Alignment.center, 41 | children: [ 42 | CachedNetworkImage( 43 | imageUrl: details.image, 44 | fit: BoxFit.cover, 45 | height: double.infinity, 46 | width: double.infinity, 47 | errorWidget: (context, url, error) => const Icon( 48 | EvaIcons.alertCircleOutline, 49 | size: 32, 50 | color: Colors.red, 51 | ), 52 | placeholder: (context, url) => Icon( 53 | EvaIcons.bulbOutline, 54 | size: 32, 55 | color: isDarkMode ? Colors.amber : Colors.teal, 56 | ), 57 | ), 58 | Opacity( 59 | opacity: isAnimated ? 1 : 0, 60 | child: WidgetBounce( 61 | isAnimating: isAnimated, 62 | duration: const Duration(milliseconds: 400), 63 | onEnd: () { 64 | fc.isAnimate.value = false; 65 | }, 66 | child: const Icon( 67 | EvaIcons.heart, 68 | color: Color.fromARGB(255, 255, 10, 10), 69 | size: 110, 70 | ), 71 | ), 72 | ), 73 | Positioned( 74 | top: 40, 75 | right: 12, 76 | child: WidgetBounce( 77 | isAnimating: alreadyFavorite, 78 | alwaysAnimated: true, 79 | duration: const Duration(milliseconds: 200), 80 | child: IconButton( 81 | onPressed: () async { 82 | if (alreadyFavorite) { 83 | fc.removeImageFromFav(details.id); 84 | } else { 85 | fc.addImageToFav( 86 | id: details.id, 87 | web340: details.web340, 88 | isSafe: isSafe, 89 | ); 90 | fc.isAnimate.value = true; 91 | } 92 | }, 93 | icon: Icon( 94 | alreadyFavorite ? EvaIcons.heart : EvaIcons.heartOutline, 95 | color: const Color.fromARGB(255, 255, 10, 10), 96 | size: 32, 97 | ), 98 | ), 99 | ), 100 | ) 101 | ], 102 | ), 103 | ); 104 | }, 105 | ); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/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 | -------------------------------------------------------------------------------- /lib/screens/downloaded.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; 5 | import 'package:pixelperks/screens/detailed.dart'; 6 | import 'package:pixelperks/utils/screen_operation.dart'; 7 | import 'package:pixelperks/widget/center_error.dart'; 8 | import 'package:pixelperks/widget/center_loader.dart'; 9 | 10 | final screenOperation = ScreenOperation(); 11 | Future> alreadyDownloaded() async { 12 | final permission = await screenOperation.handleStoragePermission(); 13 | 14 | if (permission) { 15 | final exists = 16 | Directory('/storage/emulated/0/Pictures/PixelPerks').existsSync(); 17 | 18 | if (exists) { 19 | return Directory('/storage/emulated/0/Pictures/PixelPerks').listSync(); 20 | } 21 | } 22 | 23 | return []; 24 | } 25 | 26 | class Downloaded extends StatelessWidget { 27 | const Downloaded({super.key}); 28 | 29 | @override 30 | Widget build(context) { 31 | return Scaffold( 32 | appBar: AppBar( 33 | title: Text( 34 | 'Downloaded', 35 | style: Theme.of(context).textTheme.headlineSmall, 36 | ), 37 | centerTitle: true, 38 | ), 39 | body: Scrollbar( 40 | child: Padding( 41 | padding: const EdgeInsets.all(8.0), 42 | child: FutureBuilder( 43 | future: alreadyDownloaded(), 44 | builder: (ctx, snap) { 45 | if (snap.hasError) { 46 | return const CenterError(); 47 | } 48 | 49 | if (snap.hasData) { 50 | final data = snap.data; 51 | 52 | if (data!.isEmpty) { 53 | return const CenterError.custom( 54 | error: 'Nothing found at app directory.', 55 | ); 56 | } 57 | 58 | return GridView.custom( 59 | gridDelegate: SliverQuiltedGridDelegate( 60 | crossAxisCount: 4, 61 | pattern: const [ 62 | QuiltedGridTile(4, 2), 63 | QuiltedGridTile(3, 2), 64 | QuiltedGridTile(4, 2), 65 | QuiltedGridTile(4, 2), 66 | ], 67 | crossAxisSpacing: 8, 68 | mainAxisSpacing: 8, 69 | repeatPattern: QuiltedGridRepeatPattern.inverted, 70 | ), 71 | childrenDelegate: SliverChildBuilderDelegate( 72 | (context, index) { 73 | final file = File(data[index].path); 74 | final fileName = file.path.split('/').last; 75 | final imgId = fileName.split('.').first; 76 | 77 | return GestureDetector( 78 | onTap: () { 79 | Navigator.push( 80 | context, 81 | MaterialPageRoute( 82 | builder: (_) => Detailed( 83 | imageId: int.parse(imgId), 84 | isSafe: false, 85 | ), 86 | ), 87 | ); 88 | }, 89 | child: ClipRRect( 90 | borderRadius: BorderRadius.circular(16), 91 | child: Image.file( 92 | file, 93 | fit: BoxFit.cover, 94 | ), 95 | ), 96 | ); 97 | }, 98 | childCount: data.length, 99 | ), 100 | ); 101 | } 102 | 103 | return const CenterLoader(msg: 'Reading directory ...'); 104 | }, 105 | ), 106 | ), 107 | ), 108 | ); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /lib/controller/theme_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/scheduler.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:google_fonts/google_fonts.dart'; 5 | import 'package:hive/hive.dart'; 6 | import 'package:pixelperks/Hive/hive_dark_mode.dart'; 7 | 8 | abstract class AppTheme { 9 | static final appFont = GoogleFonts.itimTextTheme(); 10 | 11 | static final ThemeData lightTheme = ThemeData().copyWith( 12 | colorScheme: ColorScheme.fromSeed( 13 | seedColor: const Color.fromARGB(255, 233, 213, 255), 14 | brightness: Brightness.light, 15 | ), 16 | textTheme: appFont.apply( 17 | displayColor: Colors.black, 18 | bodyColor: Colors.black, 19 | ), 20 | useMaterial3: true, 21 | appBarTheme: const AppBarTheme().copyWith( 22 | elevation: 0, 23 | scrolledUnderElevation: 0, 24 | color: Colors.transparent, 25 | ), 26 | scaffoldBackgroundColor: Colors.grey[200], 27 | bottomNavigationBarTheme: const BottomNavigationBarThemeData().copyWith( 28 | backgroundColor: const Color.fromARGB(255, 245, 245, 245), 29 | elevation: 0, 30 | selectedItemColor: Colors.teal, 31 | ), 32 | iconTheme: const IconThemeData( 33 | color: Colors.teal, 34 | ), 35 | progressIndicatorTheme: const ProgressIndicatorThemeData().copyWith( 36 | color: Colors.teal, 37 | ), 38 | scrollbarTheme: const ScrollbarThemeData().copyWith( 39 | radius: const Radius.circular(16), 40 | thumbColor: const MaterialStatePropertyAll(Colors.black38), 41 | ), 42 | ); 43 | 44 | static final darkTheme = ThemeData.dark().copyWith( 45 | colorScheme: ColorScheme.fromSeed( 46 | seedColor: const Color.fromARGB(255, 91, 33, 182), 47 | brightness: Brightness.dark, 48 | ), 49 | textTheme: appFont.apply( 50 | displayColor: Colors.white, 51 | bodyColor: Colors.white, 52 | ), 53 | useMaterial3: true, 54 | appBarTheme: const AppBarTheme().copyWith( 55 | elevation: 0, 56 | scrolledUnderElevation: 0, 57 | backgroundColor: Colors.transparent, 58 | ), 59 | scaffoldBackgroundColor: Colors.black, 60 | drawerTheme: const DrawerThemeData().copyWith( 61 | backgroundColor: const Color.fromARGB(255, 9, 9, 9), 62 | ), 63 | bottomNavigationBarTheme: const BottomNavigationBarThemeData().copyWith( 64 | backgroundColor: const Color.fromARGB(255, 10, 10, 10), 65 | elevation: 0, 66 | selectedItemColor: Colors.cyan, 67 | ), 68 | iconTheme: const IconThemeData( 69 | color: Color.fromARGB(255, 34, 211, 238), 70 | ), 71 | dialogTheme: const DialogTheme().copyWith( 72 | backgroundColor: const Color.fromARGB(255, 20, 20, 20), 73 | ), 74 | progressIndicatorTheme: const ProgressIndicatorThemeData().copyWith( 75 | color: const Color.fromARGB(255, 34, 211, 238), 76 | ), 77 | scrollbarTheme: const ScrollbarThemeData().copyWith( 78 | radius: const Radius.circular(16), 79 | thumbColor: const MaterialStatePropertyAll(Colors.white30), 80 | ), 81 | ); 82 | } 83 | 84 | const _boxName = "DarkModeBox"; 85 | const _boxId = "DmId"; 86 | 87 | class DarkModeController extends GetxController { 88 | RxBool darkMode = true.obs; 89 | 90 | @override 91 | void onInit() async { 92 | final box = await Hive.openBox(_boxName); 93 | final system = 94 | SchedulerBinding.instance.platformDispatcher.platformBrightness == 95 | Brightness.dark 96 | ? true 97 | : false; 98 | if (box.isEmpty) { 99 | darkMode.value = system; 100 | } else { 101 | darkMode.value = box.get(_boxId)?.isDarkMode ?? system; 102 | } 103 | 104 | super.onInit(); 105 | } 106 | 107 | Future toggleDarkMode() async { 108 | darkMode.value = !darkMode.value; 109 | final box = await Hive.openBox(_boxName); 110 | box.put(_boxId, HiveDarkMode(isDarkMode: darkMode.value)); 111 | box.close(); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /lib/model/category_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:pixelperks/controller/preview_controller.dart'; 2 | 3 | class CategoryItem { 4 | const CategoryItem({ 5 | required this.isSafe, 6 | required this.category, 7 | required this.endpoint, 8 | required this.title, 9 | }); 10 | 11 | final String title, category; 12 | final Endpoint endpoint; 13 | final bool isSafe; 14 | } 15 | 16 | const List categoryItems = [ 17 | CategoryItem( 18 | isSafe: true, 19 | category: '4k', 20 | endpoint: Endpoint.uhd, 21 | title: '4k', 22 | ), 23 | CategoryItem( 24 | isSafe: true, 25 | category: 'architecture', 26 | endpoint: Endpoint.architecture, 27 | title: 'Architecture', 28 | ), 29 | CategoryItem( 30 | isSafe: true, 31 | category: 'dark', 32 | endpoint: Endpoint.dark, 33 | title: 'Dark', 34 | ), 35 | CategoryItem( 36 | isSafe: false, 37 | category: 'naked nude', 38 | endpoint: Endpoint.erotic, 39 | title: 'Erotic', 40 | ), 41 | CategoryItem( 42 | isSafe: true, 43 | category: 'fantasy landscape', 44 | endpoint: Endpoint.fantasy, 45 | title: 'Fantasy', 46 | ), 47 | CategoryItem( 48 | isSafe: true, 49 | category: 'fields', 50 | endpoint: Endpoint.fields, 51 | title: 'Fields', 52 | ), 53 | CategoryItem( 54 | isSafe: true, 55 | category: 'flowers', 56 | endpoint: Endpoint.flowers, 57 | title: 'Flowers', 58 | ), 59 | CategoryItem( 60 | isSafe: true, 61 | category: 'food', 62 | endpoint: Endpoint.food, 63 | title: 'Foods', 64 | ), 65 | CategoryItem( 66 | isSafe: true, 67 | category: 'forest', 68 | endpoint: Endpoint.forest, 69 | title: 'Forest', 70 | ), 71 | CategoryItem( 72 | isSafe: true, 73 | category: 'milky way', 74 | endpoint: Endpoint.galaxy, 75 | title: 'Galaxy', 76 | ), 77 | CategoryItem( 78 | isSafe: true, 79 | category: 'hiking', 80 | endpoint: Endpoint.uhd, 81 | title: 'Hiking', 82 | ), 83 | CategoryItem( 84 | isSafe: false, 85 | category: 'lingerie', 86 | endpoint: Endpoint.lingerie, 87 | title: 'Lingerie', 88 | ), 89 | CategoryItem( 90 | isSafe: true, 91 | category: 'love couple', 92 | endpoint: Endpoint.love, 93 | title: 'Love', 94 | ), 95 | CategoryItem( 96 | isSafe: false, 97 | category: 'monochrome', 98 | endpoint: Endpoint.monochrome, 99 | title: 'Monochrome', 100 | ), 101 | CategoryItem( 102 | isSafe: true, 103 | category: 'mountains', 104 | endpoint: Endpoint.mountains, 105 | title: 'Mountains', 106 | ), 107 | CategoryItem( 108 | isSafe: true, 109 | category: 'landscape', 110 | endpoint: Endpoint.nature, 111 | title: 'Nature', 112 | ), 113 | CategoryItem( 114 | isSafe: true, 115 | category: 'ocean waves', 116 | endpoint: Endpoint.ocean, 117 | title: 'Ocean', 118 | ), 119 | CategoryItem( 120 | category: 'pets', 121 | isSafe: true, 122 | endpoint: Endpoint.animal, 123 | title: 'Pets', 124 | ), 125 | CategoryItem( 126 | isSafe: true, 127 | category: 'photography', 128 | endpoint: Endpoint.photography, 129 | title: 'Portrait', 130 | ), 131 | CategoryItem( 132 | isSafe: true, 133 | category: 'rain', 134 | endpoint: Endpoint.rain, 135 | title: 'Rain', 136 | ), 137 | CategoryItem( 138 | isSafe: true, 139 | category: 'river', 140 | endpoint: Endpoint.river, 141 | title: 'River', 142 | ), 143 | CategoryItem( 144 | isSafe: true, 145 | category: 'street', 146 | endpoint: Endpoint.street, 147 | title: 'Street', 148 | ), 149 | CategoryItem( 150 | isSafe: false, 151 | category: 'Topless', 152 | endpoint: Endpoint.topless, 153 | title: 'Topless', 154 | ), 155 | CategoryItem( 156 | isSafe: true, 157 | category: 'village', 158 | endpoint: Endpoint.village, 159 | title: 'Village', 160 | ), 161 | ]; 162 | 163 | final safeCategoryItem = 164 | categoryItems.where((element) => element.isSafe == true).toList(); 165 | -------------------------------------------------------------------------------- /lib/utils/screen_operation.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:device_info_plus/device_info_plus.dart'; 4 | import 'package:dio/dio.dart'; 5 | import 'package:eva_icons_flutter/eva_icons_flutter.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter_cache_manager/flutter_cache_manager.dart'; 8 | import 'package:flutter_wallpaper_manager/flutter_wallpaper_manager.dart'; 9 | import 'package:permission_handler/permission_handler.dart'; 10 | import 'package:pixelperks/utils/get_smack.dart'; 11 | 12 | class ScreenOperation { 13 | final _dio = Dio(); 14 | 15 | Future handleStoragePermission() async { 16 | AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo; 17 | final version = int.parse(androidInfo.version.release) >= 11; 18 | 19 | // managing the permission depends on android 11 or later. 20 | final permission = 21 | version ? Permission.manageExternalStorage : Permission.storage; 22 | 23 | if (await permission.isGranted) { 24 | return true; 25 | } else { 26 | GetSmack( 27 | title: 'Permission required.', 28 | body: 'Storage permission is needed to download images.', 29 | icon: Icons.error, 30 | ); 31 | 32 | if (await permission.isPermanentlyDenied) await openAppSettings(); 33 | if (await permission.isDenied) await permission.request(); 34 | 35 | return false; 36 | } 37 | } 38 | 39 | Future handelDownload( 40 | {required String imgId, required String url}) async { 41 | final response = await _dio.get( 42 | url, 43 | options: Options( 44 | responseType: ResponseType.bytes, 45 | followRedirects: false, 46 | ), 47 | ); 48 | 49 | try { 50 | final subDir = Directory( 51 | '/storage/emulated/0/Pictures/PixelPerks', 52 | ).existsSync() 53 | ? Directory( 54 | '/storage/emulated/0/Pictures/PixelPerks', 55 | ) 56 | : await Directory( 57 | '/storage/emulated/0/Pictures/PixelPerks', 58 | ).create(recursive: true); 59 | 60 | final File newFile = 61 | await File("${subDir.path}/$imgId.jpg").create(recursive: true); 62 | await newFile.writeAsBytes(response.data); 63 | GetSmack( 64 | title: 'Yeah!', 65 | body: 66 | 'A new perks is downloaded. Location: Internal storage/Pictures/PixelPerks/$imgId.jpg', 67 | icon: EvaIcons.download, 68 | ); 69 | } catch (e) { 70 | GetSmack( 71 | title: 'Oops!', 72 | body: 'Failed to download this perks.', 73 | icon: Icons.error, 74 | ); 75 | 76 | // debug only. 77 | // Get.to(() => MessageDebug(message: e.toString())); 78 | throw Exception(e); 79 | } 80 | } 81 | 82 | Future setAtHomeAndLockScreen({required String url}) async { 83 | final file = await DefaultCacheManager().getSingleFile(url); 84 | final res = await WallpaperManager.setWallpaperFromFile(file.path, 3); 85 | 86 | if (res) { 87 | GetSmack( 88 | title: 'Awesome!', 89 | body: 'A new Perks applied at your both home and lock screen.', 90 | icon: Icons.phone_android, 91 | ); 92 | } 93 | } 94 | 95 | Future setAtHomeScreen({required String url}) async { 96 | final file = await DefaultCacheManager().getSingleFile(url); 97 | 98 | final res = await WallpaperManager.setWallpaperFromFile(file.path, 1); 99 | if (res) { 100 | GetSmack( 101 | title: "Awesome!", 102 | body: 'A new Perks is applied at your home screen.', 103 | icon: Icons.home, 104 | ); 105 | } 106 | } 107 | 108 | Future setAtLockScreen({required String url}) async { 109 | final file = await DefaultCacheManager().getSingleFile(url); 110 | final res = await WallpaperManager.setWallpaperFromFile(file.path, 2); 111 | if (res) { 112 | GetSmack( 113 | title: "Awesome!", 114 | body: 'A new Perks is applied at your lock screen.', 115 | icon: Icons.screen_lock_portrait, 116 | ); 117 | } 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "pixelperks"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "pixelperks"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GObject::dispose. 85 | static void my_application_dispose(GObject* object) { 86 | MyApplication* self = MY_APPLICATION(object); 87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 89 | } 90 | 91 | static void my_application_class_init(MyApplicationClass* klass) { 92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 95 | } 96 | 97 | static void my_application_init(MyApplication* self) {} 98 | 99 | MyApplication* my_application_new() { 100 | return MY_APPLICATION(g_object_new(my_application_get_type(), 101 | "application-id", APPLICATION_ID, 102 | "flags", G_APPLICATION_NON_UNIQUE, 103 | nullptr)); 104 | } 105 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(pixelperks 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 "pixelperks") 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 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Pixel Perks - Contribution Guidelines 2 | Welcome to the Pixel Perks open-source project! We appreciate your interest in contributing to our app. Before you get started, please take a moment to review these contribution guidelines. 3 | 4 | 5 | ## 1. Getting Started ▶️ 6 | 7 | First things first, To contribute effectively to PixelPerks, you need to follow these steps. 8 | 9 | - Create a file called ```.env``` at the root of your project working directory. 10 | 11 | - Open the ```.env``` file and add the following variables like this, 12 | 13 | ``` 14 | SECRET="YOUR_PIXABAY_SECRET_KEY" 15 | EMAIL="YOUR_EMAIL_ID" 16 | ``` 17 | 18 | - You can obtain your Pixabay api key [from here](https://pixabay.com/api/docs/). May need to sign in if you don't have an account. 19 | 20 | - You may check the backend server [repository](https://github.com/Moinak-Majumdar/high-quality-image-server), made with express.js 21 | 22 | - Follow the api [documentation](https://github.com/Moinak-Majumdar/high-quality-image-server/blob/main/DOCS.md) for more information. 23 | 24 | ## 2. How to Contribute 25 | 26 | ### 🐛 Reporting Bugs 🐛 27 | 28 | If you encounter a bug while using ```Pixel Perks```, please help us by following these steps: 29 | 30 | 1. Check the [GitHub Issues](https://github.com/Moinak-Majumdar/PixelPerks/issues) to see if the issue has already been reported. If it has, you can add additional information or subscribe to receive updates. 31 | 32 | 2. If the issue is not yet reported, please [create a new issue](https://github.com/Moinak-Majumdar/PixelPerks/issues/new) with a clear and concise description of the problem. Include relevant details such as your operating system, device, and steps to reproduce the issue. 33 | 34 | ### 🆕 Suggesting Features 🆕 35 | 36 | You can also suggest new features or improvements by opening an issue in the repository. Please make sure this feature is not already suggested by others. If it is not please [create a new issue](https://github.com/Moinak-Majumdar/PixelPerks/issues/new) and clearly describe the new feature in your mind. Be sure to mention why you believe it would be valuable to other users. 37 | 38 | ### Pull Requests 39 | We welcome contributions from the community! To submit a pull request, follow these steps: 40 | 41 | 1. Fork the repository to your GitHub account. 42 | 2. Clone this repository in your local machine. 43 | ``` 44 | git clone YOUR-FORKED-REPOSITORY-URL 45 | ``` 46 | 2. Create a new branch for your changes. 47 | ``` 48 | git checkout -b new_feature/fix 49 | ``` 50 | 3. Make your changes, following the coding guidelines (see [Coding Guidelines](#coding-guidelines)). 51 | 4. Write tests for your code when applicable. 52 | 5. Commit your changes with short descriptive message. 53 | ``` 54 | git commit -m "Added new_feature or fix_issue #X: description of changes" 55 | ``` 56 | 6. Push the changes in your local repository 57 | ``` 58 | git push new_feature/fix 59 | ``` 60 | 7. Create a pull request (PR) to the ```main``` branch of Pixel Perks repository. In your PR, provide a detailed description of your changes, including the problem they solve and any new dependencies. 61 | 62 | 63 | ### Coding Guidelines 64 | 65 | At Pixel Perks, we believe that clean and well-structured code is essential for maintainability and collaboration. Here are some coding guidelines to keep in mind while contributing: 66 | 67 | - Use descriptive and meaningful names for variables and functions. Avoid single-letter variable names or overly cryptic abbreviations. Code readability is crucial. 68 | 69 | - Add comments when necessary to explain complex logic or non-obvious code behavior. Comments should provide context and help fellow developers understand your thought process. 70 | 71 | - **Through Testing** 72 | - Write unit tests for your code to ensure it behaves as expected and to prevent regressions. Test both normal and edge cases to cover a wide range of scenarios. 73 | - Perform integration tests to verify that different components of the app work together seamlessly. This is especially important when making changes that affect multiple parts of the app. 74 | - Before submitting your code, run the existing test suite to ensure that your changes do not break any existing features or functionality. 75 | 76 | 77 | By adhering to these coding guidelines, you'll contribute to a more maintainable and collaborative development environment for Pixel Perks. 78 | 79 | ## 3. License 80 | 81 | By contributing to Pixel Perks, you agree that your contributions will be licensed under the [Apache-2.0 license](/LICENSE) and remain ```open source``` for all. 82 | 83 | --- 84 | # Happy coding! 🚀 85 | 86 | Thank you for your interest in contributing to Pixel Perks! Your help is greatly appreciated, and together we can make Pixel Perks even better. If you have any questions or need assistance, feel free to reach out at moinak2000@gmail.com or visit 87 | 88 | --- 89 | 90 | -------------------------------------------------------------------------------- /lib/screens/settings.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_cache_manager/flutter_cache_manager.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:pixelperks/controller/favorite_controller.dart'; 5 | import 'package:pixelperks/controller/safe_content_controller.dart'; 6 | import 'package:pixelperks/controller/theme_controller.dart'; 7 | import 'package:pixelperks/utils/get_smack.dart'; 8 | 9 | class Settings extends StatelessWidget { 10 | const Settings({super.key}); 11 | 12 | @override 13 | Widget build(context) { 14 | final textTheme = Theme.of(context).textTheme; 15 | 16 | final DarkModeController modeController = Get.put(DarkModeController()); 17 | final SafeContentController scc = Get.put(SafeContentController()); 18 | final FavoriteController fc = Get.put(FavoriteController()); 19 | 20 | return Scaffold( 21 | appBar: AppBar( 22 | title: Text( 23 | 'Settings', 24 | style: textTheme.headlineSmall, 25 | ), 26 | ), 27 | body: Padding( 28 | padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), 29 | child: Column( 30 | mainAxisSize: MainAxisSize.max, 31 | mainAxisAlignment: MainAxisAlignment.start, 32 | children: [ 33 | Obx( 34 | () => SwitchListTile( 35 | value: modeController.darkMode.value, 36 | onChanged: (val) async { 37 | await modeController.toggleDarkMode(); 38 | }, 39 | title: Text( 40 | 'Dark Mode', 41 | style: textTheme.titleLarge, 42 | ), 43 | ), 44 | ), 45 | Obx( 46 | () => SwitchListTile( 47 | value: scc.safeContent.value, 48 | onChanged: (value) => scc.toggleSafeContent(value), 49 | title: Text( 50 | 'Safe Content', 51 | style: textTheme.titleLarge, 52 | ), 53 | subtitle: Text( 54 | scc.safeContent.value 55 | ? 'Block all age restricted categories and unsafe contents from favorites list' 56 | : 'Allow mature contents', 57 | style: textTheme.bodyMedium, 58 | ), 59 | ), 60 | ), 61 | const Divider(), 62 | ListTile( 63 | leading: const Icon( 64 | Icons.storage, 65 | size: 26, 66 | ), 67 | title: Text( 68 | 'Storage Location', 69 | style: textTheme.titleLarge, 70 | ), 71 | onTap: () { 72 | GetSmack( 73 | body: 74 | 'Downloaded images are saved to /storage/emulated/0/Pictures/PixelPerks', 75 | icon: Icons.storage, 76 | title: 'Storage Location', 77 | position: SnackPosition.BOTTOM, 78 | ); 79 | }, 80 | ), 81 | ListTile( 82 | leading: const Icon( 83 | Icons.refresh, 84 | size: 26, 85 | ), 86 | title: Text( 87 | 'Clear Cache', 88 | style: textTheme.titleLarge, 89 | ), 90 | onTap: () async { 91 | await fc.clearFavList(); 92 | DefaultCacheManager().emptyCache().then( 93 | (value) => GetSmack( 94 | body: 'PixelPerks cache is cleared.', 95 | icon: Icons.done, 96 | title: 'Cache Cleared', 97 | position: SnackPosition.BOTTOM, 98 | ), 99 | ); 100 | }, 101 | ), 102 | ListTile( 103 | leading: const Icon( 104 | Icons.android, 105 | size: 26, 106 | ), 107 | title: Text( 108 | 'Version', 109 | style: textTheme.titleLarge, 110 | ), 111 | subtitle: Text( 112 | '1.3.1', 113 | style: textTheme.bodyMedium, 114 | ), 115 | ), 116 | const Spacer(), 117 | Obx( 118 | () => Column( 119 | crossAxisAlignment: CrossAxisAlignment.start, 120 | children: [ 121 | Text( 122 | 'Power by', 123 | style: textTheme.titleMedium, 124 | ), 125 | Image.asset( 126 | modeController.darkMode.value 127 | ? 'assets/images/pixabay-white.png' 128 | : 'assets/images/pixabay-black.png', 129 | ), 130 | ], 131 | ), 132 | ), 133 | const SizedBox(height: 16) 134 | ], 135 | ), 136 | ), 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Screenshot 2023-10-08 003053](https://github.com/Moinak-Majumdar/PixelPerks/assets/99950805/3f8644ef-11ee-4aad-98b2-1446a7d855f2) 2 | 3 | # Pixel Perks 4 | 5 | Welcome to the ```Pixel Perks```, your go-to destination for stunning wallpapers powered by the ```Pixabay API```. This app combines the beauty of Flutter's sleek and responsive design with the vast library of high-quality images available on Pixabay, providing users with a seamless and visually appealing wallpaper experience. Whether you're looking to refresh your device's background or explore a world of captivating visuals, Pixel Perks has you covered. Explore, customize, and elevate your device's aesthetics with ease. Let's dive into a world of endless possibilities with the Pixel Perks! 6 | 7 | ### **Discover the Best Features of the Pixel Perks** 8 | 9 | 1. **Wide Selection of Wallpapers:** Explore an extensive collection of high-quality wallpapers sourced from Pixabay's vast database, ensuring you find the perfect backdrop for your device. 10 | 11 | 2. **20+ Categories:** Dive into a world of inspiration with over 20 carefully curated categories, making it easy to discover wallpapers tailored to your unique tastes. 12 | 13 | 3. **Unlimited Downloads:** Download an unlimited number of stunning images to personalize your device to your heart's content, without any restrictions. 14 | 15 | 4. **Favorite Wallpapers with Ease:** Simply double-tap on any image to mark it as a favorite. Create your personalized gallery of go-to backgrounds for quick and easy access. 16 | 17 | 5. **Light/Dark Theme:** Customize your app experience with the option to switch between light and dark themes, ensuring comfortable viewing in any lighting condition. 18 | 19 | 6. **Easy to Use:** Pixel Perks user-friendly interface ensures that browsing, searching, and setting wallpapers is a straightforward and enjoyable experience for users of all levels of expertise. 20 | 21 | 7. **Responsive UI:** Enjoy a seamless and responsive user interface that adapts to your device, providing an optimal viewing experience on screens of all sizes. 22 | 23 | 8. **Open Source:** Pixel Perks is open source, inviting developers and enthusiasts to contribute, modify, or enhance the app as part of the vibrant open-source community. 24 | 25 | Elevate your device's aesthetics and explore a world of beautiful wallpapers with the feature-rich Pixel Perks. 26 | 27 | ### 🆕 **Download the latest** 28 | 29 | [Download now](https://github.com/Moinak-Majumdar/PixelPerks/releases) 32 | 33 | ### **Future prospective** 34 | 1. Add more categories. 35 | 2. Directly search functionality. 36 | 37 | ### **License** 38 | Pixel Perks is released under ```Apache-2.0 License```, check [LICENSE](https://github.com/Moinak-Majumdar/PixelPerks/blob/main/LICENSE) for more details. 39 | 40 | ### ⚙️ **Project setup** ⚙️ 41 | 42 | Before starting to work with PixelPerks, you need to follow these steps. 43 | 44 | - Create a file called ```.env``` at the root of your project working directory. 45 | 46 | - Open the ```.env``` file and add the following variables like this, 47 | 48 | ``` 49 | SECRET="YOUR_PIXABAY_SECRET_KEY" 50 | EMAIL="YOUR_EMAIL_ID" 51 | ``` 52 | 53 | - You can obtain your Pixabay api key [from here](https://pixabay.com/api/docs/). May need to sign in if you don't have an account. 54 | 55 | - You may check the backend server [repository](https://github.com/Moinak-Majumdar/high-quality-image-server), made with express.js 56 | 57 | - Follow the api [documentation](https://github.com/Moinak-Majumdar/high-quality-image-server/blob/main/DOCS.md) for more information. 58 | 59 | 60 | ### 🎨 **Welcome to Pixel Perks - Unleash Your Creativity!** 🎨 61 | 62 | Are you passionate about Flutter and mobile app development? Do you have a flair for design, a knack for coding, or simply a love for beautiful wallpapers? Join us in shaping the future of mobile wallpapers with Pixel Perks, the open-source Flutter wallpaper app! 63 | 64 | **Why Contribute to Pixel Perks?** 65 | 66 | 👩‍💻**Flex Your Skills:** Whether you're a designer, developer, tester, or documenter, there's a place for you to shine in our project. 67 | 68 | 🤝 **Community Spirit:** Join a friendly, inclusive community of contributors who value your input and appreciate your efforts. 69 | 70 | 💡 **Learn and Grow:** Dive into the Flutter ecosystem, master mobile app development, and collaborate with a vibrant community of developers. Let's master Flutter together!! 👊 71 | 72 | Ready to leave your mark on the world of mobile wallpapers? Check out our [Contribution Guidelines](/CONTRIBUTION.md) to get started, and let's create ```Pixel Perks together!``` 73 | 74 | 🌟 Get Started Now by forking this repository. 75 | 76 | 77 | ## Screen Shots 📱 78 | ![pixelperks-2](https://github.com/Moinak-Majumdar/PixelPerks/assets/99950805/c734a279-397a-4f91-9b20-0b099ee4f7ed) 79 | ![pixelperks-3](https://github.com/Moinak-Majumdar/PixelPerks/assets/99950805/4d196730-4ab2-4aa4-8c33-510384d3b351) 80 | ![pixelperks-4](https://github.com/Moinak-Majumdar/PixelPerks/assets/99950805/7f91b439-bb0d-4b3b-a2bc-56749b2c7dba) 81 | ![pixelperks-5](https://github.com/Moinak-Majumdar/PixelPerks/assets/99950805/a5d4f5a7-5a65-472c-bf8c-40c4a7820b40) 82 | ![pixelperks-6](https://github.com/Moinak-Majumdar/PixelPerks/assets/99950805/bd265d34-6ac9-43b3-9674-2a193af8a32c) 83 | 84 | --- 85 | ## Don't forget to Leave a ⭐ 86 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | . 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.10) 3 | project(runner 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 "pixelperks") 8 | # The unique GTK application identifier for this application. See: 9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID 10 | set(APPLICATION_ID "com.example.pixelperks") 11 | 12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 13 | # versions of CMake. 14 | cmake_policy(SET CMP0063 NEW) 15 | 16 | # Load bundled libraries from the lib/ directory relative to the binary. 17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 18 | 19 | # Root filesystem for cross-building. 20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT) 21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) 22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) 23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 27 | endif() 28 | 29 | # Define build configuration options. 30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 31 | set(CMAKE_BUILD_TYPE "Debug" CACHE 32 | STRING "Flutter build mode" FORCE) 33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 34 | "Debug" "Profile" "Release") 35 | endif() 36 | 37 | # Compilation settings that should be applied to most targets. 38 | # 39 | # Be cautious about adding new options here, as plugins use this function by 40 | # default. In most cases, you should add new options to specific targets instead 41 | # of modifying this function. 42 | function(APPLY_STANDARD_SETTINGS TARGET) 43 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 47 | endfunction() 48 | 49 | # Flutter library and tool build rules. 50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 51 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 52 | 53 | # System-level dependencies. 54 | find_package(PkgConfig REQUIRED) 55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 56 | 57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 58 | 59 | # Define the application target. To change its name, change BINARY_NAME above, 60 | # not the value here, or `flutter run` will no longer work. 61 | # 62 | # Any new source files that you add to the application should be added here. 63 | add_executable(${BINARY_NAME} 64 | "main.cc" 65 | "my_application.cc" 66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 67 | ) 68 | 69 | # Apply the standard set of build settings. This can be removed for applications 70 | # that need different build settings. 71 | apply_standard_settings(${BINARY_NAME}) 72 | 73 | # Add dependency libraries. Add any application-specific dependencies here. 74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 76 | 77 | # Run the Flutter tool portions of the build. This must not be removed. 78 | add_dependencies(${BINARY_NAME} flutter_assemble) 79 | 80 | # Only the install-generated bundle's copy of the executable will launch 81 | # correctly, since the resources must in the right relative locations. To avoid 82 | # people trying to run the unbundled copy, put it in a subdirectory instead of 83 | # the default top-level location. 84 | set_target_properties(${BINARY_NAME} 85 | PROPERTIES 86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" 87 | ) 88 | 89 | 90 | # Generated plugin build rules, which manage building the plugins and adding 91 | # them to the application. 92 | include(flutter/generated_plugins.cmake) 93 | 94 | 95 | # === Installation === 96 | # By default, "installing" just makes a relocatable bundle in the build 97 | # directory. 98 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 99 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 100 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 101 | endif() 102 | 103 | # Start with a clean build bundle directory every time. 104 | install(CODE " 105 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 106 | " COMPONENT Runtime) 107 | 108 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 109 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 110 | 111 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 112 | COMPONENT Runtime) 113 | 114 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 115 | COMPONENT Runtime) 116 | 117 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 118 | COMPONENT Runtime) 119 | 120 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) 121 | install(FILES "${bundled_library}" 122 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 123 | COMPONENT Runtime) 124 | endforeach(bundled_library) 125 | 126 | # Fully re-copy the assets directory on each build to avoid having stale files 127 | # from a previous install. 128 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 129 | install(CODE " 130 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 131 | " COMPONENT Runtime) 132 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 133 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 134 | 135 | # Install the AOT library on non-Debug builds only. 136 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 137 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 138 | COMPONENT Runtime) 139 | endif() 140 | --------------------------------------------------------------------------------