Skip to content

Commit

Permalink
development
Browse files Browse the repository at this point in the history
  • Loading branch information
Shock@5678 committed Aug 11, 2024
1 parent 8b8fb60 commit 8da3162
Show file tree
Hide file tree
Showing 206 changed files with 17,463 additions and 6,755 deletions.
63 changes: 39 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,46 @@ samples, guidance on mobile development, and a full API reference.

## Project Structure

This project follows MVVM architecture with following structure:
This project follows Clean architecture with following structure:

```bash
beacon/lib/
├── components/ # Shared Components such as dialog boxes, button, and other shared widgets
├── enums/ # enum files
| └── view_state.dart # defines view states i.e Idle, Busy, Error
├── models/ # model classes: group, beacon, location, landmark, user
├── queries/ # includes all graphql query strings
├── services/ # services
| ├── database_mutation_function.dart/ # Graphql Queries implementations
| ├── navigation_service.dart/ # All required navigation services
| └── ... # all config files
├── utilities/ # Utilities that includes constants file
├── views/ # Views/UI layer
| ├── auth_screen.dart
| ├── base_view.dart
| ├── hike_screen.dart
| ├── group_screen.dart
| ├── home.dart
├── viewmodels/ # Viewmodels layer
├── splash_screen.dart # Very first screen displayed whilst data is loading
├── router.dart # All routes to ease navigation
├── locator.dart # dependency injection using get_it
├── main.dart # <3 of the app
beacon/
├── lib/
│ ├── config/ # Configuration files
│ ├── core/ # Core application logic
│ ├── data/
│ │ ├── datasources/
│ │ │ ├── local/ # Local data sources
│ │ │ └── remote/ # Remote data sources
│ │ ├── models/ # Data models
│ │ └── repositories/ # Data repositories
│ ├── domain/
│ │ ├── entities/ # Domain entities
│ │ ├── repositories/ # Domain repositories
│ │ └── usecases/ # Domain use cases
│ ├── presentation/
│ │ ├── auth/
│ │ │ ├── cubit/ # Authentication Cubit
│ │ │ ├── widget/ # Authentication widgets
│ │ │ └── screen/ # Authentication screens
│ │ ├── home/
│ │ │ ├── cubit/ # Home Cubit
│ │ │ ├── widget/ # Home widgets
│ │ │ └── screen/ # Home screens
│ │ ├── group/
│ │ │ ├── cubit/ # Group Cubit
│ │ │ ├── widget/ # Group widgets
│ │ │ └── screen/ # Group screens
│ │ ├── hike/
│ │ │ ├── cubit/ # Hike Cubit
│ │ │ ├── widget/ # Hike widgets
│ │ │ └── screen/ # Hike screens
│ │ ├── widgets/ # Shared widgets used across all presentation folders
│ │ └── splash_screen.dart # Initial screen displayed while loading
├── main.dart # App entry point
├── theme/ # Theme configurations
├── locator.dart # Dependency injection setup (using get_it)
├── router.dart # App navigation routes
```

## Screenshots
Expand All @@ -84,4 +99,4 @@ If you found any bugs, consider opening an [issue](https://github.com/CCExtracto

We would love to hear from you! You may join gsoc-beacon channel of CCExtractor community through slack:

[![Slack](https://img.shields.io/badge/chat-on_slack-purple.svg?style=for-the-badge&logo=slack)](https://ccextractor.org/public/general/support/)
[![Slack](https://img.shields.io/badge/chat-on_slack-purple.svg?style=for-the-badge&logo=slack)](https://ccextractor.org/public/general/support/)
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply from: project(':flutter_config').projectDir.getPath() + "/dotenv.gradle"

android {
compileSdkVersion 33
compileSdkVersion 34
buildToolsVersion '29.0.0'

sourceSets {
Expand Down
25 changes: 12 additions & 13 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.beacon">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<application

<application
android:label="Beacon"
android:icon="@mipmap/launcher_icon"
android:usesCleartextTraffic="true">

<meta-data android:name="com.google.android.geo.API_KEY" android:value="@string/ANDROID_MAP_API_KEY"/>

<activity
android:name="io.flutter.embedding.android.FlutterActivity"
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:supportsPictureInPicture="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->

<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand All @@ -45,8 +45,7 @@
<data android:scheme="https" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->

<meta-data
android:name="flutterEmbedding"
android:value="2" />
Expand Down
47 changes: 46 additions & 1 deletion android/app/src/main/kotlin/com/example/beacon/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
package com.example.beacon

import android.app.PictureInPictureParams
import android.os.Build
import android.util.Rational
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel

class MainActivity: FlutterActivity() {
class MainActivity : FlutterActivity() {
private val CHANNEL = "com.example.beacon/pip"
private var shouldEnterPipMode = false

override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler { call, result ->
when (call.method) {
"switchPIPMode"->{
shouldEnterPipMode = true
result.success(null)
}
"enablePIPMode" -> {
shouldEnterPipMode = true
result.success(null)
}
"disablePIPMode" -> {
shouldEnterPipMode = false
result.success(null)
}
else -> result.notImplemented()
}
}
}

override fun onUserLeaveHint() {
super.onUserLeaveHint()
if (shouldEnterPipMode) {
enterPIPMode()
}
}

private fun enterPIPMode() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val aspectRatio = Rational(16, 9)
val pipParams = PictureInPictureParams.Builder()
.setAspectRatio(aspectRatio)
.build()
enterPictureInPictureMode(pipParams)
}
}
}
Binary file added images/filter_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
16 changes: 8 additions & 8 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,22 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_config: f48f0d47a284f1791aacce2687eabb3309ba7a41
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265
geolocator_apple: 9157311f654584b9bb72686c55fc02a97b73f461
google_maps_flutter_ios: 590249c67f34f422122c232f2a626192adbc78ee
google_maps_flutter_ios: d1318b4ff711612cab16862d7a87e31a7403d458
GoogleMaps: 025272d5876d3b32604e5c080dc25eaf68764693
location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740
location: d5cf8598915965547c3f36761ae9cc4f4e87d22e
modal_progress_hud_nsn: f6fb744cd060653d66ed8f325360ef3650eb2fde
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011

COCOAPODS: 1.14.2
COCOAPODS: 1.15.2
8 changes: 4 additions & 4 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -361,7 +361,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -438,7 +438,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -487,7 +487,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
58 changes: 0 additions & 58 deletions lib/Bloc/config/graphql_config.dart

This file was deleted.

12 changes: 0 additions & 12 deletions lib/Bloc/config/user_config.dart

This file was deleted.

30 changes: 0 additions & 30 deletions lib/Bloc/core/constants/location.dart

This file was deleted.

Loading

0 comments on commit 8da3162

Please sign in to comment.