├── .devcontainer
├── Dockerfile
└── devcontainer.json
├── .github
├── FUNDING.yml
├── dependabot.yml
└── workflows
│ ├── auto-merge.yml
│ ├── autoupdate.yml
│ ├── build-flutter.yml
│ ├── issue-assign.yml
│ └── pr_remiders.yml
├── .gitignore
├── .metadata
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── io
│ │ │ │ └── flutter
│ │ │ │ └── app
│ │ │ │ └── FlutterMultiDexApplication.java
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── apps
│ │ │ │ └── blt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── NotificationManagerImpl.kt
│ │ │ │ ├── SpamCallBlockerService.kt
│ │ │ │ └── SpamNumberManager.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ ├── blt_logo.xml
│ │ │ ├── bugheist_logo.xml
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── GitHub.svg
├── TnC.md
├── ant.svg
├── app_icon.png
├── app_large_icon.png
├── bitcoin.svg
├── blt_logo.svg
├── blt_logo_dark.svg
├── default_profile.png
├── flea.svg
├── github
│ ├── contri1.png
│ ├── contri2.png
│ ├── gh_screen1.png
│ ├── gh_screen2.png
│ ├── gh_screen3.png
│ └── gh_screen4.png
├── image-not-found.png
├── input_bold.svg
├── input_heading.svg
├── input_image.svg
├── input_italic.svg
├── input_link.svg
├── input_list.svg
├── input_strikethrough.svg
├── input_task.svg
├── linkedin.svg
├── login_signup
│ ├── apple.png
│ ├── facebook.png
│ ├── google.png
│ ├── icon_email.png
│ ├── icon_eye_close.png
│ ├── icon_eye_open.png
│ ├── icon_password.png
│ ├── icon_user.png
│ └── user_password.png
├── logo.png
├── logo_white.svg
├── pest_control.svg
├── privacy_policy.md
├── scorpion.svg
├── select_image.svg
├── twitter.svg
├── typing.json
├── wasp.svg
└── website.svg
├── codemagic.yaml
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── 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-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── l10n.yaml
├── lib
├── l10n
│ ├── app_de.arb
│ ├── app_en.arb
│ ├── app_es.arb
│ ├── app_fr.arb
│ ├── app_hi.arb
│ ├── app_ja.arb
│ ├── app_pt.arb
│ └── app_zh.arb
├── main.dart
└── src
│ ├── app.dart
│ ├── components
│ ├── appbar.dart
│ ├── bug_hunt_list_tile.dart
│ ├── bug_hunt_search_delegate.dart
│ ├── components_import.dart
│ ├── contributor_card.dart
│ ├── issue_intro_card.dart
│ ├── issuechip.dart
│ ├── issueflag.dart
│ ├── issuelike.dart
│ ├── onboarding
│ │ ├── components
│ │ │ ├── drawer_paint.dart
│ │ │ └── onboard_page.dart
│ │ ├── data
│ │ │ └── onboard_page_data.dart
│ │ ├── models
│ │ │ └── onboard_page_model.dart
│ │ └── onboarding.dart
│ └── searchbar.dart
│ ├── constants
│ ├── about_constants.dart
│ ├── labels_constants.dart
│ ├── monthname_constants.dart
│ └── socialurls_constants.dart
│ ├── global
│ ├── functions.dart
│ └── variables.dart
│ ├── models
│ ├── bug_hunt_model.dart
│ ├── company_model.dart
│ ├── contributors_model.dart
│ ├── issue_model.dart
│ ├── issuedata_model.dart
│ ├── leader_model.dart
│ ├── leaderdata_model.dart
│ ├── post_model.dart
│ ├── project_model.dart
│ ├── tags_model.dart
│ └── user_model.dart
│ ├── pages
│ ├── auth
│ │ ├── forgot.dart
│ │ ├── login.dart
│ │ └── signup.dart
│ ├── bug_hunt_desc_page.dart
│ ├── chat_bot_page.dart
│ ├── companies
│ │ ├── company_details_and_issues.dart
│ │ └── company_list_page.dart
│ ├── company_details.dart
│ ├── contributors_info.dart
│ ├── drawer
│ │ ├── about.dart
│ │ ├── change_password.dart
│ │ ├── company_dashboard.dart
│ │ ├── drawer_imports.dart
│ │ ├── legal.dart
│ │ ├── prev_bug_hunts.dart
│ │ ├── projects.dart
│ │ ├── referral.dart
│ │ ├── show_bug_hunts.dart
│ │ ├── social.dart
│ │ ├── sponsor_page.dart
│ │ └── web_view.dart
│ ├── error.dart
│ ├── home
│ │ ├── feed.dart
│ │ ├── home.dart
│ │ ├── home_imports.dart
│ │ ├── issues.dart
│ │ ├── leaderboard.dart
│ │ ├── profile.dart
│ │ ├── report_bug.dart
│ │ └── start_hunt.dart
│ ├── issues
│ │ ├── closed_issues.dart
│ │ ├── issue_detail.dart
│ │ ├── issues_import.dart
│ │ └── open_issues.dart
│ ├── leaderboards
│ │ ├── company_scoreboard.dart
│ │ ├── global_leaderboard.dart
│ │ ├── leaderboards_imports.dart
│ │ └── monthly_leaderboard.dart
│ ├── onboarding_main_page.dart
│ ├── pages_import.dart
│ ├── sizzle
│ │ ├── sizzle_home.dart
│ │ ├── sizzle_login.dart
│ │ ├── sizzle_state_provider.dart
│ │ └── sizzle_timer.dart
│ ├── spam_call_blocker
│ │ ├── blocker_home.dart
│ │ └── database_helper.dart
│ └── welcome.dart
│ ├── providers
│ ├── authstate_provider.dart
│ ├── bug_hunt_provider.dart
│ ├── companies
│ │ └── company_list_provider.dart
│ ├── dark_mode_provider.dart
│ ├── issuelist_provider.dart
│ ├── language_provider.dart
│ ├── leaderboards
│ │ ├── companyscoreboard_provider.dart
│ │ ├── globalleaderboard_povider.dart
│ │ └── monthlyleaderboard_provider.dart
│ ├── login_provider.dart
│ ├── projects_provider.dart
│ └── providers_imports.dart
│ ├── routes
│ ├── routes_import.dart
│ └── routing.dart
│ └── util
│ ├── api
│ ├── auth_api.dart
│ ├── bug_hunt_api.dart
│ ├── chatbot_api.dart
│ ├── company_api.dart
│ ├── general_api.dart
│ ├── github_apis.dart
│ ├── issues_api.dart
│ ├── leaderboard_api.dart
│ ├── project_apis.dart
│ ├── tags_api.dart
│ └── user_api.dart
│ ├── endpoints
│ ├── auth_endpoints.dart
│ ├── company_endpoints.dart
│ ├── general_endpoints.dart
│ ├── issue_endpoints.dart
│ ├── leaderboard_endpoints.dart
│ └── user_endpoints.dart
│ ├── enums
│ ├── authstate_type.dart
│ └── login_type.dart
│ ├── services
│ ├── init_service.dart
│ ├── permission_handlers.dart
│ └── shared_preferences.dart
│ ├── theme_data.dart
│ ├── util_import.dart
│ └── validators.dart
├── linux
├── .gitignore
├── CMakeLists.txt
├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
├── main.cc
├── my_application.cc
└── my_application.h
├── macos
├── .gitignore
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Podfile
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ └── app_icon_64.png
│ ├── Base.lproj
│ │ └── MainMenu.xib
│ ├── Configs
│ │ ├── AppInfo.xcconfig
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── Warnings.xcconfig
│ ├── DebugProfile.entitlements
│ ├── Info.plist
│ ├── MainFlutterWindow.swift
│ └── Release.entitlements
└── RunnerTests
│ └── RunnerTests.swift
├── pubspec.yaml
├── setup.sh
├── test
├── integration_tests
│ ├── issue_card_test.dart
│ ├── show_company_test.dart
│ └── show_issues_test.dart
├── test_imports.dart
└── unit_tests
│ ├── bug_hunt_test.dart
│ ├── company_test.dart
│ ├── issue_test.dart
│ ├── leaderboard_test.dart
│ ├── project_test.dart
│ └── user_test.dart
└── windows
├── .gitignore
├── CMakeLists.txt
├── flutter
├── CMakeLists.txt
├── generated_plugin_registrant.cc
├── generated_plugin_registrant.h
└── generated_plugins.cmake
└── runner
├── CMakeLists.txt
├── Runner.rc
├── flutter_window.cpp
├── flutter_window.h
├── main.cpp
├── resource.h
├── resources
└── app_icon.ico
├── runner.exe.manifest
├── utils.cpp
├── utils.h
├── win32_window.cpp
└── win32_window.h
/.devcontainer/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM dart
2 |
3 | RUN apt-get update
4 | RUN apt-get install -y curl git unzip xz-utils zip libglu1-mesa
5 |
6 | RUN apt-get clean
7 |
8 | RUN git clone https://github.com/flutter/flutter.git -b stable --depth 1 /flutter
9 | ENV PATH="/flutter/bin:$PATH"
10 | RUN flutter doctor
11 |
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "build": {
3 | "dockerfile": "Dockerfile"
4 | },
5 | "forwardPorts": [3000],
6 | "name": "Flutter",
7 | "customizations": {
8 | "vscode": {
9 | "extensions": [
10 | "Dart-Code.dart-code",
11 | "Dart-Code.flutter"
12 | ]
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | custom: ['https://owasp.org/donate?reponame=www-project-bug-logging-tool&title=OWASP+Bug+logging+tool',]
4 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | enable-beta-ecosystems: true
3 | updates:
4 | - package-ecosystem: "pub"
5 | directory: "/"
6 | schedule:
7 | interval: "daily"
8 |
--------------------------------------------------------------------------------
/.github/workflows/auto-merge.yml:
--------------------------------------------------------------------------------
1 | name: auto-merge
2 |
3 | on:
4 | pull_request:
5 |
6 | jobs:
7 | auto-merge:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v2
11 | - uses: ahmadnassri/action-dependabot-auto-merge@v2
12 | with:
13 | github-token: ${{ secrets.GITHUB_TOKEN }}
--------------------------------------------------------------------------------
/.github/workflows/autoupdate.yml:
--------------------------------------------------------------------------------
1 | name: autoupdate
2 | on:
3 | # This will trigger on all pushes to all branches.
4 | push: {}
5 | # Alternatively, you can only trigger if commits are pushed to certain branches, e.g.:
6 | # push:
7 | # branches:
8 | # - master
9 | # - unstable
10 | jobs:
11 | autoupdate:
12 | name: autoupdate
13 | runs-on: ubuntu-20.04
14 | steps:
15 | - uses: docker://chinthakagodawita/autoupdate-action:v1
16 | env:
17 | GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
--------------------------------------------------------------------------------
/.github/workflows/issue-assign.yml:
--------------------------------------------------------------------------------
1 | name: Auto Assign
2 |
3 | on:
4 | issue_comment:
5 | types: [created]
6 | schedule:
7 | - cron: '0 0 * * *'
8 | workflow_dispatch:
9 |
10 | jobs:
11 | auto-assign:
12 | runs-on: ubuntu-latest
13 | permissions:
14 | issues: write
15 | steps:
16 | - name: Assign Issues
17 | uses: OWASP-BLT/BLT-Action@main
18 | with:
19 | repo-token: ${{ secrets.GITHUB_TOKEN }}
20 |
--------------------------------------------------------------------------------
/.github/workflows/pr_remiders.yml:
--------------------------------------------------------------------------------
1 | name: PRs reviews reminder
2 |
3 | on:
4 | schedule:
5 | # Runs every hour, between 14:00 and 21:00, Monday through Friday.
6 | - cron: "0,30 14-21 * * 1-5"
7 |
8 |
9 | jobs:
10 | pr-reviews-reminder:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: davideviolante/pr-reviews-reminder-action@v2.7.0
14 | env:
15 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 | with:
17 | webhook-url: ${{ secrets.SLACK_PR_REMINDER_WEBHOOK_URL }}
18 | provider: 'slack' # Required (slack, rocket or msteams)
19 | channel: '#project-blt-prs' # Optional, eg: #general
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # Flutter/Dart/Pub related
19 | **/doc/api/
20 | **/ios/Flutter/.last_build_id
21 | .dart_tool/
22 | .flutter-plugins
23 | .flutter-plugins-dependencies
24 | .packages
25 | .pub-cache/
26 | .pub/
27 | /build/
28 | *.lock
29 |
30 | # Web related
31 | lib/generated_plugin_registrant.dart
32 |
33 | # Symbolication related
34 | app.*.symbols
35 |
36 | # Obfuscation related
37 | app.*.map.json
38 |
39 | # Android Studio will place build artifacts here
40 | /android/app/debug
41 | /android/app/profile
42 | /android/app/release
43 |
--------------------------------------------------------------------------------
/.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.
5 |
6 | version:
7 | revision: 9944297138845a94256f1cf37beb88ff9a8e811a
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: 9944297138845a94256f1cf37beb88ff9a8e811a
17 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
18 | - platform: android
19 | create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
20 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
21 | - platform: ios
22 | create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
23 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
24 | - platform: web
25 | create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
26 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
27 |
28 | # User provided section
29 |
30 | # List of Local paths (relative to this file) that should be
31 | # ignored by the migrate tool.
32 | #
33 | # Files that are not part of the templates will be ignored by default.
34 | unmanaged_files:
35 | - 'lib/main.dart'
36 | - 'ios/Runner.xcodeproj/project.pbxproj'
37 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2023, OWASP BLT TEAM
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice, this
9 | list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright notice,
12 | this list of conditions and the following disclaimer in the documentation
13 | and/or other materials provided with the distribution.
14 |
15 | 3. Neither the name of the copyright holder nor the names of its
16 | contributors may be used to endorse or promote products derived from
17 | this software without specific prior written permission.
18 |
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/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 |
11 | #include: package:flutter_lints/flutter.yaml
12 | # has 300 errors so needs time to cleanup
13 |
14 | linter:
15 | # The lint rules applied to this project can be customized in the
16 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
17 | # included above or to enable additional rules. A list of all available lints
18 | # and their documentation is published at
19 | # https://dart-lang.github.io/linter/lints/index.html.
20 | #
21 | # Instead of disabling a lint rule for the entire project in the
22 | # section below, it can also be suppressed for a single line of code
23 | # or a specific dart file by using the `// ignore: name_of_lint` and
24 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
25 | # producing the lint.
26 | rules:
27 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
28 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
29 |
30 | # Additional information about this file can be found at
31 | # https://dart.dev/guides/language/analysis-options
32 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 |
20 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
21 | if (flutterVersionName == null) {
22 | flutterVersionName = '1.0'
23 | }
24 |
25 | apply plugin: 'com.android.application'
26 | apply plugin: 'kotlin-android'
27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
28 |
29 | android {
30 | compileSdkVersion 34
31 |
32 | sourceSets {
33 | main.java.srcDirs += 'src/main/kotlin'
34 | }
35 |
36 | defaultConfig {
37 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38 | applicationId "com.apps.blt"
39 | minSdkVersion 21
40 | targetSdkVersion 34
41 | multiDexEnabled true
42 | versionCode flutterVersionCode.toInteger()
43 | versionName flutterVersionName
44 | vectorDrawables.useSupportLibrary = true
45 | }
46 |
47 | buildTypes {
48 | release {
49 | // TODO: Add your own signing config for the release build.
50 | // Signing with the debug keys for now, so `flutter run --release` works.
51 | signingConfig signingConfigs.debug
52 | }
53 | }
54 |
55 | lintOptions {
56 | disable 'InvalidPackage'
57 | disable "Instantiatable"
58 | checkReleaseBuilds false
59 | abortOnError false
60 | }
61 | }
62 |
63 | flutter {
64 | source '../..'
65 | }
66 |
67 | dependencies {
68 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
69 | implementation "androidx.multidex:multidex:2.0.1"
70 |
71 | implementation 'androidx.core:core-ktx:1.10.1'
72 | implementation 'androidx.appcompat:appcompat:1.6.1'
73 | implementation 'androidx.activity:activity-ktx:1.7.2'
74 | implementation 'org.greenrobot:eventbus:3.2.0'
75 | implementation 'com.jakewharton.timber:timber:4.7.1'
76 | implementation 'pub.devrel:easypermissions:3.0.0'
77 | }
78 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java:
--------------------------------------------------------------------------------
1 | // Generated file.
2 | //
3 | // If you wish to remove Flutter's multidex support, delete this entire file.
4 | //
5 | // Modifications to this file should be done in a copy under a different name
6 | // as this file may be regenerated.
7 |
8 | package io.flutter.app;
9 |
10 | import android.app.Application;
11 | import android.content.Context;
12 | import androidx.annotation.CallSuper;
13 | import androidx.multidex.MultiDex;
14 |
15 | /**
16 | * Extension of {@link android.app.Application}, adding multidex support.
17 | */
18 | public class FlutterMultiDexApplication extends Application {
19 | @Override
20 | @CallSuper
21 | protected void attachBaseContext(Context base) {
22 | super.attachBaseContext(base);
23 | MultiDex.install(this);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/apps/blt/NotificationManagerImpl.kt:
--------------------------------------------------------------------------------
1 | package com.apps.blt
2 |
3 | import android.content.Context
4 | import android.os.Looper
5 | import android.widget.Toast
6 | interface NotificationManager {
7 | fun showToastNotification(context: Context, message: String)
8 | }
9 |
10 | class NotificationManagerImpl : NotificationManager {
11 | override fun showToastNotification(context: Context, message: String) {
12 | val t = Thread {
13 | try {
14 | Looper.prepare()
15 | Toast.makeText(context.applicationContext, message, Toast.LENGTH_LONG).show()
16 | Looper.loop()
17 | } catch (e: Exception) {
18 | e.printStackTrace()
19 | }
20 | }
21 | t.start()
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/apps/blt/SpamCallBlockerService.kt:
--------------------------------------------------------------------------------
1 | package com.apps.blt
2 |
3 | import android.telecom.CallScreeningService
4 | import android.telecom.Call
5 | import android.util.Log
6 | import org.greenrobot.eventbus.EventBus
7 | import java.text.SimpleDateFormat
8 | import java.util.Date
9 | import java.util.Locale
10 | import android.net.Uri
11 |
12 | class MessageEvent(val message: String) {}
13 |
14 | class SpamCallBlockerService : CallScreeningService() {
15 | private val notificationManager = NotificationManagerImpl()
16 |
17 | override fun onCreate() {
18 | super.onCreate()
19 | Log.d("SpamCallBlockerService", "Service started")
20 | }
21 |
22 | override fun onScreenCall(callDetails: Call.Details) {
23 | Log.d("SpamCallBlockerService", "onScreenCall triggered")
24 | val phoneNumber = getPhoneNumber(callDetails)
25 | Log.d("SpamCallBlockerService", "Intercepted call from: $phoneNumber")
26 | var response = CallResponse.Builder()
27 | response = handlePhoneCall(response, phoneNumber)
28 |
29 | respondToCall(callDetails, response.build())
30 | logCallInterception(phoneNumber, response.build())
31 | }
32 |
33 | private fun handlePhoneCall(
34 | response: CallResponse.Builder,
35 | phoneNumber: String
36 | ): CallResponse.Builder {
37 | if (SpamNumberManager.isSpamNumber(phoneNumber)) {
38 | response.apply {
39 | setRejectCall(true)
40 | setDisallowCall(true)
41 | setSkipCallLog(false)
42 | displayToast(String.format("Rejected call from %s", phoneNumber))
43 | }
44 | } else {
45 | displayToast(String.format("Incoming call from %s", phoneNumber))
46 | }
47 | return response
48 | }
49 |
50 | private fun getPhoneNumber(callDetails: Call.Details): String {
51 | return callDetails.handle.toString().removeTelPrefix().parseCountryCode()
52 | }
53 |
54 | private fun displayToast(message: String) {
55 | notificationManager.showToastNotification(applicationContext, message)
56 | EventBus.getDefault().post(MessageEvent(message))
57 | }
58 |
59 | private fun logCallInterception(phoneNumber: String, response: CallResponse) {
60 | val currentTime = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()).format(Date())
61 | val action = "action"
62 | val logMessage = "[$currentTime] $action call from $phoneNumber"
63 | Log.d("SpamCallBlockerService", logMessage)
64 | }
65 |
66 | fun String.removeTelPrefix() = this.replace("tel:", "")
67 | fun String.parseCountryCode(): String = Uri.decode(this)
68 | }
69 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/apps/blt/SpamNumberManager.kt:
--------------------------------------------------------------------------------
1 | package com.apps.blt
2 |
3 | import kotlin.collections.mutableSetOf
4 |
5 | object SpamNumberManager {
6 | private val spamNumbers = mutableSetOf()
7 |
8 | fun updateSpamList(numbers: List) {
9 | spamNumbers.clear()
10 | spamNumbers.addAll(numbers)
11 | }
12 |
13 | fun isSpamNumber(number: String): Boolean {
14 | return spamNumbers.contains(number)
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 |
7 | }
8 |
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:7.4.2'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | mavenCentral()
19 | }
20 | }
21 |
22 | rootProject.buildDir = '../build'
23 | subprojects {
24 | project.buildDir = "${rootProject.buildDir}/${project.name}"
25 | }
26 | subprojects {
27 | project.evaluationDependsOn(':app')
28 | }
29 |
30 | tasks.register("clean", Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Oct 29 01:30:50 IST 2024
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/GitHub.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/app_icon.png
--------------------------------------------------------------------------------
/assets/app_large_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/app_large_icon.png
--------------------------------------------------------------------------------
/assets/bitcoin.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/assets/default_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/default_profile.png
--------------------------------------------------------------------------------
/assets/github/contri1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/github/contri1.png
--------------------------------------------------------------------------------
/assets/github/contri2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/github/contri2.png
--------------------------------------------------------------------------------
/assets/github/gh_screen1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/github/gh_screen1.png
--------------------------------------------------------------------------------
/assets/github/gh_screen2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/github/gh_screen2.png
--------------------------------------------------------------------------------
/assets/github/gh_screen3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/github/gh_screen3.png
--------------------------------------------------------------------------------
/assets/github/gh_screen4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/github/gh_screen4.png
--------------------------------------------------------------------------------
/assets/image-not-found.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/image-not-found.png
--------------------------------------------------------------------------------
/assets/input_bold.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/input_heading.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/input_image.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/input_italic.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/input_list.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/input_strikethrough.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/input_task.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/assets/linkedin.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/assets/login_signup/apple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/login_signup/apple.png
--------------------------------------------------------------------------------
/assets/login_signup/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/login_signup/facebook.png
--------------------------------------------------------------------------------
/assets/login_signup/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/login_signup/google.png
--------------------------------------------------------------------------------
/assets/login_signup/icon_email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/login_signup/icon_email.png
--------------------------------------------------------------------------------
/assets/login_signup/icon_eye_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/login_signup/icon_eye_close.png
--------------------------------------------------------------------------------
/assets/login_signup/icon_eye_open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/login_signup/icon_eye_open.png
--------------------------------------------------------------------------------
/assets/login_signup/icon_password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/login_signup/icon_password.png
--------------------------------------------------------------------------------
/assets/login_signup/icon_user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/login_signup/icon_user.png
--------------------------------------------------------------------------------
/assets/login_signup/user_password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/login_signup/user_password.png
--------------------------------------------------------------------------------
/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/assets/logo.png
--------------------------------------------------------------------------------
/assets/pest_control.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/assets/privacy_policy.md:
--------------------------------------------------------------------------------
1 | # Privacy Policy
2 |
3 | We want to make sure you, as a Customer or Finder, understand what information we collect from you and why. We also want you to know about our information use practices so that you can make good decisions about how you use BLT.
4 |
5 | This Privacy Policy explains what information we collect from and about you, (collectively, "Your Information") and what we do with it.
6 |
7 | _Please read this Privacy Policy carefully._
8 |
9 | ## Information Collection
10 | - __Direct Collection__
11 | - When you create an account with BLT, you are required to provide us with profile information, including your name, company name (if applicable), username, password, and email address. BLT stores this information to help identify you when you log in.
12 |
13 | - __Indirect Collection__
14 | - We receive some information automatically when you visit BLT. This includes information about the device, browser, and operating system you use when accessing our site and Services and your IP address. If you visit BLT when you are logged into your account, we also collect the user identification number we assign you when you open your account.
15 |
16 | - __Cookie Policy__
17 | - When you log in to your account, BLT will place cookie(s) for the purpose of creating the session, knowing when you're logged in, and recognizing you as the same authenticated user across accounts. These cookie(s) contain an encrypted user identifier.
18 |
--------------------------------------------------------------------------------
/assets/select_image.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/assets/twitter.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/assets/website.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/codemagic.yaml:
--------------------------------------------------------------------------------
1 | workflows:
2 | ios-workflow:
3 | triggering:
4 | events:
5 | - push
6 | cancel_previous_builds: true
7 | name: iOS Workflow
8 | max_build_duration: 120
9 | integrations:
10 | app_store_connect: codemagic
11 | environment:
12 | # ios_signing:
13 | # distribution_type: app_store
14 | # bundle_identifier: $PRODUCT_BUNDLE_IDENTIFIER
15 | flutter: stable
16 | groups:
17 | - main
18 | scripts:
19 | - name: Run setups
20 | script: |
21 | chmod +x setup.sh
22 | ./setup.sh
23 | - name: Set up code signing settings on Xcode project
24 | script: |
25 | xcode-project use-profiles
26 | - name: Get Flutter packages
27 | script: |
28 | flutter packages pub
29 | - name: Install pods
30 | script: |
31 | find . -name "Podfile" -execdir pod install \;
32 | - name: Flutter analyze
33 | script: |
34 | flutter analyze
35 | # - name: Flutter unit tests
36 | # script: |
37 | # flutter test
38 | # ignore_failure: true
39 | - name: Flutter build ipa
40 | script: |
41 | flutter build ipa --release \
42 | --build-number=$(($(app-store-connect get-latest-app-store-build-number "$APP_ID") + 1)) \
43 | --export-options-plist=/Users/builder/export_options.plist
44 | artifacts:
45 | - build/ios/ipa/*.ipa
46 | - /tmp/xcodebuild_logs/*.log
47 | - flutter_drive.log
48 | publishing:
49 | app_store_connect:
50 | api_key: $APP_STORE_CONNECT_PRIVATE_KEY
51 | key_id: $APP_STORE_CONNECT_KEY_IDENTIFIER
52 | issuer_id: $APP_STORE_CONNECT_ISSUER_ID
53 | submit_to_testflight: true
54 |
55 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 |
2 | # Uncomment this line to define a global platform for your project
3 | platform :ios, '12.0'
4 |
5 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
6 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
7 |
8 | project 'Runner', {
9 | 'Debug' => :debug,
10 | 'Profile' => :release,
11 | 'Release' => :release,
12 | }
13 |
14 | def flutter_root
15 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
16 | unless File.exist?(generated_xcode_build_settings_path)
17 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
18 | end
19 |
20 | File.foreach(generated_xcode_build_settings_path) do |line|
21 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
22 | return matches[1].strip if matches
23 | end
24 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
25 | end
26 |
27 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
28 |
29 | flutter_ios_podfile_setup
30 |
31 | target 'Runner' do
32 | use_frameworks!
33 | use_modular_headers!
34 |
35 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
36 | end
37 |
38 | post_install do |installer|
39 | installer.pods_project.targets.each do |target|
40 | flutter_additional_ios_build_settings(target)
41 | target.build_configurations.each do |config|
42 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
43 | config.build_settings['ENABLE_BITCODE'] = 'NO'
44 | end
45 | end
46 |
47 | ################ Awesome Notifications pod modification 1 ###################
48 | awesome_pod_file = File.expand_path(File.join('plugins', 'awesome_notifications', 'ios', 'Scripts', 'AwesomePodFile'), '.symlinks')
49 | require awesome_pod_file
50 | update_awesome_pod_build_settings(installer)
51 | ################ Awesome Notifications pod modification 1 ###################
52 | end
53 |
54 | ################ Awesome Notifications pod modification 2 ###################
55 | awesome_pod_file = File.expand_path(File.join('plugins', 'awesome_notifications', 'ios', 'Scripts', 'AwesomePodFile'), '.symlinks')
56 | require awesome_pod_file
57 | update_awesome_main_target_settings('Runner', File.dirname(File.realpath(__FILE__)), flutter_root)
58 | ################ Awesome Notifications pod modification 2 ###################
59 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import UIKit
4 |
5 | @main
6 | @objc class AppDelegate: FlutterAppDelegate {
7 | override func application(
8 | _ application: UIApplication,
9 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
10 | ) -> Bool {
11 | // Register the method channel
12 | let controller = window?.rootViewController as! FlutterViewController
13 | let clipboardImageChannel = FlutterMethodChannel(name: "com.apps.blt/channel",
14 | binaryMessenger: controller.binaryMessenger)
15 |
16 | clipboardImageChannel.setMethodCallHandler { (call: FlutterMethodCall, result: @escaping FlutterResult) in
17 | if call.method == "getClipboardImage" {
18 | self.getClipboardImage(result: result)
19 | } else {
20 | result(FlutterMethodNotImplemented)
21 | }
22 | }
23 |
24 | GeneratedPluginRegistrant.register(with: self)
25 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
26 | }
27 |
28 | private func getClipboardImage(result: FlutterResult) {
29 | // Check if the clipboard contains an image
30 | if let image = UIPasteboard.general.image {
31 | // Convert the image to PNG data
32 | if let imageData = image.pngData() {
33 | // Encode the image data to a Base64 string
34 | let base64String = imageData.base64EncodedString()
35 | result(base64String) // Send the Base64 string back to Flutter
36 | } else {
37 | result(FlutterError(code: "NO_IMAGE", message: "Could not convert image to data", details: nil))
38 | }
39 | } else {
40 | result(FlutterError(code: "NO_IMAGE", message: "Clipboard does not contain an image", details: nil))
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/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/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OWASP-BLT/BLT-Flutter/c4b6ed0f33958ef2024738e6b1c8716429cbbf00/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Blt
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | blt
17 | NSPhotoLibraryUsageDescription
18 | This app needs access to your photo library to upload images.
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | $(FLUTTER_BUILD_NAME)
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | $(FLUTTER_BUILD_NUMBER)
27 | LSRequiresIPhoneOS
28 |
29 | UILaunchStoryboardName
30 | LaunchScreen
31 | UIMainStoryboardFile
32 | Main
33 | ITSAppUsesNonExemptEncryption
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 | UIViewControllerBasedStatusBarAppearance
49 |
50 | CFBundleURLTypes
51 |
52 |
53 | CFBundleTypeRole
54 | Editor
55 | CFBundleURLSchemes
56 |
57 | ShareMedia
58 |
59 |
60 |
61 |
62 | NSPhotoLibraryUsageDescription
63 | To upload photos, please allow permission to access your photo library.
64 | NSCameraUsageDescription
65 | To upload photos, please allow permission to access your photo library.
66 | NSMicrophoneUsageDescription
67 | To upload photos, please allow permission to access your photo library.
68 |
69 |
70 | CADisableMinimumFrameDurationOnPhone
71 |
72 | UIApplicationSupportsIndirectInputEvents
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/l10n.yaml:
--------------------------------------------------------------------------------
1 | arb-dir: lib/l10n
2 | template-arb-file: app_en.arb
3 | output-localization-file: app_localizations.dart
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | //import 'package:blt/src/util/services/init_service.dart';
2 | import 'package:flutter/material.dart';
3 | import 'src/app.dart';
4 | //import 'package:flutter/services.dart';
5 | import 'package:sentry_flutter/sentry_flutter.dart';
6 |
7 | // Application's entry point
8 | void main() async {
9 | WidgetsFlutterBinding.ensureInitialized();
10 | //InitService.init(); // Call the init method from the InitService class
11 | const SENTRY_DSN = "https://example-234234324.com/4504877879197696";
12 | await SentryFlutter.init(
13 | (options) {
14 | options.dsn = SENTRY_DSN;
15 | options.tracesSampleRate = 1.0;
16 | },
17 | appRunner: () => runApp(BLT()),
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/lib/src/app.dart:
--------------------------------------------------------------------------------
1 | //import 'dart:async';
2 |
3 | import 'package:blt/src/pages/onboarding_main_page.dart';
4 | import 'package:blt/src/providers/dark_mode_provider.dart';
5 | import 'package:blt/src/providers/language_provider.dart';
6 | import 'package:blt/src/routes/routing.dart';
7 | import 'package:blt/src/util/theme_data.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_riverpod/flutter_riverpod.dart';
10 | import 'package:flutter_localizations/flutter_localizations.dart';
11 | import 'package:flutter_gen/gen_l10n/app_localizations.dart';
12 | //import 'package:receive_sharing_intent/receive_sharing_intent.dart';
13 |
14 | /// ### The BLT app's root widget
15 | class BLT extends StatefulWidget {
16 | const BLT({Key? key}) : super(key: key);
17 |
18 | @override
19 | BLTState createState() => BLTState();
20 | }
21 |
22 | class BLTState extends State {
23 | final _messengerKey = GlobalKey();
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return ProviderScope(
28 | child: GestureDetector(
29 | onTap: () {
30 | FocusScopeNode currentScope = FocusScope.of(context);
31 | if (!currentScope.hasPrimaryFocus && currentScope.hasFocus) {
32 | FocusManager.instance.primaryFocus!.unfocus();
33 | }
34 | },
35 | child: Consumer(
36 | builder: (context, ref, _) {
37 | final currentLanguage = ref.watch(languageProvider);
38 | final themeMode = ref.watch(darkModeProvider);
39 |
40 | return MaterialApp(
41 | localizationsDelegates: [
42 | AppLocalizations.delegate,
43 | GlobalMaterialLocalizations.delegate,
44 | GlobalWidgetsLocalizations.delegate,
45 | GlobalCupertinoLocalizations.delegate,
46 | ],
47 | supportedLocales: AppLocalizations.supportedLocales,
48 | locale: Locale(currentLanguage),
49 | scaffoldMessengerKey: _messengerKey,
50 | debugShowCheckedModeBanner: false,
51 | onGenerateRoute: RouteManager.generateRoute,
52 | title: 'BLT',
53 | theme: AppTheme.lightTheme,
54 | darkTheme: AppTheme.darkTheme,
55 | themeMode:
56 | themeMode.isDarkMode ? ThemeMode.dark : ThemeMode.light,
57 | home: Scaffold(body: OnboardingMainPage()),
58 | );
59 | },
60 | ),
61 | ),
62 | );
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/src/components/appbar.dart:
--------------------------------------------------------------------------------
1 | import 'package:blt/src/components/components_import.dart';
2 |
3 | /// The app's main Appbar
4 | AppBar buildAppBar({required BuildContext context}) {
5 | final isDarkMode = Theme.of(context).brightness == Brightness.dark;
6 | return AppBar(
7 | title: SvgPicture.asset(
8 | isDarkMode ? 'assets/blt_logo_dark.svg' : 'assets/blt_logo.svg',
9 | fit: BoxFit.cover,
10 | height: 30,
11 | ),
12 | actions: [
13 | IconButton(
14 | icon: Icon(
15 | Icons.search,
16 | color: isDarkMode ? Colors.grey[350] : Colors.red,
17 | ),
18 | onPressed: () {
19 | showSearch(
20 | context: context,
21 | delegate: BLTSearchDelegate(),
22 | );
23 | },
24 | ),
25 | IconButton(
26 | icon: Icon(
27 | Icons.account_circle,
28 | color: isDarkMode ? Colors.grey[350] : Colors.red,
29 | ),
30 | onPressed: () {
31 | if (currentUser!.id == null) {
32 | ScaffoldMessenger.of(context).showSnackBar(SnackBar(
33 | content: const Text("No profile Found Check Your Connection"),
34 | ));
35 | return;
36 | }
37 | Navigator.of(context).pushNamed(
38 | RouteManager.profilePage,
39 | );
40 | },
41 | )
42 | ],
43 | elevation: 0,
44 | backgroundColor: isDarkMode
45 | ? Color.fromRGBO(58, 21, 31, 1)
46 | : Theme.of(context).canvasColor,
47 | iconTheme: isDarkMode
48 | ? IconThemeData(color: Colors.grey[350])
49 | : IconThemeData(color: Color(0xFFDC4654)),
50 | );
51 | }
52 |
--------------------------------------------------------------------------------
/lib/src/components/bug_hunt_search_delegate.dart:
--------------------------------------------------------------------------------
1 | import './components_import.dart';
2 |
3 | /// The search bar of app for searching issues based on keyword.
4 | class BugHuntSearchDelegate extends SearchDelegate {
5 | @override
6 | List? buildActions(BuildContext context) {
7 | return [
8 | IconButton(
9 | onPressed: () {
10 | query != '' ? (query = '') : Navigator.of(context).pop();
11 | },
12 | icon: Icon(
13 | Icons.clear,
14 | color: Color(0xFFDC4654),
15 | ),
16 | ),
17 | ];
18 | }
19 |
20 | @override
21 | Widget? buildLeading(BuildContext context) {
22 | return IconButton(
23 | icon: Icon(
24 | Icons.arrow_back_ios_new_rounded,
25 | color: Color(0xFFDC4654),
26 | ),
27 | onPressed: () {
28 | Navigator.of(context).pop();
29 | },
30 | );
31 | }
32 |
33 | @override
34 | Widget buildResults(BuildContext context) {
35 | Future _getObj =
36 | BugHuntApiClient.searchBugHunts(client: null, search: query);
37 |
38 | ScrollController _scrollController = new ScrollController();
39 |
40 | return FutureBuilder(
41 | future: _getObj,
42 | builder: (context, snapshot) {
43 | if (snapshot.connectionState == ConnectionState.done) {
44 | if (snapshot.hasError) {
45 | return Center(
46 | child: Text(
47 | 'Something went wrong!',
48 | style: TextStyle(fontSize: 18),
49 | ),
50 | );
51 | } else if (snapshot.hasData) {
52 | return ListView.builder(
53 | padding: EdgeInsets.symmetric(horizontal: 20),
54 | itemCount: snapshot.data.length,
55 | controller: _scrollController,
56 | itemBuilder: (context, index) {
57 | return BugHuntListTile(
58 | hunt: snapshot.data[index],
59 | );
60 | },
61 | );
62 | }
63 | }
64 | return Center(
65 | child: CircularProgressIndicator(),
66 | );
67 | },
68 | );
69 | }
70 |
71 | @override
72 | Widget buildSuggestions(BuildContext context) {
73 | final Size size = MediaQuery.of(context).size;
74 | return Container(
75 | width: size.width,
76 | height: size.height,
77 | child: Center(
78 | child: Text(
79 | 'Search a Bug Hunt!',
80 | style: GoogleFonts.ubuntu(
81 | textStyle: TextStyle(
82 | color: Color(0xFF737373),
83 | fontSize: 20,
84 | ),
85 | ),
86 | ),
87 | ),
88 | );
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/lib/src/components/components_import.dart:
--------------------------------------------------------------------------------
1 | export 'package:blt/src/routes/routing.dart';
2 | export 'package:flutter_svg/flutter_svg.dart';
3 | export 'package:blt/src/components/searchbar.dart';
4 | export 'package:blt/src/global/variables.dart';
5 | export 'package:cached_network_image/cached_network_image.dart';
6 | export 'package:flutter/services.dart';
7 | export 'package:google_fonts/google_fonts.dart';
8 | export 'package:url_launcher/url_launcher.dart';
9 | export '../models/issue_model.dart';
10 | export '../components/issuelike.dart';
11 | export 'package:flutter_riverpod/flutter_riverpod.dart';
12 | export '../providers/login_provider.dart';
13 | export '../util/api/issues_api.dart';
14 | export '../util/enums/login_type.dart';
15 | export '../models/issuedata_model.dart';
16 | export '../components/issue_intro_card.dart';
17 | export 'package:blt/src/pages/welcome.dart';
18 | export 'package:blt/src/components/onboarding/models/onboard_page_model.dart';
19 | export 'package:blt/src/components/onboarding/components/drawer_paint.dart';
20 | export 'package:blt/src/components/onboarding/components/onboard_page.dart';
21 | export 'package:blt/src/components/onboarding/data/onboard_page_data.dart';
22 | export 'package:smooth_page_indicator/smooth_page_indicator.dart';
23 | export 'package:blt/src/constants/monthname_constants.dart';
24 | export '../models/bug_hunt_model.dart';
25 | export 'package:flutter/material.dart';
26 | export 'package:blt/src/util/api/bug_hunt_api.dart';
27 | export 'package:blt/src/components/bug_hunt_list_tile.dart';
28 | export '../util/endpoints/general_endpoints.dart';
29 |
--------------------------------------------------------------------------------
/lib/src/components/issuechip.dart:
--------------------------------------------------------------------------------
1 | import 'package:blt/src/components/components_import.dart';
2 |
3 | /// Chip that shows the open/close status of an issue.
4 | class IssueStatusChip extends StatelessWidget {
5 | final Issue issue;
6 | const IssueStatusChip({
7 | Key? key,
8 | required this.issue,
9 | }) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return Chip(
14 | label: Text(
15 | (issue.isOpen) ? "Open" : "Closed",
16 | style: GoogleFonts.aBeeZee(
17 | textStyle: TextStyle(
18 | fontSize: 10,
19 | color: (issue.isOpen) ? Color(0xFFA3A3A3) : Color(0xFFDC4654),
20 | ),
21 | ),
22 | ),
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/src/components/issueflag.dart:
--------------------------------------------------------------------------------
1 | import 'package:blt/src/components/components_import.dart';
2 |
3 | /// Issue flags show and toggle component.
4 | class IssueFlagButton extends ConsumerStatefulWidget {
5 | final Issue issue;
6 | final Color? color;
7 | const IssueFlagButton({
8 | Key? key,
9 | this.color,
10 | required this.issue,
11 | }) : super(key: key);
12 |
13 | @override
14 | ConsumerState createState() =>
15 | _IssueFlagButtonState();
16 | }
17 |
18 | class _IssueFlagButtonState extends ConsumerState {
19 | late int flags;
20 | late bool flagged;
21 |
22 | Future toggleIssueFlag() async {
23 | setState(() {
24 | if (flagged) {
25 | flags = flags - 1;
26 | } else {
27 | flags = flags + 1;
28 | }
29 | flagged = !flagged;
30 | });
31 |
32 | try {
33 | bool status = await IssueApiClient.toggleIssueLikes(widget.issue.id!);
34 | if (!status) {
35 | setState(() {
36 | flags = widget.issue.flags!;
37 | flagged = widget.issue.flagged!;
38 | });
39 | } else {
40 | widget.issue.likes = flags;
41 | widget.issue.flagged = flagged;
42 | }
43 | } catch (e) {
44 | print(e);
45 | }
46 | }
47 |
48 | @override
49 | void initState() {
50 | super.initState();
51 | flagged = widget.issue.flagged!;
52 | flags = widget.issue.flags!;
53 | }
54 |
55 | @override
56 | Widget build(BuildContext context) {
57 | return TextButton.icon(
58 | onPressed: () async {
59 | if (ref.read(loginProvider.notifier).loginType == LoginType.guest) {
60 | ScaffoldMessenger.of(context).showSnackBar(
61 | SnackBar(
62 | content: Text("Login to like and flag issues!"),
63 | ),
64 | );
65 | } else {
66 | await toggleIssueFlag();
67 | }
68 | },
69 | icon: Icon(
70 | Icons.flag_outlined,
71 | color: widget.color,
72 | ),
73 | label: Text(
74 | "${flags}",
75 | style: TextStyle(
76 | color: widget.color,
77 | ),
78 | ),
79 | );
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/lib/src/components/issuelike.dart:
--------------------------------------------------------------------------------
1 | import 'package:blt/src/components/components_import.dart';
2 |
3 | /// Issue likes show and toggle component.
4 | class IssueLikeButton extends ConsumerStatefulWidget {
5 | final Issue issue;
6 | final Color? color;
7 |
8 | const IssueLikeButton({
9 | Key? key,
10 | required this.issue,
11 | this.color,
12 | }) : super(key: key);
13 |
14 | @override
15 | ConsumerState createState() =>
16 | _IssueLikeButtonState();
17 | }
18 |
19 | class _IssueLikeButtonState extends ConsumerState {
20 | late int likes;
21 | late bool liked;
22 |
23 | Future toggleIssueLike() async {
24 | setState(() {
25 | if (liked) {
26 | likes = likes - 1;
27 | } else {
28 | likes = likes + 1;
29 | }
30 | liked = !liked;
31 | });
32 |
33 | try {
34 | bool status = await IssueApiClient.toggleIssueLikes(widget.issue.id!);
35 | if (!status) {
36 | setState(() {
37 | likes = widget.issue.likes!;
38 | liked = widget.issue.liked!;
39 | });
40 | } else {
41 | widget.issue.likes = likes;
42 | widget.issue.liked = liked;
43 | }
44 | } catch (e) {
45 | print(e);
46 | }
47 | }
48 |
49 | @override
50 | void initState() {
51 | super.initState();
52 | liked = widget.issue.liked!;
53 | likes = widget.issue.likes!;
54 | }
55 |
56 | @override
57 | Widget build(BuildContext context) {
58 | return TextButton.icon(
59 | onPressed: () async {
60 | if (ref.read(loginProvider.notifier).loginType == LoginType.guest) {
61 | ScaffoldMessenger.of(context).showSnackBar(
62 | SnackBar(
63 | content: Text("Login to like and flag issues!"),
64 | ),
65 | );
66 | } else {
67 | await toggleIssueLike();
68 | }
69 | },
70 | icon: Icon(
71 | (liked) ? Icons.favorite : Icons.favorite_border_rounded,
72 | color: widget.color,
73 | ),
74 | label: Text(
75 | "$likes",
76 | style: TextStyle(
77 | color: widget.color,
78 | ),
79 | ),
80 | );
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/lib/src/components/onboarding/components/drawer_paint.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class DrawerPaint extends CustomPainter {
4 | final Color curveColor;
5 | final Paint curvePaint;
6 |
7 | DrawerPaint({
8 | this.curveColor = Colors.pink,
9 | }) : curvePaint = Paint()
10 | ..color = curveColor
11 | ..style = PaintingStyle.fill;
12 |
13 | @override
14 | void paint(Canvas canvas, Size size) {
15 | var path = Path();
16 | var diameter = size.height / 3;
17 |
18 | path.moveTo(35, 0);
19 | path.relativeCubicTo(25, diameter * 0.4, -15, diameter / 2, 0, diameter);
20 | path.relativeCubicTo(30, diameter * 0.6, -15, diameter / 2, 0, diameter);
21 | path.relativeCubicTo(35, diameter * 0.7, -80, diameter * 0.7, 0, diameter);
22 |
23 | path.lineTo(size.width, size.height);
24 | path.lineTo(size.width, 0);
25 | path.close();
26 |
27 | canvas.drawPath(path, curvePaint);
28 | }
29 |
30 | @override
31 | bool shouldRepaint(CustomPainter oldDelegate) {
32 | return true;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/src/components/onboarding/data/onboard_page_data.dart:
--------------------------------------------------------------------------------
1 | import 'package:blt/src/components/components_import.dart';
2 |
3 | List onboardData = [
4 | OnboardPageModel(
5 | Color(0xFFDC4654),
6 | Colors.white,
7 | Color(0xFFFFE074),
8 | 0,
9 | 'assets/logo_white.svg',
10 | 'INSIGHT',
11 | 'BLT',
12 | 'BLT is a bug-hunting & logging tool which allows you, the user or company to hunt for bugs, claim bug hounties and allow you to start bughunting spree/contest respectively.',
13 | ),
14 | OnboardPageModel(
15 | Colors.white,
16 | Color(0xFFDC4654),
17 | Color(0xFFE6E6E6),
18 | 1,
19 | 'assets/blt_logo.svg',
20 | 'EARN',
21 | 'POINTS',
22 | '(+1) Invite friends\n(+2) Verify other bug reports\n(+3) Fix issues on websites, apps or hardware\n(+4) Find a bug on a new site or app',
23 | ),
24 | OnboardPageModel(
25 | Color(0xFFDC4654),
26 | Colors.white,
27 | Color(0xFFE6E6E6),
28 | 2,
29 | 'assets/logo_white.svg',
30 | 'CURRENT',
31 | 'STATISTICS',
32 | '1200+ Bugs\n790+ Users\n3 Hunts\n590+ Domains',
33 | ),
34 | ];
35 |
--------------------------------------------------------------------------------
/lib/src/components/onboarding/models/onboard_page_model.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | class OnboardPageModel {
4 | final Color primeColor;
5 | final Color accentColor;
6 | final Color nextAccentColor;
7 | final int pageNumber;
8 | final String imagePath;
9 | final String caption;
10 | final String subhead;
11 | String description;
12 |
13 | OnboardPageModel(
14 | this.primeColor,
15 | this.accentColor,
16 | this.nextAccentColor,
17 | this.pageNumber,
18 | this.imagePath,
19 | this.caption,
20 | this.subhead,
21 | this.description);
22 | }
23 |
--------------------------------------------------------------------------------
/lib/src/components/searchbar.dart:
--------------------------------------------------------------------------------
1 | import 'package:blt/src/components/components_import.dart';
2 |
3 | /// The search bar of app for searching issues based on keyword.
4 | class BLTSearchDelegate extends SearchDelegate {
5 | @override
6 | List? buildActions(BuildContext context) {
7 | return [
8 | IconButton(
9 | onPressed: () {
10 | query != '' ? (query = '') : Navigator.of(context).pop();
11 | },
12 | icon: Icon(
13 | Icons.clear,
14 | color: Color(0xFFDC4654),
15 | ),
16 | ),
17 | ];
18 | }
19 |
20 | @override
21 | Widget? buildLeading(BuildContext context) {
22 | return IconButton(
23 | icon: Icon(
24 | Icons.arrow_back_ios_new_rounded,
25 | color: Color(0xFFDC4654),
26 | ),
27 | onPressed: () {
28 | Navigator.of(context).pop();
29 | },
30 | );
31 | }
32 |
33 | @override
34 | Widget buildResults(BuildContext context) {
35 | Future _getObj = IssueApiClient.searchIssueByKeyWord(query);
36 |
37 | ScrollController _scrollController = new ScrollController();
38 |
39 | return FutureBuilder(
40 | future: _getObj,
41 | builder: (context, snapshot) {
42 | if (snapshot.connectionState == ConnectionState.done) {
43 | if (snapshot.hasError) {
44 | return Center(
45 | child: Text(
46 | 'Something went wrong!',
47 | style: TextStyle(fontSize: 18),
48 | ),
49 | );
50 | } else if (snapshot.hasData) {
51 | return ListView.builder(
52 | padding: EdgeInsets.symmetric(horizontal: 20),
53 | itemCount: (snapshot.data! as IssueData).issueList!.length,
54 | controller: _scrollController,
55 | itemBuilder: (context, index) {
56 | return IssueCard(
57 | issue: (snapshot.data! as IssueData).issueList![index],
58 | );
59 | },
60 | );
61 | }
62 | }
63 | return Center(
64 | child: CircularProgressIndicator(),
65 | );
66 | },
67 | );
68 | }
69 |
70 | @override
71 | Widget buildSuggestions(BuildContext context) {
72 | final Size size = MediaQuery.of(context).size;
73 | return Container(
74 | width: size.width,
75 | height: size.height,
76 | child: Center(
77 | child: Text(
78 | 'Search an issue!',
79 | style: GoogleFonts.ubuntu(
80 | textStyle: TextStyle(
81 | color: Color(0xFF737373),
82 | fontSize: 20,
83 | ),
84 | ),
85 | ),
86 | ),
87 | );
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/lib/src/constants/about_constants.dart:
--------------------------------------------------------------------------------
1 | // Constants for the About Page
2 |
3 | final String aboutBLT =
4 | """Software code allows us to buy a gift for Mom or Dad on amazon.com in 7 seconds, watch our favorite “House of Cards” episode on Netflix or read Yelp reviews about a new restaurant.\n
5 | When we can’t access the information we’re looking for on the internet within seconds, we are not happy.
6 | \nThis is where you come into the picture.
7 | \nBLT wants you to identify the software (and hardware) bugs that delay downloads, freeze screens, create payloads that deliver malware to websites and generate other issues.""";
8 |
9 | final String forYou = '''\u2022 Points.
10 | \u2022 Money if you join a BLT Sponsored Bug Hunt.
11 | \u2022 Jackpot money listed on the Leaderboard.
12 | \u2022 Money if someone tips you for finding a bug through the tip button.
13 | \u2022 Experience to add to your résumé or portfolio.''';
14 |
15 | final String forTesters = '''1. Create a User Account to log into BLT.
16 | 2. Describe the software or hardware bug you found.
17 | 3. Attach a screenshot of the bug.
18 | 4. Submit the information.
19 | 5. Win money through company-sponsored Bug Hunts, tips or the Grand Prize/Jackpot.We may also have 'heists' where each bug is worth a specific amount based on what the company sets.
20 | 6. If you participate in BLT’s sponsored Bug Hunts, you could win prize money known as tips.''';
21 |
22 | final String forOrgs = '''
23 | We want everyone to love your website and apps.\n
24 | You want to keep your customers happy by giving them a consistent bug-free user experience.
25 | BLT offers the ability to start a bug hunt and have testers from around the world test your site.
26 | ''';
27 |
--------------------------------------------------------------------------------
/lib/src/constants/labels_constants.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | final Map labels = {
4 | 0: "General",
5 | 1: "Number error",
6 | 2: "Functional",
7 | 3: "Performance",
8 | 4: "Security",
9 | 5: "Type",
10 | 6: "Design",
11 | 7: "Server down",
12 | };
13 |
14 | // final Map labelColors = {
15 | // 0: Colors.blue.shade700,
16 | // 1: Colors.orange.shade600,
17 | // 2: Colors.purple.shade600,
18 | // 3: Colors.yellow.shade800,
19 | // 4: Colors.indigo.shade600,
20 | // 5: Colors.teal.shade700,
21 | // 6: Colors.brown.shade600,
22 | // 7: Colors.grey.shade600,
23 | // };
24 |
25 | Color getLabelColor(int index) {
26 | switch (index) {
27 | case 0:
28 | return Colors.blue.shade700;
29 | case 1:
30 | return Colors.orange.shade600;
31 | case 2:
32 | return Colors.purple.shade600;
33 | case 3:
34 | return Colors.yellow.shade800;
35 | case 4:
36 | return Colors.indigo.shade600;
37 | case 5:
38 | return Colors.teal.shade700;
39 | case 6:
40 | return Colors.brown.shade600;
41 | case 7:
42 | return Colors.grey.shade600;
43 | default:
44 | return Colors.white;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/src/constants/monthname_constants.dart:
--------------------------------------------------------------------------------
1 | final Map monthsInYear = {
2 | 1: "January",
3 | 2: "February",
4 | 3: "March",
5 | 4: "April",
6 | 5: "May",
7 | 6: "June",
8 | 7: "July",
9 | 8: "August",
10 | 9: "September",
11 | 10: "October",
12 | 11: "November",
13 | 12: "December"
14 | };
15 |
--------------------------------------------------------------------------------
/lib/src/constants/socialurls_constants.dart:
--------------------------------------------------------------------------------
1 | Map socialUrls = {
2 | "twitter": "https://twitter.com/owasp",
3 | "slack": "https://owasp.org/slack/invite",
4 | "github": "https://github.com/OWASP/BLT",
5 | "sponsor":
6 | "https://owasp.org/donate/?reponame=www-project-bug-logging-tool&title=OWASP+Bug+Logging+Tool",
7 | };
8 |
--------------------------------------------------------------------------------
/lib/src/global/functions.dart:
--------------------------------------------------------------------------------
1 | // Global functions that work throughout the app.
--------------------------------------------------------------------------------
/lib/src/global/variables.dart:
--------------------------------------------------------------------------------
1 | import 'package:blt/src/models/user_model.dart';
2 |
3 | // Global variables used throughout the app.
4 |
5 | /// The user that is currently using the app.
6 | User? currentUser;
7 |
--------------------------------------------------------------------------------
/lib/src/models/bug_hunt_model.dart:
--------------------------------------------------------------------------------
1 | class BugHunt {
2 | final int id;
3 | final String name;
4 | final String url;
5 | String? logo;
6 | String? banner;
7 | String? description;
8 | final int prize;
9 | DateTime? startsOn;
10 | DateTime? endsOn;
11 | BugHunt({
12 | required this.id,
13 | required this.name,
14 | required this.url,
15 | this.logo,
16 | this.banner,
17 | this.description,
18 | required this.prize,
19 | this.startsOn,
20 | this.endsOn,
21 | });
22 |
23 | BugHunt copyWith({
24 | int? id,
25 | String? name,
26 | String? url,
27 | String? logo,
28 | String? banner,
29 | String? description,
30 | int? prize,
31 | DateTime? startsOn,
32 | DateTime? endsOn,
33 | }) {
34 | return BugHunt(
35 | id: id ?? this.id,
36 | name: name ?? this.name,
37 | url: url ?? this.url,
38 | logo: logo ?? this.logo,
39 | banner: banner ?? this.banner,
40 | description: description ?? this.description,
41 | prize: prize ?? this.prize,
42 | startsOn: startsOn ?? this.startsOn,
43 | endsOn: endsOn ?? this.endsOn,
44 | );
45 | }
46 |
47 | factory BugHunt.fromJson(dynamic json) {
48 | return BugHunt(
49 | id: json["id"],
50 | name: json["name"] ?? "",
51 | url: json["url"] ?? "",
52 | logo: json["logo"] ?? "",
53 | banner: json["banner"] ?? "",
54 | description: json["description"] ?? "",
55 | prize: json["prize"],
56 | startsOn: (json["starts_on"] != null)
57 | ? DateTime.parse(json["starts_on"])
58 | : null,
59 | endsOn: (json["end_on"] != null)
60 | ? DateTime.parse(json["end_on"] ?? "")
61 | : null,
62 | );
63 | }
64 |
65 | static List fromSnapshot(List json) {
66 | return json.map((data) => BugHunt.fromJson(data)).toList();
67 | }
68 |
69 | @override
70 | String toString() {
71 | return 'BugHunt(id: $id, name: $name, url: $url, logo: $logo,banner:$banner,description:$description, prize: $prize, startsOn: $startsOn, endsOn: $endsOn)';
72 | }
73 |
74 | @override
75 | bool operator ==(covariant BugHunt other) {
76 | if (identical(this, other)) return true;
77 |
78 | return other.id == id &&
79 | other.name == name &&
80 | other.url == url &&
81 | other.logo == logo &&
82 | other.banner == banner &&
83 | other.description == description &&
84 | other.prize == prize &&
85 | other.startsOn == startsOn &&
86 | other.endsOn == endsOn;
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/lib/src/models/company_model.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | /// Model class for a company/domain on BLT
4 | class Company {
5 | int? id;
6 | final String companyName;
7 | String? description;
8 | String? email;
9 | String? url;
10 | String? hexcolor;
11 | String? twitter;
12 | String? facebook;
13 | int? openIssues;
14 | int? closedIssues;
15 | int? issueCount;
16 | final DateTime lastModified;
17 | final String logoLink;
18 | final String topTester;
19 | bool? isActive;
20 |
21 | Company(
22 | this.id,
23 | this.companyName,
24 | this.description,
25 | this.email,
26 | this.url,
27 | this.hexcolor,
28 | this.openIssues,
29 | this.closedIssues,
30 | this.issueCount,
31 | this.lastModified,
32 | this.logoLink,
33 | this.topTester,
34 | this.twitter,
35 | this.facebook,
36 | this.isActive,
37 | );
38 |
39 | Color? get valueColor {
40 | Color? color;
41 | try {
42 | String val = "0xFF" + this.hexcolor!.toUpperCase();
43 | int colorInt = int.parse(val);
44 | color = Color(colorInt);
45 | } catch (e) {
46 | print(e);
47 | }
48 | return color;
49 | }
50 |
51 | factory Company.fromJson(Map parsedJson) {
52 | return Company(
53 | parsedJson["id"] ?? null,
54 | parsedJson["name"],
55 | parsedJson["description"] ?? null,
56 | parsedJson["email"] ?? null,
57 | parsedJson["url"] ?? null,
58 | parsedJson["color"] ?? null,
59 | parsedJson["open"] ?? 0,
60 | parsedJson["closed"] ?? 0,
61 | parsedJson["issue_count"] ?? 0,
62 | DateTime.parse(parsedJson["modified"]),
63 | parsedJson["logo"] ?? "",
64 | parsedJson["top"] ?? "",
65 | parsedJson["twitter"],
66 | parsedJson["facebook"],
67 | parsedJson["isActive"],
68 | );
69 | }
70 |
71 | static List fromSnapshot(List json) {
72 | return json.map((data) => Company.fromJson(data)).toList();
73 | }
74 |
75 | void setMoreInfo(
76 | int id,
77 | String mail,
78 | String link,
79 | String color,
80 | ) {
81 | this.id = id;
82 | this.email = mail;
83 | this.url = link;
84 | this.hexcolor = color.substring(1);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/lib/src/models/contributors_model.dart:
--------------------------------------------------------------------------------
1 | class Contributors {
2 | final int id;
3 | final String name;
4 | final int githubId;
5 | final String githubUrl;
6 | final String image;
7 | final String type;
8 | final int contributions;
9 |
10 | Contributors({
11 | required this.id,
12 | required this.name,
13 | required this.githubId,
14 | required this.githubUrl,
15 | required this.image,
16 | required this.type,
17 | required this.contributions,
18 | });
19 |
20 | Contributors copyWith({
21 | int? id,
22 | String? name,
23 | int? githubId,
24 | String? githubUrl,
25 | String? image,
26 | String? type,
27 | int? contributions,
28 | }) {
29 | return Contributors(
30 | id: id ?? this.id,
31 | name: name ?? this.name,
32 | githubId: id ?? this.githubId,
33 | githubUrl: githubUrl ?? this.githubUrl,
34 | image: image ?? this.image,
35 | type: type ?? this.type,
36 | contributions: contributions ?? this.contributions,
37 | );
38 | }
39 |
40 | factory Contributors.fromJson(dynamic json) {
41 | return Contributors(
42 | id: json['id'],
43 | name: json['name'],
44 | githubId: json['github_id'],
45 | githubUrl: json['github_url'],
46 | image: json['avatar_url'],
47 | type: json['contributor_type'],
48 | contributions: json['contributions'],
49 | );
50 | }
51 | static List fromSnapshot(List json) {
52 | return json.map((data) => Contributors.fromJson(data)).toList();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/src/models/issuedata_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:blt/src/models/issue_model.dart';
2 |
3 | /// Model class for the paginated data sent on requesting issues.
4 | class IssueData {
5 | final int count;
6 | String? nextQuery;
7 | String? previousQuery;
8 | List? issueList;
9 |
10 | IssueData({
11 | required this.count,
12 | this.nextQuery,
13 | this.previousQuery,
14 | this.issueList,
15 | });
16 |
17 | factory IssueData.fromJson(Map responseData) {
18 | return IssueData(
19 | count: responseData["count"],
20 | nextQuery: responseData["next"],
21 | previousQuery: responseData["previous"],
22 | issueList: responseData["results"],
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/src/models/leader_model.dart:
--------------------------------------------------------------------------------
1 | class Leaders {
2 | final String id;
3 | final int rank;
4 | final String user;
5 | final int score;
6 | final String image;
7 | final int title;
8 |
9 | Leaders({
10 | required this.id,
11 | required this.rank,
12 | required this.user,
13 | required this.score,
14 | required this.image,
15 | required this.title,
16 | });
17 |
18 | factory Leaders.fromJson(Map parsedJson) {
19 | return Leaders(
20 | id: parsedJson['id'].toString(),
21 | rank: parsedJson['rank'] ?? 0,
22 | user: parsedJson['User'] ?? "",
23 | score: parsedJson['score']['total_score'] ?? 0,
24 | image: parsedJson['image']['user_avatar'] ?? "",
25 | title: parsedJson['title_type']['title'] ?? 0,
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/src/models/leaderdata_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:blt/src/models/leader_model.dart';
2 |
3 | /// Model class for the paginated data sent on requesting issues.
4 | class LeaderData {
5 | final int count;
6 | String? nextQuery;
7 | String? previousQuery;
8 | List? leaderList;
9 |
10 | LeaderData({
11 | required this.count,
12 | this.nextQuery,
13 | this.previousQuery,
14 | this.leaderList,
15 | });
16 |
17 | factory LeaderData.fromJson(Map responseData) {
18 | return LeaderData(
19 | count: responseData["count"],
20 | nextQuery: responseData["next"],
21 | previousQuery: responseData["previous"],
22 | leaderList: responseData["results"],
23 | );
24 | }
25 | }
--------------------------------------------------------------------------------
/lib/src/models/post_model.dart:
--------------------------------------------------------------------------------
1 | class SocialPosts {
2 | final String author;
3 | final userHandle;
4 | final DateTime createdAt;
5 | final String description;
6 |
7 | SocialPosts(this.author, this.userHandle, this.createdAt, this.description);
8 | }
9 |
--------------------------------------------------------------------------------
/lib/src/models/project_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:blt/src/models/contributors_model.dart';
2 |
3 | class Project {
4 | final int id;
5 | final String name;
6 | final String slug;
7 | final String description;
8 | final String github_url;
9 | String? wiki_url;
10 | String? homepage_url;
11 | String? logo_url;
12 | DateTime? created;
13 | List? contributors;
14 |
15 | Project({
16 | required this.id,
17 | required this.name,
18 | required this.slug,
19 | required this.description,
20 | required this.github_url,
21 | this.wiki_url,
22 | this.homepage_url,
23 | this.logo_url,
24 | this.created,
25 | this.contributors,
26 | });
27 |
28 | Project copyWith({
29 | int? id,
30 | String? name,
31 | String? slug,
32 | String? description,
33 | String? github_url,
34 | String? wiki_url,
35 | String? homepage_url,
36 | String? logo_url,
37 | DateTime? created,
38 | List? contributors,
39 | }) {
40 | return Project(
41 | id: id ?? this.id,
42 | name: name ?? this.name,
43 | slug: slug ?? this.slug,
44 | description: description ?? this.description,
45 | github_url: github_url ?? this.github_url,
46 | wiki_url: wiki_url ?? this.wiki_url,
47 | homepage_url: homepage_url ?? this.homepage_url,
48 | logo_url: logo_url ?? this.logo_url,
49 | created: created ?? this.created,
50 | contributors: contributors ?? this.contributors,
51 | );
52 | }
53 |
54 | factory Project.fromJson(dynamic json) {
55 | return Project(
56 | id: json["id"],
57 | name: json['name'],
58 | slug: json['slug'],
59 | description: json['description'],
60 | github_url: json['github_url'],
61 | wiki_url: json['wiki_url'] != null ? json['wiki_url'] as String : "",
62 | homepage_url:
63 | json['homepage_url'] != null ? json['homepage_url'] as String : "",
64 | logo_url: json['logo_url'] != null ? json['logo_url'] : "",
65 | created: json['created'] != null ? DateTime.parse(json['created']) : null,
66 | contributors: json['contributors'] != null
67 | ? Contributors.fromSnapshot(json['contributors'])
68 | : null,
69 | );
70 | }
71 |
72 | static List fromSnapshot(List json) {
73 | return json.map((data) => Project.fromJson(data)).toList();
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/lib/src/models/tags_model.dart:
--------------------------------------------------------------------------------
1 | class Tag {
2 | final int id;
3 | final String name;
4 | Tag({
5 | required this.id,
6 | required this.name,
7 | });
8 |
9 | Tag copyWith({
10 | int? id,
11 | String? name,
12 | }) {
13 | return Tag(
14 | id: id ?? this.id,
15 | name: name ?? this.name,
16 | );
17 | }
18 |
19 | factory Tag.fromJson(dynamic json) {
20 | return Tag(
21 | id: json["id"],
22 | name: json["name"],
23 | );
24 | }
25 |
26 | static Map toJson(Tag tag) {
27 | return {
28 | "id": tag.id,
29 | "name": tag.name,
30 | };
31 | }
32 |
33 | static List fromSnapshot(List json) {
34 | return json.map((data) => Tag.fromJson(data)).toList();
35 | }
36 |
37 | static List