Skip to content

Commit

Permalink
Sprint 3 Release - Flutter (#128)
Browse files Browse the repository at this point in the history
This is the release for the Sprint 3

---------

Co-authored-by: David Santiago Ortiz Almanza <69651671+SnowArtz@users.noreply.github.com>
Co-authored-by: Gotty <78111224+iGotty@users.noreply.github.com>
Co-authored-by: SnowArtz <ds.ortiz@uniandes.edu.co>
  • Loading branch information
4 people authored Apr 27, 2024
1 parent fb82f59 commit dfec1e6
Show file tree
Hide file tree
Showing 148 changed files with 5,257 additions and 2,623 deletions.
12 changes: 11 additions & 1 deletion .idea/Flutter.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 29 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,40 @@ The UniSchedule app follows a layered architecture pattern to ensure a clean sep

The `lib` directory of this repository is organized into several subdirectories, each serving a specific purpose:

- `constants`: Contains constant values used throughout the application.
- `models`: Defines Dart classes representing data models used within the application.
- `presentation`: Houses UI-related files, including widgets, screens, and components responsible for rendering the user interface.
- `providers`: Contains files defining providers for state management using the Riverpod or Provider package.
- `repositories`: Includes classes responsible for abstracting data access and manipulation operations.
- `routes`: Defines the routing configuration of the application for navigation between different screens.
- `services`: Contains utility classes or service classes responsible for performing specific tasks or providing functionalities used across multiple parts of the application.
- `constants/`: Contains constant values used throughout the application.
- `colors/`: Defines color constants used for theming and styling.
- `http/`: Contains constants related to HTTP requests and responses.
- `strings/`: Defines string constants used for routing, assets, storage and text display.
- `styles/`: Contains sizes, padding, font, and other styling constants.
- `themes/`: Contains theme constants used for styling the application.
- `types/`: Defines type constants used for data validation and conversion.
- `models/`: Defines Dart classes representing data models used within the application.
- `providers/`: Contains files defining providers for state management using the Riverpod package.
- `repositories/`: Includes classes responsible for abstracting data access and manipulation operations.
- `routes/`: Defines the routing configuration of the application for navigation between different screens.
- `services/`: Contains utility classes or service classes responsible for performing specific tasks or providing functionalities used across multiple parts of the application.
- `local_authentication/`: Contains classes related to local authentication using biometrics or PIN.
- `local_storage/`: Contains classes related to local storage and data persistence.
- `network/`: Contains classes related to network requests and API communication.
- `notifications/`: Contains classes related to notifications and reminders.
- `utils/`: Contains utility functions and helper classes used throughout the application.
- `views/`: Houses UI-related files, including widgets, screens, and components responsible for rendering the user interface.
- `widgets/`: Contains reusable widgets that can be used across multiple screens or components.
- `main.dart`: The entry point of the application, where the Flutter app is initialized and run.

## Troubleshooting

We use files auto-generated by @riverpod and @freezer annotations. To build these files, run `flutter pub run build_runner build`
To authenticate with Firebase, you need to execute the following commands:

1. `npm install -g firebase-tools`
2. `firebase login`
3. `dart pub global activate flutterfire_cli`
4. `flutterfire configure`

We use files auto-generated by @riverpod and @freezer annotations. To build these files, run `dart run build_runner watch`

If the dependency `flutter_datetime_picker` throws `Error: 'DatePickerTheme' is imported from both ...`, follow these steps:

1. Go to the dependency's file that throws this error - in windows, a path similar to `C:\Users\User\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_datetime_picker-1.5.1\lib\flutter_datetime_picker.dart`)
1. Go to the dependency's file that throws this error - in windows, a path similar to `C:\Users\User\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_datetime_picker-1.5.1\lib\flutter_datetime_picker.dart`
2. Replace `import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart` with `import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart' as dpt`
3. Replace all references to `DatePickerTheme` in the file with `dpt.DatePickerTheme` with a code editor
5 changes: 5 additions & 0 deletions unischedule/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -478,3 +478,8 @@ ios/Podfile
# freezer
**/*.g.dart
**/*.freezed.dart

# Firebase
ios/Runner/GoogleService-Info.plist
android/app/google-services.json
lib/firebase_options.dart
9 changes: 0 additions & 9 deletions unischedule/README.md

This file was deleted.

26 changes: 2 additions & 24 deletions unischedule/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
avoid_print: false
prefer_single_quotes: true
19 changes: 18 additions & 1 deletion unischedule/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
}
}

