Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡Development final merge for Demo 4 #364

Merged
merged 17 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions BeakPeek/linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Generated file. Do not edit.
//

// clang-format off

#include "generated_plugin_registrant.h"

#include <url_launcher_linux/url_launcher_plugin.h>
#include <window_to_front/window_to_front_plugin.h>

void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
g_autoptr(FlPluginRegistrar) window_to_front_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowToFrontPlugin");
window_to_front_plugin_register_with_registrar(window_to_front_registrar);
}
15 changes: 15 additions & 0 deletions BeakPeek/linux/flutter/generated_plugin_registrant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Generated file. Do not edit.
//

// clang-format off

#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_

#include <flutter_linux/flutter_linux.h>

// Registers Flutter plugins.
void fl_register_plugins(FlPluginRegistry* registry);

#endif // GENERATED_PLUGIN_REGISTRANT_
25 changes: 25 additions & 0 deletions BeakPeek/linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Generated file, do not edit.
#

list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_linux
window_to_front
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
)

set(PLUGIN_BUNDLED_LIBRARIES)

foreach(plugin ${FLUTTER_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)

foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)
24 changes: 24 additions & 0 deletions BeakPeek/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// Generated file. Do not edit.
//

import FlutterMacOS
import Foundation

import device_info_plus
import flutter_web_auth_2
import geolocator_apple
import path_provider_foundation
import sqflite
import url_launcher_macos
import window_to_front

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FlutterWebAuth2Plugin.register(with: registry.registrar(forPlugin: "FlutterWebAuth2Plugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
WindowToFrontPlugin.register(with: registry.registrar(forPlugin: "WindowToFrontPlugin"))
}
11 changes: 11 additions & 0 deletions BeakPeek/macos/Flutter/ephemeral/Flutter-Generated.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=D:\flutterSDK\flutter
FLUTTER_APPLICATION_PATH=E:\BeakPeek\BeakPeek
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=0.3.8
FLUTTER_BUILD_NUMBER=1
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json
12 changes: 12 additions & 0 deletions BeakPeek/macos/Flutter/ephemeral/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=D:\flutterSDK\flutter"
export "FLUTTER_APPLICATION_PATH=E:\BeakPeek\BeakPeek"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=0.3.8"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,28 @@

<h2 id="demos"> Demos</h2>

[![Demo 2](https://img.youtube.com/vi/LUgWIDLSAU8/0.jpg)](https://youtu.be/LUgWIDLSAU8)
[![Demo 2](https://img.youtube.com/vi/BeQJ7puoda4/0.jpg)](https://youtu.be/BeQJ7puoda4)

<h2 href="">System Requirement Specification</h2>
<a href="https://github.com/COS301-SE-2024/BeakPeek/wiki/SRS-v1" > SRSv1 </a>
<a href="https://github.com/COS301-SE-2024/BeakPeek/wiki/SRS-v2" > SRSv2 </a>
<a href="https://github.com/COS301-SE-2024/BeakPeek/wiki/SRS-v3" > SRSv3 </a>
<a href="https://github.com/COS301-SE-2024/BeakPeek/wiki/SRS-v4" > SRSv4 </a>

<h2 href="">Code Quality</h2>
<a href="doc/Installation/Installation_Manual.pdf" > Code Quality </a>
<a href="doc/Code_Qaulity/CodeQaulity.pdf" >Code Quality</a>

<h2 href=""> Installation Manual </h2>

<a href="doc/Code_Qaulity/CodeQaulity.pdf" > Installation Manual </a>
<a href="doc/Installation/Installation_Manual.pdf" >Installation Manual</a>

<h2 href="">User Manual</h2>

<a href="doc/Manuals/UserManual.pdf" >User Manual</a>

<h2 href=""> SRS </h2>

<a href="doc/SRS_SoftwareRequirementSpecification/SRS v2.pdf" > SRSv2 pdf</a>
<a href="doc/SRS_SoftwareRequirementSpecification/SRS v4.pdf" > SRSv4 pdf</a>
</div>

<h2>🤝Team</h2>
Expand Down
93 changes: 0 additions & 93 deletions beakpeek/assets/BirdList/allbirds.json
Original file line number Diff line number Diff line change
Expand Up @@ -26379,39 +26379,6 @@
"Records": 13,
"Cards": 1651
},
{
"ref": 974,
"common_group": "Duck",
"common_species": "Hybrid Red/Yellow-billed",
"genus": "Anas",
"species": "erythroryncha/undulata",
"full_Protocol_RR": 0.0039,
"full_Protocol_Number": 13,
"latest_FP": "2024-06-10T00:00:00",
"image_Url": null,
"info": null,
"provinces": [
"easterncape",
"freestate",
"gauteng",
"westerncape"
],
"Jan": 1.5,
"Feb": 0.0,
"Mar": 0.0,
"Apr": 0.5,
"May": 0.7,
"Jun": 0.0,
"Jul": 0.6,
"Aug": 0.5,
"Sep": 0.0,
"Oct": 0.4,
"Nov": 1.0,
"Dec": 0.4,
"reportingRate": 0.5,
"Records": 12,
"Cards": 2373
},
{
"ref": 977,
"common_group": "Boubou",
Expand Down Expand Up @@ -27628,36 +27595,6 @@
"Records": 1899,
"Cards": 6028
},
{
"ref": 1236,
"common_group": "Spurfowl",
"common_species": "Yellow-necked",
"genus": "Pternistis",
"species": "leucoscepus",
"full_Protocol_RR": 0.0003,
"full_Protocol_Number": 1,
"latest_FP": "2020-03-05T00:00:00",
"image_Url": "https://beakpeekstorage.blob.core.windows.net/bird-images/1236_Yellow-necked_Spurfowl.jpg",
"info": "The yellow-necked spurfowl or yellow-necked francolin is a species of bird in the family Phasianidae. It is found in Djibouti, Eritrea, Ethiopia, Kenya, Somalia, Sudan, Tanzania, and Uganda. This species is named for the yellow patch found on its neck. Males of this species have been noted to have spurs on the back of their legs.",
"provinces": [
"gauteng"
],
"Jan": 0.0,
"Feb": 0.0,
"Mar": 0.4,
"Apr": 0.0,
"May": 0.0,
"Jun": 0.0,
"Jul": 0.0,
"Aug": 0.0,
"Sep": 0.0,
"Oct": 0.0,
"Nov": 0.0,
"Dec": 0.0,
"reportingRate": 0.0,
"Records": 1,
"Cards": 3528
},
{
"ref": 1276,
"common_group": "Teal",
Expand Down Expand Up @@ -29744,36 +29681,6 @@
"Records": 1565,
"Cards": 56734
},
{
"ref": 10019,
"common_group": "Parrot",
"common_species": "Budgerigar",
"genus": "Melopsittacus",
"species": "undulatus",
"full_Protocol_RR": 0.0003,
"full_Protocol_Number": 1,
"latest_FP": "2012-04-08T00:00:00",
"image_Url": null,
"info": null,
"provinces": [
"gauteng"
],
"Jan": 0.0,
"Feb": 0.0,
"Mar": 0.0,
"Apr": 0.4,
"May": 0.0,
"Jun": 0.0,
"Jul": 0.0,
"Aug": 0.0,
"Sep": 0.0,
"Oct": 0.0,
"Nov": 0.0,
"Dec": 0.0,
"reportingRate": 0.0,
"Records": 1,
"Cards": 3528
},
{
"ref": 10020,
"common_group": "Duck",
Expand Down
Binary file added beakpeek/assets/Legal/UserManual.pdf
Binary file not shown.
1 change: 0 additions & 1 deletion beakpeek/lib/Controller/DB/life_list_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'dart:convert';

import 'package:beakpeek/Model/BirdInfo/bird.dart';
import 'package:beakpeek/Model/BirdInfo/province_data.dart';
import 'package:beakpeek/Model/UserProfile/achievment_list.dart';
import 'package:beakpeek/Model/UserProfile/user_model.dart';
import 'package:beakpeek/config_azure.dart';
import 'package:http/http.dart';
Expand Down
43 changes: 21 additions & 22 deletions beakpeek/lib/Model/UserProfile/achievment_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,26 @@
final LifeListProvider lifelist = LifeListProvider.instance;
final List<Bird> birdsLife = await lifelist.fetchLifeList();
for (Bird bird in birdsLife) {
await updateLifeListAchievments(bird.commonGroup);
switch (bird.commonGroup.toLowerCase()) {
case 'weaver':
await updateAchievmentProgressBirds('Weaver Believer', 'Weaver');

Check warning on line 79 in beakpeek/lib/Model/UserProfile/achievment_list.dart

View check run for this annotation

Codecov / codecov/patch

beakpeek/lib/Model/UserProfile/achievment_list.dart#L77-L79

Added lines #L77 - L79 were not covered by tests
break;
case 'duck':
await updateAchievmentProgressBirds('Duck Hunter', 'Duck');

Check warning on line 82 in beakpeek/lib/Model/UserProfile/achievment_list.dart

View check run for this annotation

Codecov / codecov/patch

beakpeek/lib/Model/UserProfile/achievment_list.dart#L81-L82

Added lines #L81 - L82 were not covered by tests
break;
case 'eagle':
await updateAchievmentProgressBirds('USA', 'Eagle');

Check warning on line 85 in beakpeek/lib/Model/UserProfile/achievment_list.dart

View check run for this annotation

Codecov / codecov/patch

beakpeek/lib/Model/UserProfile/achievment_list.dart#L84-L85

Added lines #L84 - L85 were not covered by tests
break;
case 'kingfisher':
await updateAchievmentProgressBirds('Fisherman', 'Kingfisher');

Check warning on line 88 in beakpeek/lib/Model/UserProfile/achievment_list.dart

View check run for this annotation

Codecov / codecov/patch

beakpeek/lib/Model/UserProfile/achievment_list.dart#L87-L88

Added lines #L87 - L88 were not covered by tests
break;
case 'hawk':
await updateAchievmentProgressBirds('Hawk Spotter', 'Hawk');

Check warning on line 91 in beakpeek/lib/Model/UserProfile/achievment_list.dart

View check run for this annotation

Codecov / codecov/patch

beakpeek/lib/Model/UserProfile/achievment_list.dart#L90-L91

Added lines #L90 - L91 were not covered by tests
break;
case 'heron':
await updateAchievmentProgressBirds('Heron Horror', 'Heron');

Check warning on line 94 in beakpeek/lib/Model/UserProfile/achievment_list.dart

View check run for this annotation

Codecov / codecov/patch

beakpeek/lib/Model/UserProfile/achievment_list.dart#L93-L94

Added lines #L93 - L94 were not covered by tests
break;
}
await updateProvinces(bird.id);
}

Expand Down Expand Up @@ -120,27 +139,7 @@
}

Future<void> updateLifeListAchievments(String commonGroup) async {
switch (commonGroup.toLowerCase()) {
case 'weaver':
await updateAchievmentProgressBirds('Weaver Believer', 'Weaver');
break;
case 'duck':
await updateAchievmentProgressBirds('Duck Hunter', 'Duck');
break;
case 'eagle':
await updateAchievmentProgressBirds('USA', 'Eagle');
break;
case 'kingfisher':
await updateAchievmentProgressBirds('Fisherman', 'Kingfisher');
break;
case 'hawk':
await updateAchievmentProgressBirds('Hawk Spotter', 'Hawk');
break;
case 'heron':
await updateAchievmentProgressBirds('Heron Horror', 'Heron');

break;
}

}

Future<void> updateProvinces(int id) async {
Expand Down
4 changes: 3 additions & 1 deletion beakpeek/lib/View/Achievements/achievements_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class AchievementsPageState extends State<AchievementsPage> {
style: GlobalStyles.smallHeadingPrimary(context)),
centerTitle: true,
actions: const [
HelpIcon(content: '*implement achievements page help*'),
HelpIcon(
content:
'Follow the instructions to get the achievement! \n\nThis will earn you some profile experience points and helps you unlock ultimate bragging rights.'),
SizedBox(width: 14.0)
],
),
Expand Down
2 changes: 1 addition & 1 deletion beakpeek/lib/View/Home/Searching/filterable_searchbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class _FilterableSearchbarState extends State<FilterableSearchbar> {
padding: EdgeInsets.only(left: screenWidth * 0.02),
child: const HelpIcon(
content:
'''Type in the common name, group or genus of a bird and see all the results. You can tap on a result to see that birds information.'''),
'''Type in the common name, group or genus of a bird and see all the results. \n\nYou can tap on a result to see that birds information.'''),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion beakpeek/lib/View/Settings/edit_user_profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class _EditUserProfileState extends State<EditUserProfile> {
onPressed: () {
storeUserLocally(user);
updateOnline();
context.goNamed('home');
context.goNamed('profile');
},
style: GlobalStyles.buttonPrimaryFilled(context),
child: Text(
Expand Down
9 changes: 8 additions & 1 deletion beakpeek/lib/View/Settings/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ class SettingsPageState extends State<SettingsPage> {
document = await PDFDocument.fromAsset('assets/Legal/combinepdf.pdf');
}

void loadPDfU() async {
document = await PDFDocument.fromAsset('assets/Legal/UserManual.pdf');
setState(() {
viewTandC = true;
});
}

@override
void initState() {
loadPDf();
Expand Down Expand Up @@ -119,7 +126,7 @@ class SettingsPageState extends State<SettingsPage> {
Icons.help_outline,
Icons.arrow_forward_ios,
() {
// Handle Help & Support tap
loadPDfU();
},
),
_buildOptionTile(
Expand Down
Loading
Loading