plugins {
id "com.android.application"
// START: FlutterFire Configuration
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
// END: FlutterFire Configuration
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
Expand All @@ -24,10 +34,12 @@ if (flutterVersionName == null) {

android {
namespace "com.example.unischedule"
compileSdk 34
compileSdkVersion 34
ndkVersion flutter.ndkVersion

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand All @@ -49,6 +61,7 @@ android {
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}

buildTypes {
Expand All @@ -64,4 +77,8 @@ flutter {
source '../..'
}

dependencies {}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
implementation 'androidx.window:window:1.0.0'
implementation 'androidx.window:window-java:1.0.0'
}
40 changes: 30 additions & 10 deletions unischedule/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
<uses-permission android:name="android.permission.USE_EXACT_ALARM"/>
<uses-permission
android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission
android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
<uses-permission
android:name="android.permission.USE_EXACT_ALARM"/>
<uses-permission
android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission
android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission
android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<application
android:label="unischedule"
android:label="UniSchedule"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver" />
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait"> <!-- Línea agregada para bloquear la orientación en modo retrato -->
android:windowSoftInputMode="adjustResize">
<!-- Línea agregada para bloquear la orientación en modo retrato -->
<!-- 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"
/>
android:resource="@style/NormalTheme"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand All @@ -32,6 +52,6 @@
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
android:value="2"/>
</application>
</manifest>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Generated file.
//
// If you wish to remove Flutter's multidex support, delete this entire file.
//
// Modifications to this file should be done in a copy under a different name
// as this file may be regenerated.

package io.flutter.app;

import android.app.Application;
import android.content.Context;
import androidx.annotation.CallSuper;
import androidx.multidex.MultiDex;

/**
* Extension of {@link android.app.Application}, adding multidex support.
*/
public class FlutterMultiDexApplication extends Application {
@Override
@CallSuper
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified unischedule/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified unischedule/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified unischedule/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified unischedule/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions unischedule/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
// START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.3.15" apply false
id "com.google.firebase.crashlytics" version "2.8.1" apply false
// END: FlutterFire Configuration
}

include ":app"
Binary file added unischedule/assets/app-icon/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added unischedule/assets/images/profile_pics/user_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added unischedule/assets/images/profile_pics/user_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added unischedule/assets/images/profile_pics/user_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added unischedule/assets/images/profile_pics/user_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added unischedule/assets/images/profile_pics/user_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added unischedule/assets/images/profile_pics/user_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added unischedule/assets/images/profile_pics/user_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added unischedule/assets/images/profile_pics/user_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions unischedule/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"flutter":{"platforms":{"android":{"default":{"projectId":"unischedule-5ee93","appId":"1:614954118651:android:4b50d1ecd0781bda1fef5e","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"unischedule-5ee93","appId":"1:614954118651:ios:e948c08a9dbe9b721fef5e","uploadDebugSymbols":true,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"unischedule-5ee93","configurations":{"android":"1:614954118651:android:4b50d1ecd0781bda1fef5e","ios":"1:614954118651:ios:e948c08a9dbe9b721fef5e"}}}}}}
41 changes: 41 additions & 0 deletions unischedule/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
212F9EFD3C24A745A680163E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C8B6C909D74EDDF23ABA09B7 /* GoogleService-Info.plist */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
Expand Down Expand Up @@ -64,6 +65,7 @@
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9CB66791FCD59F8464BDE979 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
C232529B9C1F18F0D1321317 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C8B6C909D74EDDF23ABA09B7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
E35840C25D672244A444F149 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -138,6 +140,7 @@
331C8082294A63A400263BE5 /* RunnerTests */,
497B42535C75A6EFD09942F8 /* Pods */,
4699FFDD93AB6234931D2A03 /* Frameworks */,
C8B6C909D74EDDF23ABA09B7 /* GoogleService-Info.plist */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -199,6 +202,8 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
6B3609A1E4D42976BBBCA800 /* [CP] Embed Pods Frameworks */,
E70E7DB617D5A4315D3D8059 /* [CP] Copy Pods Resources */,
E47053347E214B28236D4070 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
);
buildRules = (
);
Expand Down Expand Up @@ -264,6 +269,7 @@
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
212F9EFD3C24A745A680163E /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -362,6 +368,41 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E47053347E214B28236D4070 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
};
E70E7DB617D5A4315D3D8059 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit dfec1e6

Please sign in to comment.