110 Commits
Max ... master

Author SHA1 Message Date
clopezr1
54b4279f40 Merge pull request #24 from allemangD/hotFix
small fixes
2020-05-03 16:05:12 -04:00
Carlos Lopez-Rosario
d06641ea62 small fixes 2020-05-03 16:02:13 -04:00
clopezr1
9083aadffe Merge pull request #23 from allemangD/hotFix
small fixes
2020-05-03 14:46:03 -04:00
Carlos Lopez-Rosario
3c5a8d9b4d small fixes 2020-05-03 14:42:42 -04:00
clopezr1
9fb45ee409 Merge pull request #22 from allemangD/game_details_buttons
Constant Game Daitais for fluff
2020-05-03 14:07:58 -04:00
Carlos Lopez-Rosario
27963dfc98 Constant Game Daitais for fluff 2020-05-03 14:03:33 -04:00
clopezr1
d4c4a7836c Merge pull request #21 from allemangD/Chat
Chat
2020-05-03 13:12:59 -04:00
Carlos Lopez-Rosario
f5d4da9ccd Signed in as guest 2020-05-03 12:59:17 -04:00
Carlos Lopez-Rosario
68460c8b20 CHATTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT 2020-05-03 03:25:59 -04:00
Carlos Lopez-Rosario
203bb03464 added args to chat, and game cards can take you there too 2020-05-02 20:36:01 -04:00
Carlos Lopez-Rosario
bd53761736 re-worked the game details page tabs 2020-05-02 19:44:46 -04:00
Carlos Lopez-Rosario
8d2477f3e7 re-worked the game details page Score section 2020-05-02 19:03:09 -04:00
Carlos Lopez-Rosario
52ef1c279a re-added route to game details page 2020-05-02 18:47:01 -04:00
Carlos Lopez-Rosario
1e9a2cf908 Changed how sports page is made to be able to scroll all the way down 2020-05-02 18:34:43 -04:00
Carlos Lopez-Rosario
2390b65922 Fixed Game Card Text 2020-05-02 18:21:41 -04:00
Carlos Lopez-Rosario
83abdf1fa1 Reworked How the Game Cards are made 2020-05-02 18:04:33 -04:00
Carlos Lopez-Rosario
5a8ab5f5e5 Each card takes you to a details page 2020-05-01 21:07:36 -04:00
Carlos Lopez-Rosario
fbd256847a Merge remote-tracking branch 'origin/master' into game_details_buttons 2020-05-01 17:37:15 -04:00
clopezr1
330604f43e Merge pull request #20 from allemangD/SportPageCards
Sport page cards
2020-05-01 15:51:09 -04:00
Carlos Lopez-Rosario
c2d376b2b5 GREEN 2020-05-01 13:59:06 -04:00
Carlos Lopez-Rosario
0d95b66960 Vertical Articles for sport Page 2020-05-01 13:25:45 -04:00
Carlos Lopez-Rosario
0c1158c27b All green 2020-05-01 11:22:55 -04:00
Carlos Lopez-Rosario
465eb96f4b logic for game card 2020-05-01 11:19:17 -04:00
Carlos Lopez-Rosario
78049ba65f Merge remote-tracking branch 'origin/master' into SportPageCards
# Conflicts:
#	lib/monthly_calendar.dart
#	lib/screens/sport.dart
2020-05-01 02:48:20 -04:00
Carlos Lopez-Rosario
a2950f6997 logic for game card 2020-05-01 02:45:54 -04:00
clopezr1
7ae5c3a3bc Merge pull request #18 from allemangD/Standings
Standings
2020-04-30 22:16:13 -04:00
Carlos Lopez-Rosario
f71bd6ad21 logic for game card 2020-04-30 21:19:23 -04:00
2209d1b992 missed a piece in the merge 2020-04-30 20:31:01 -04:00
dd0456299c Merge branch 'filter-sport-articles' into Standings 2020-04-30 20:29:45 -04:00
3e0efc8aff fix sport page articles bug 2020-04-30 20:27:17 -04:00
a21b86bf78 show standings in a table 2020-04-30 20:24:59 -04:00
clopezr1
b59f136ea0 Merge pull request #16 from allemangD/filter-sport-articles
filter article list to only contain correct sports
2020-04-30 18:53:44 -04:00
79886504ae filter article list to only contain correct sports 2020-04-30 17:18:15 -04:00
kconnel7
4d66b774fb Standings - No table currently / Future Builder works but has an error (RenderFlex children have non-zero flex but incoming height constraints are unbounded.) 2020-04-30 10:50:35 -04:00
kconnel7
b02efa9cc8 Standings - Conditioning on type of standings based on sport 2020-04-30 05:13:32 -04:00
kconnel7
9fc67ee039 Standings - Layout to standings table 2020-04-30 03:18:06 -04:00
kconnel7
015fbd9dc9 Standings - Conditioning to find sport urls 2020-04-29 23:18:09 -04:00
kconnel7
18c8ed39f4 Standings 2020-04-29 22:32:14 -04:00
kconnel7
c6d811331d Monthly Calendar - All Sports work & Changed layout to look better 2020-04-25 16:10:26 -04:00
clopezr1
7ba8fcb09c selected is gold 2020-04-23 18:22:36 -04:00
clopezr1
3a8397b89e Calendar shows what sport, and little box for games with more than 1 game 2020-04-23 17:49:34 -04:00
clopezr1
d8de898a5a Merge pull request #15 from allemangD/RoutesWithArguments
Routes with arguments
2020-04-23 16:49:08 -04:00
clopezr1
fe3b69f350 Tennis Fix 2020-04-23 16:32:29 -04:00
clopezr1
ff26f31dc8 Color of Mini indicator is Based on location 2020-04-23 16:22:33 -04:00
clopezr1
74aa580f28 says day on events 2020-04-23 15:10:14 -04:00
clopezr1
5bc25f8074 The event notification now appears over the entire date instead of mini 2020-04-23 15:08:49 -04:00
kconnel7
8cf18dec0a Monthly Calendar - Softball, Volleyball, Men/Women Tennis Works 2020-04-22 18:38:54 -04:00
kwainright
3f87598680 updated play-by-play details page to give button press functionality for the navigation buttons. 2020-04-22 18:26:54 -04:00
Carlos Lopez-Rosario
273a738fe0 no more calendar global use 2020-04-18 11:10:59 -04:00
Carlos Lopez-Rosario
39912bd37e Sports page passes game ID to Schedule/Calendar properly and generates correct calendar 2020-04-18 11:10:13 -04:00
Carlos Lopez-Rosario
9e3541c119 Gender Switch now properly appears on the correct sports and changes the sport ID properly 2020-04-18 10:37:40 -04:00
Carlos Lopez-Rosario
b3fb054c45 Route to sports takes an argument and goes to proper sport 2020-04-17 14:02:30 -04:00
clopezr1
99cff9ac7a Merge pull request #14 from allemangD/monthly_calendar_images
Monthly calendar images
2020-04-10 16:17:43 -04:00
clopezr1
aa644854ad Merge Master 2020-04-10 16:15:06 -04:00
clopezr1
368fe98cfb Merge remote-tracking branch 'origin/master' into monthly_calendar_images
# Conflicts:
#	ios/Runner.xcodeproj/project.pbxproj
2020-04-10 16:10:35 -04:00
kconnel7
4c54a49f7c Monthly Calendar - opponent logo in event lister 2020-04-10 16:03:06 -04:00
8d36817baf Merge pull request #13 from allemangD/standings
Standings
2020-04-10 15:09:16 -04:00
Carlos Lopez-Rosario
6baa2343fe Merge remote-tracking branch 'origin/master' into standings
# Conflicts:
#	pubspec.lock
#	pubspec.yaml
2020-04-10 15:02:22 -04:00
42ae729c04 Merge pull request #12 from allemangD/game_details_offNavigation
Game details off navigation
2020-04-10 15:00:30 -04:00
Carlos Lopez-Rosario
f3f44e7108 Merge remote-tracking branch 'origin/master' into game_details_offNavigation
# Conflicts:
#	lib/route_generator.dart
#	pubspec.lock
2020-04-10 14:52:04 -04:00
kwainright
76120de1dc Merge pull request #11 from allemangD/monthly_calendar_route
Monthly calendar route
2020-04-10 14:38:10 -04:00
Carlos Lopez-Rosario
f6927245fd 90 -> 89 cause android sized screamed 2020-04-10 14:30:50 -04:00
Carlos Lopez-Rosario
ece7c61d03 Merge remote-tracking branch 'origin/master' into monthly_calendar_route
# Conflicts:
#	pubspec.lock
2020-04-10 14:23:38 -04:00
clopezr1
11fb6d3327 Merge pull request #10 from allemangD/Twitter_Page
Twitter page
2020-04-10 14:08:50 -04:00
kconnel7
287998bdf7 Monthly Calendar - sport_schedule json 2020-04-10 14:02:38 -04:00
Carlos Lopez-Rosario
8afa0b4f3c Merge remote-tracking branch 'origin/master' into standings 2020-04-10 13:51:29 -04:00
Carlos Lopez-Rosario
315bac2891 90 -> 89 cause android sized screamed 2020-04-10 13:45:15 -04:00
Carlos Lopez-Rosario
200b4a2df4 Merge remote-tracking branch 'origin/master' into game_details_offNavigation
# Conflicts:
#	lib/route_generator.dart
#	lib/screens/home_widget.dart
2020-04-10 13:43:19 -04:00
Carlos Lopez-Rosario
0bf3de6916 Added missing import 2020-04-10 13:30:50 -04:00
Carlos Lopez-Rosario
3f2406a442 Merge remote-tracking branch 'origin/master' into Twitter_Page
# Conflicts:
#	lib/route_generator.dart
#	lib/screens/home_widget.dart
2020-04-10 13:25:41 -04:00
clopezr1
7d7dae36bc Merge pull request #9 from allemangD/reorder-sports
Favorites - Persistent sports reordering.
2020-04-10 12:35:47 -04:00
kconnel7
8dd5979758 Monthly Calendar - Showcases Scores and game status; status has formatting. What remains; Home/Away Marker Colors, Gender Switch to switch between genders, display opponent logos. (Will be Phase 3) 2020-04-10 12:16:20 -04:00
e8a9808203 resort main page after order updated 2020-04-09 23:00:22 -04:00
96d88a8a82 initial list determined by favorites order 2020-04-09 22:52:13 -04:00
a59b13fc6f persistent draggable favorites manager 2020-04-09 22:40:58 -04:00
kwainright
335ba7ec48 Play-by-play, no api, temp place holder data. 2020-04-09 21:59:16 -04:00
clopezr1
ddbf2c47b3 Using School.dart Class 2020-04-09 21:57:20 -04:00
clopezr1
9c2b22e33a images 2020-04-09 21:13:58 -04:00
kwainright
71c0c072ab Twitter - proof of concept - needs api fleshed out. has place holder data - edited the images 2020-04-09 20:44:14 -04:00
kwainright
0510b9f7dd Twitter - proof of concept - needs api fleshed out. has place holder data 2020-04-09 20:38:48 -04:00
clopezr1
5c97ec7de0 Standings basic structure working 2020-04-09 18:45:35 -04:00
kwainright
2d103cba78 Twitter - Api half way there - committing to check out other branch 2020-04-09 18:32:06 -04:00
kwainright
9fc50a5215 Twitter - Api half way there - committing to check out other branch 2020-04-09 17:50:51 -04:00
David Allemang
b929018c9b upgrade packages 2020-04-09 14:40:15 -04:00
kconnel7
e9a8abfe00 Monthly Calendar - Multiple Objects displayed from API (All that remains are home/away marker colors, status/scores, opponent logos, and having gender switch work to change displayed games from either gender) 2020-04-09 05:51:59 -04:00
kconnel7
310248bf02 Monthly Calendar - Switch case to handle ability to change sports as well as determine if sport needs gender switch 2020-04-08 23:35:43 -04:00
kwainright
a2e2cb693d Twitter - Api half way there - have to figure out the Twitter Authorization with Dart. 2020-04-08 19:17:24 -04:00
kconnel7
c8e0026a51 Monthly Calendar (API - Only Dates Work) 2020-04-08 02:39:31 -04:00
kwainright
b8b0a790f6 Twitter - Layout implemented - need to get API data 2020-04-07 16:48:18 -04:00
kconnel7
ddbbe89903 Monthly Calendar w/ event placeholders & more detailed layout - No API 2020-04-02 19:08:29 -04:00
kwainright
5cdf2549df Twitter - nothing implemented - setting up testing routes 2020-04-02 14:01:54 -04:00
kwainright
5588c34bc4 Game Details page - no api - Proof of concept. Styling finished for the most part 2020-04-01 23:47:11 -04:00
kconnel7
8a5b57b14c Monthly Calendar w/ event placeholders - No API 2020-04-01 04:36:27 -04:00
kwainright
19066b3d32 Merge remote-tracking branch 'origin/master' into game_details_offNavigation 2020-03-31 23:51:22 -04:00
kwainright
f541579920 Game Details page - no api - not finished. Getting updates for master branch 2020-03-31 23:49:55 -04:00
clopezr1
6c1e26993e Merge pull request #8 from allemangD/Navigation
Navigation
2020-03-31 23:39:19 -04:00
kconnel7
5e4c336c4b Monthly Calendar - No API 2020-03-31 16:00:00 -04:00
clopezr1
bb6f0fd0e5 some updates 2020-03-24 13:27:18 -04:00
clopezr1
11355bf2c9 Restructured home 2020-03-22 10:15:22 -04:00
Carlos Lopez-Rosario
9569af7981 Basic Pages 2020-03-08 19:56:50 -04:00
Carlos Lopez-Rosario
60fb57f904 RouteGenerator 2020-03-05 18:24:44 -05:00
Carlos Lopez-Rosario
fe6f3b65fd Created the Files for Schedule, Chat, and Standing Screens 2020-03-04 18:12:57 -05:00
56cb3e27f2 Merge pull request #7 from allemangD/Navigation
Navigation
2020-02-27 21:57:59 -05:00
Max Mohr
fca43bddd1 second update
overwrote your commit and not sure how to amend.  Revised name changes.
2020-02-27 21:05:09 -05:00
Carlos Lopez-Rosario
842ab0e6ae 150 2020-02-27 20:46:42 -05:00
Max Mohr
54e5770138 Update sport.dart
changed weird naming convention.
2020-02-27 20:40:23 -05:00
Carlos Lopez-Rosario
658305aa8d 150 2020-02-27 20:11:33 -05:00
clopezr1
c763dc1801 Restructured files, and added the basic navigation 2020-02-27 19:09:34 -05:00
clopezr1
9364ce9718 Changed main to be able to point to routes, and file restructuring 2020-02-26 13:30:55 -05:00
clopezr1
ff2fe725b5 Removed Bottom Nav Bar 2020-02-21 16:34:33 -05:00
49 changed files with 2975 additions and 138 deletions

3
android/.gitignore vendored
View File

@@ -5,3 +5,6 @@ gradle-wrapper.jar
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
/android/app/src/debug/gen
/android/app/src/main/gen
/android/app/src/profile/gen

BIN
assets/school_logos/FAU.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/school_logos/FIU.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
assets/school_logos/LT.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/school_logos/MT.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/school_logos/ODU.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/school_logos/UAB.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
assets/school_logos/wku.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/female.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
images/male.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1 +1,2 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"

View File

@@ -1 +1,2 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"

90
ios/Podfile Normal file
View File

@@ -0,0 +1,90 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
end
generated_key_values
end
target 'Runner' do
use_frameworks!
use_modular_headers!
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
end
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end

34
ios/Podfile.lock Normal file
View File

@@ -0,0 +1,34 @@
PODS:
- Flutter (1.0.0)
- shared_preferences (0.0.1):
- Flutter
- shared_preferences_macos (0.0.1):
- Flutter
- shared_preferences_web (0.0.1):
- Flutter
DEPENDENCIES:
- Flutter (from `Flutter`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
EXTERNAL SOURCES:
Flutter:
:path: Flutter
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_macos:
:path: ".symlinks/plugins/shared_preferences_macos/ios"
shared_preferences_web:
:path: ".symlinks/plugins/shared_preferences_web/ios"
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
shared_preferences: 430726339841afefe5142b9c1f50cb6bd7793e01
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
PODFILE CHECKSUM: 083258d7f5e80b42ea9bfee905fe93049bc04c64
COCOAPODS: 1.7.5

View File

@@ -9,14 +9,11 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
A3EB31443D013642540B39CB /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AFA6FFA8DD670B24F233CFA /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -26,8 +23,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -37,14 +32,16 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
2AFA6FFA8DD670B24F233CFA /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2BA468F01A093BC5197E02A7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
650D60F5EF8D34D8E09E474E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
8254A0F7600F16C78FD108C7 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -57,20 +54,28 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
A3EB31443D013642540B39CB /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
64E35ED21045FF8D7525F43B /* Pods */ = {
isa = PBXGroup;
children = (
2BA468F01A093BC5197E02A7 /* Pods-Runner.debug.xcconfig */,
650D60F5EF8D34D8E09E474E /* Pods-Runner.release.xcconfig */,
8254A0F7600F16C78FD108C7 /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
@@ -84,6 +89,8 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
64E35ED21045FF8D7525F43B /* Pods */,
BC88384DE96E3913225BBCFC /* Frameworks */,
);
sourceTree = "<group>";
};
@@ -118,6 +125,14 @@
name = "Supporting Files";
sourceTree = "<group>";
};
BC88384DE96E3913225BBCFC /* Frameworks */ = {
isa = PBXGroup;
children = (
2AFA6FFA8DD670B24F233CFA /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -125,12 +140,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
D5608DCB02383A1E5233B166 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
1255276F7F24303C431FF6EC /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -152,6 +169,7 @@
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = W5P374VFZT;
LastSwiftMigration = 1100;
};
};
@@ -189,6 +207,21 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
1255276F7F24303C431FF6EC /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -201,7 +234,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
@@ -217,6 +250,28 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
D5608DCB02383A1E5233B166 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -309,6 +364,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = W5P374VFZT;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -444,6 +500,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = W5P374VFZT;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -472,6 +529,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = W5P374VFZT;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",

View File

@@ -4,4 +4,7 @@
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

0
lib/common/theme.dart Normal file
View File

7
lib/globals.dart Normal file
View File

@@ -0,0 +1,7 @@
library my_prj.globals;
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
Client client = Client(
'xqf4gbfwu2ec',
logLevel: Level.INFO,
);

View File

@@ -1,91 +0,0 @@
import 'package:flutter/material.dart';
import 'news/feed.dart';
class Home extends StatelessWidget {
final List<Object> _curSport = ['FootBall', Colors.green];
final List<Item> colorList = <Item>[
const Item("FootBall", Colors.red),
const Item("Soccer", Colors.pinkAccent),
const Item('Baseball', Colors.yellow),
];
var feed = Feed();
@override
Widget build(BuildContext context) {
int _currentBodyIndex = 0;
Item selectedSport;
return StatefulBuilder(
builder: (context, StateSetter setState) => Scaffold(
appBar: AppBar(
centerTitle: true,
title: DropdownButton<Item>(
value: selectedSport,
icon: Icon(Icons.arrow_drop_down),
iconSize: 24,
style: TextStyle(color: Colors.black),
iconEnabledColor: Colors.white,
onChanged: (Item value) {
setState(() {
selectedSport = value;
_curSport[0] = selectedSport.name;
_curSport[1] = selectedSport.color;
});
},
items: colorList.map<DropdownMenuItem<Item>>((Item item) {
return DropdownMenuItem<Item>(
value: item,
child: SizedBox(
width: 100,
child: Text(item.name),
),
);
}).toList(),
),
backgroundColor: _curSport[1],
),
body: ListView(
children: <Widget>[
HorizontalNewsFeed(newsFeed: feed, title: Text("Basketball")),
HorizontalNewsFeed(newsFeed: feed, title: Text("Soccer")),
HorizontalNewsFeed(newsFeed: feed, title: Text("Football")),
HorizontalNewsFeed(newsFeed: feed, title: Text("Volleyball")),
],
),
bottomNavigationBar: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
onTap: (int index) {
setState(() {
_currentBodyIndex = index;
});
},
currentIndex: _currentBodyIndex,
items: [
BottomNavigationBarItem(
icon: new Icon(Icons.home),
title: new Text("Home"),
),
BottomNavigationBarItem(
icon: new Icon(Icons.calendar_today),
title: new Text("Schedule")),
BottomNavigationBarItem(
icon: new Icon(Icons.table_chart), title: new Text("Scores")),
BottomNavigationBarItem(
icon: new Icon(Icons.assessment), title: new Text("Standings")),
BottomNavigationBarItem(
icon: new Icon(Icons.more_horiz), title: new Text("More"))
],
),
),
);
}
}
class Item {
const Item(this.name, this.color);
final String name;
final Color color;
}

View File

@@ -1,17 +1,24 @@
import 'package:capstone_hungry_hippos/route_generator.dart';
import 'package:flutter/material.dart';
import 'home_widget.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
import 'globals.dart' as globals;
void main() => runApp(App());
class App extends StatelessWidget{
void main() async {
var c = globals.client;
await c.setGuestUser(
User(id: 'You'),
);
runApp(App());
}
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'UNCC Athletics',
home: Home(),
initialRoute: '/',
onGenerateRoute: RouteGenerator.generateRoute,
);
}
}
}

16
lib/models/School.dart Normal file
View File

@@ -0,0 +1,16 @@
import 'package:flutter/material.dart';
class School {
final String name;
final AssetImage logo;
final int win;
final int loss;
School(
this.name,
this.logo,
this.win,
this.loss
);
}

View File

@@ -0,0 +1,97 @@
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import '../screens/sport_schedule.dart';
import 'dart:convert';
class GameCardFeed{
static final sportUrl =
'https://charlotte49ers.com/services/adaptive_components.ashx?type=scoreboard&start=0&count=80';
Future<List<sport_schedule>> getEvents(int sportID) async {
var url = '$sportUrl&sport_id=$sportID&name=&extra=%7B%7D';
http.Response response = await http.get(url);
Iterable games = json.decode(response.body);
return games
.map<sport_schedule>((json) => sport_schedule.fromJson(json))
.toList();
//return games.map((e) => sport_schedule.fromJson(e)).toList();
}
Future<List<ScheduleObject>> getGames(int sportID) async {
Map<DateTime, List<sport_schedule>> mapGrab = {};
List<sport_schedule> eventInfo = await getEvents(sportID);
for (int i = 0; i < eventInfo.length; i++) {
var sportEvent = DateTime(eventInfo[i].date.year, eventInfo[i].date.month,
eventInfo[i].date.day);
var original = mapGrab[sportEvent];
if (original == null) {
//print("null");
mapGrab[sportEvent] = [eventInfo[i]];
} else {
//print(eventInfo[i].date);
mapGrab[sportEvent] = List.from(original)
..addAll([eventInfo[i]]);
}
}
List<ScheduleObject> list = [];
mapGrab.forEach((k, v) => list.add(ScheduleObject(k, v)));
return list;
}
}
class HorizontalGameCards extends StatelessWidget {
final GameCardFeed gameCard;
final double numCards;
final int sportID;
const HorizontalGameCards({
Key key,
@required this.gameCard,
this.numCards = 8,
this.sportID,
}) : super(key: key);
double heightIn(BuildContext context) {
return MediaQuery.of(context).size.height / numCards;
}
@override
Widget build(BuildContext context) {
var card = gameCard.getGames(sportID);
var events = [];
return SizedBox(
height: heightIn(context),
child: FutureBuilder(
future: card,
// ignore: missing_return
builder: (ctx, snapshot) {
//print(snapshot);
if (!snapshot.hasData) {
return Center(child: CircularProgressIndicator());
} else {
events = snapshot.data;
return ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: events.length,
itemBuilder: (context, index) {
return GameCard(
gameCard: events[index].sportSched[0],
);
},
);
}
},
),
);
}
}
class ScheduleObject {
DateTime d;
List<sport_schedule> sportSched;
ScheduleObject(this.d, this.sportSched);
}

View File

@@ -0,0 +1,255 @@
import 'package:capstone_hungry_hippos/screens/sport_schedule.dart';
import 'package:flutter/material.dart';
//This will mode to Kalebs
class GameDetailsWidget extends StatelessWidget {
final sport_schedule gameCard;
const GameDetailsWidget(this.gameCard);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("VS. ${gameCard.opponentTitle}"),
),
body: Column(
children: <Widget>[
GameDetailsHeader(gameCard),
EasyAccess(gameCard),
GameUpdates()
],
)
);
}
} //Move to Kalebs ^^^^
class GameDetailsHeader extends StatelessWidget {
final sport_schedule gameCard;
const GameDetailsHeader(
this.gameCard,
);
Text _pastGameScore(
String homeAway, String winLoss, String uncc, String opponent) {
double fontsize = 25;
if (homeAway == "H" || homeAway == "T") {
return (Text('$uncc - $opponent',style: TextStyle(fontSize: fontsize)));
} else {
return (Text('$opponent - $uncc',style: TextStyle(fontSize: fontsize)));
}
}
Image _homeAwayImageOrder(
String h, String opposingTeam, bool l, BuildContext ctx) {
if ((h == "H") == l) {
return (Image.network(
'https://fiusports.com/images/logos/UNC-Charlotte.png?width=80&height=80&mode=max',
));
} else {
return (Image.network(
'https://charlotte49ers.com' + opposingTeam,
));
}
}
@override
Widget build(BuildContext context) {
var _months = {
1: 'JAN',
2: 'FEB',
3: 'MAR',
4: 'APR',
5: 'MAY',
6: 'JUN',
7: 'JUL',
8: 'AUG',
9: 'SEP',
10: 'OCT',
11: 'NOV',
12: 'DEC'
};
var size = MediaQuery.of(context).size;
return SizedBox(
height: size.height / 7,
child: Container(
color: Colors.black26,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Expanded(
child: _homeAwayImageOrder(
gameCard.location_indicator,
gameCard.image,
true, context),
),
Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Wrap(
children: <Widget>[
if (gameCard.status == null) // no game yet
Text(
'${_months[gameCard.date.month]} ${gameCard.date.day}',
style: TextStyle(fontSize: 25),
)
else
_pastGameScore(
gameCard.location_indicator,
gameCard.status,
gameCard.team_score,
gameCard.opponent_score,),
],
),
Wrap(
children: <Widget>[
if (gameCard.status != null) // no game yet
Text(
'${_months[gameCard.date.month]} ${gameCard.date.day}', textAlign: TextAlign.center,
)
else
Text('${gameCard.date.hour}:${gameCard.date.minute} PM'),
],
)
]
),
),
Expanded(
child: _homeAwayImageOrder(
gameCard.location_indicator,
gameCard.image,
false, context),
)
],
),
)
);
}
}
class EasyAccess extends StatelessWidget {
final sport_schedule gameCard;
const EasyAccess(
this.gameCard,
);
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
return SizedBox(
height: size.height / 15,
child: Container(
//color: Colors.black12,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
_button(context, "Play-by-Play"),
_button(context, "Chat")
],
),
),
);
}
Widget _button(BuildContext context, String label) {
var size = MediaQuery.of(context).size;
label = (label == "Standings") ? "Standing" : label;
print(label);
return InkWell(
splashColor: Colors.green,
child: Container(
width: size.width/2,
height: size.height / 15,
color: label == 'Play-by-Play' ? Colors.green : Colors.black12,
child: Center(
child: Text(label, style: TextStyle(fontSize: 16),),
),
),
onTap: () => {
print("Tapped $label"),
if(label == 'Chat'){
Navigator.pushNamed(context, '/Chat', arguments: [gameCard.sportTitle, gameCard.idSport])
}
},
);
}
}
//Class for pbp
class GameUpdates extends StatelessWidget{
List<Play> myList = [];
final test1 = new Play('1st and 10 at CLT 25', '(6:12 - 4th) Aidan Swanson kickoff for 65 yds for a touchback');
final test2 = new Play('2nd & 10 at CLT 25', '(5:00 - 4th) Ishod Finger run for no gain to the Charl 25');
final test3 = new Play('3rd & 10 at CLT 25', '(4:30 - 4th) CHARLOTTE Penalty, False Start (-5 Yards) to the Charl 20');
final test4 = new Play('3rd & 15 at CLT 20', '(4:00 - 4th) Brett Kean run for 5 yds to the Charl 25');
final test5 = new Play('4th & 10 at CLT 25', '(3:31 - 4th) Connor Bowler punt for 48 yds , Will Brown returns for 13 yds to the Clem 40');
final test6 = new Play('1st & 10 at CLEM 40','(3:00 - 4th) Taisun Phommachanh pass complete to Will Brown for 8 yds to the Clem 48');
final test7 = new Play('2nd & 2 at CLEM 48','(2:40 - 4th) Chez Mellusi run for 3 yds to the Charl 49 for a 1ST down');
final test8 = new Play('1st & 10 at CLT 49','(2:25 - 4th) Chez Mellusi run for 8 yds to the Charl 41');
final test9 = new Play('2nd & 2 at CLT 41','(1:37 - 4th) Ben Batson run for 5 yds to the Charl 36 for a 1ST down');
final test10 = new Play('1st & 10 at CLT 36', '(1:30 - 4th) CLEMSON Penalty, False Start (-5 Yards) to the Charl 41');
final test11 = new Play('1st & 15 at CLT 41','(0:55 - 4th) Chez Mellusi run for 4 yds to the Charl 37');
final test12 = new Play('2nd & 11 at CLT 37','(0:25 - 4th) Patrick McClure run for 3 yds to the Charl 34');
final test13 = new Play('3rd & 8 at CLT 34','(0:05 - 4th) Chez Mellusi run for 7 yds to the Charl 27');
final test14 = new Play('4th & 1 at CLT 27','(0:00 - 4th) Patrick McClure run for 9 yds to the Charl 18 for a 1ST down');
@override
Widget build(BuildContext context) {
myList.add(test1);
myList.add(test2);
myList.add(test3);
myList.add(test4);
myList.add(test5);
myList.add(test6);
myList.add(test7);
myList.add(test8);
myList.add(test9);
myList.add(test10);
myList.add(test11);
myList.add(test12);
myList.add(test13);
myList.add(test14);
return Expanded(
child: Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
itemCount: myList.length,
itemBuilder: (context, int index){
return Card(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 5,horizontal: 10),
child: ListTile(
title: Text('${myList[index].title}'),
subtitle: Padding(
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 20),
child: Text('${myList[index].action}'),
),
),
),
);
}
),
),
);
}
}
class Play {
final String title;
final String action;
Play(
this.title,
this.action,
);
}

407
lib/monthly_calendar.dart Normal file
View File

@@ -0,0 +1,407 @@
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:table_calendar/table_calendar.dart';
import 'screens/sport_schedule.dart';
import 'dart:convert';
class Calendar extends StatefulWidget {
final int sportID;
Calendar(this.sportID);
@override
_Calendar createState() => _Calendar(sportID);
}
//List<sport_schedule> _selectedEvents; //original that makes events work
List _selectedEvents; //Removing the <sport_schedule> allows it to still work. Proceed with caution
DateTime selectedDay;
Map<DateTime, List<sport_schedule>> _events;
class _Calendar extends State<Calendar> with TickerProviderStateMixin {
int sportID;
_Calendar(this.sportID);
AnimationController _animationController;
CalendarController _calController;
static final sportUrl = 'https://charlotte49ers.com/services/adaptive_components.ashx?type=scoreboard&start=0&count=80';
Future<List<sport_schedule>> getEvents() async {
var url = '$sportUrl&sport_id=$sportID&name=&extra=%7B%7D';
print(url.toString());
http.Response response = await http.get(url);
Iterable games = json.decode(response.body);
return games.map<sport_schedule>((json) => sport_schedule.fromJson(json)).toList();
//return games.map((e) => sport_schedule.fromJson(e)).toList();
}
Future<Map<DateTime, List<sport_schedule>>> getGames() async {
Map<DateTime, List<sport_schedule>> mapGrab = {};
List<sport_schedule> eventInfo = await getEvents();
for (int i = 0; i < eventInfo.length; i++) {
var sportEvent = DateTime(
eventInfo[i].date.year,
eventInfo[i].date.month,
eventInfo[i].date.day
);
var original = mapGrab[sportEvent];
if (original == null) {
mapGrab[sportEvent] = [eventInfo[i]];
} else {
mapGrab[sportEvent] = List.from(original)..addAll([eventInfo[i]]);
}
}
return mapGrab;
}
@override
void initState() {
//final _selectedDay = DateTime.now();
//_selectedEvents = _events[_selectedDay] ?? [];
_selectedEvents = [];
_calController = CalendarController();
_animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 400),
);
_animationController.forward();
WidgetsBinding.instance.addPostFrameCallback((_) {
getGames().then((val) => setState(() {
_events = val;
}));
});
super.initState();
}
@override
void dispose() {
_animationController.dispose();
_calController.dispose();
super.dispose();
}
//void _DaySelected(DateTime day, List<sport_schedule> events) { //original that makes events work
void _DaySelected(DateTime day, List events) { //Removing the <sport_schedule> allows it to still work. Proceed with caution
setState(() {
_selectedEvents = events;
selectedDay = DateTime(day.year, day.month, day.day);
});
}
/*void _onVisibleDaysChanged(DateTime first, DateTime last, CalendarFormat format) {
print('CALLBACK: _onVisibleDaysChanged');
}
void _onCalendarCreated(DateTime first, DateTime last, CalendarFormat format) {
print('CALLBACK: _onCalendarCreated');
}*/
//----- Builds calendar and event Lister -----
@override
Widget build(BuildContext context) {
return Center(
child: Column(
children: <Widget>[
_buildCalendar(),
const SizedBox(height: 8.0),
Expanded(child: _eventLister()),
],
),
);
}
//----- Builds calendar -----
@override
Widget _buildCalendar() {
return TableCalendar(
calendarController: _calController,
initialCalendarFormat: CalendarFormat.month,
startingDayOfWeek: StartingDayOfWeek.sunday,
//availableGestures: AvailableGestures.all,
events: _events,
availableCalendarFormats: const {
CalendarFormat.month: '',
},
calendarStyle: CalendarStyle(
outsideWeekendStyle: TextStyle(
color: Colors.grey,
),
weekendStyle: TextStyle(
color: Colors.black,
),
),
daysOfWeekStyle: DaysOfWeekStyle(
weekendStyle: TextStyle(
color: Colors.black,
),
weekdayStyle: TextStyle(
color: Colors.black,
),
),
headerStyle: HeaderStyle(
centerHeaderTitle: true,
formatButtonVisible: false, //hides button that formats between 1 week, 2 week, month
//formatButtonShowsNext: false,
),
builders: CalendarBuilders(
selectedDayBuilder: (context, date, _) {
return Container(
margin: const EdgeInsets.all(4.0),
alignment: Alignment.center,
decoration: BoxDecoration(
border: Border.all(
color: Color.fromRGBO(0, 112, 60, 1), //UNCC Green
),
color: Color.fromRGBO(179, 163, 105, 1), //UNCC Gold
borderRadius: BorderRadius.circular(10.0)
),
child: Text(
'${date.day}',
style: TextStyle(color: Colors.white),
),
);
},
todayDayBuilder: (context, date, _) {
return Container(
margin: const EdgeInsets.all(4.0),
alignment: Alignment.center,
decoration: BoxDecoration(
border: Border.all(
color: Color.fromRGBO(0, 112, 60, 1), //UNCC Green
),
borderRadius: BorderRadius.circular(10.0)
),
child: Text(
'${date.day}',
style: TextStyle(
color: Colors.black,
),
),
);
},
markersBuilder: (context, date, events, holidays) {
final miniBox = <Widget>[];
if (events.isNotEmpty) {
miniBox.add(
Positioned(
right: 0,top: 0, left: 0, bottom: 0,
child: _buildEventsMarker(date, events[0].location_indicator, true, events),
),
);
if (events.length > 1)
miniBox.add(
Positioned(
right: 1, bottom: 1,
child: _buildEventsMarker(date, events[0].location_indicator, false, events),
)
);
}
return miniBox;
},
),
onDaySelected: (date, events) {
_DaySelected(date, events);
_animationController.forward(from: 0.0);
},
//onVisibleDaysChanged: _onVisibleDaysChanged,
//onCalendarCreated: _onCalendarCreated,
);
}
//----- Creates event box display (mini box) -----
Widget _buildEventsMarker(DateTime date, String gameType, bool main, events) {
String eventNum;
if (main) {eventNum = "${date.day}";} else {eventNum = "${events.length}";}
//return Container(
return AnimatedContainer(
duration: const Duration(milliseconds: 300),
margin: const EdgeInsets.all(4.0),
alignment: Alignment.center,
decoration: BoxDecoration(
/*border: Border.all(
color: Color.fromRGBO(0, 112, 60, 1), //UNCC Green
//color: Colors.black,
),*/
color: _calController.isSelected(date)
? Color.fromRGBO(179, 163, 105, 1) //UNCC Gold
: _gameTypeColor(gameType, main), //UNCC Green
borderRadius: BorderRadius.circular(10.0)
),
width: 16.0,
height: 16.0,
child: Center(
child: Text(
eventNum,
style: TextStyle().copyWith(
color: Colors.white,
fontSize: 12.0,
),
),
),
);
}
//Logic on if Home or Away return the colors
Color _gameTypeColor(String gameType, bool main){
Color c;
if (gameType == "H"){
c = Color.fromRGBO(0, 112, 60, 1); //UNCC Green
} else {
c = Colors.grey;
}
if (!main){
c = Colors.black45;//Color.fromRGBO(179, 163, 105, 1);
}
return c;
}
//----- Creates event display -----
Widget _eventLister() {
return ListView(
children: _selectedEvents.map((event) => Container(
decoration: BoxDecoration(
border: Border.all(
color: Color.fromRGBO(0, 112, 60, 1), //UNCC Green
width: 0.8,
),
borderRadius: BorderRadius.circular(12.0),
),
height: 70.0,
margin: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
child: ListTile(
leading: Image.network(
'https://charlotte49ers.com' + event.image.toString(),
width: 35.0,
),
title: Wrap(
children: <Widget>[
if (event.location_indicator.toString() == "H")
Text(
'vs. ',
style: TextStyle( //home game
fontSize: 11.6,
),
)
else
Text(
'at ',
style: TextStyle( //away game
fontSize: 11.6,
),
),
Text(
event.opponentTitle.toString(),
style: TextStyle(
fontSize: 11.6,
),
) //opponent name
],
),
//Type of sport - Location
subtitle: Text(
event.sportTitle.toString() + " - " + event.location.toString(),
style: TextStyle(
fontSize: 9.9, //10.3
),
),
trailing: Wrap(
//mainAxisSize: MainAxisSize.min,
children: <Widget>[
//---Score---
//Game hasn't occured
if (event.status.toString() == "null")
Text("TBD"),
//---Scores---
if (event.status.toString() == "W" || event.status.toString() == "L" || event.status.toString() == "T") //Finished games
Text(event.team_score.toString() + " - " + event.opponent_score.toString() + " ")
else if (event.status.toString() == "N" && event.team_score.toString() != "null" && event.opponent_score.toString() != "null") //Games that don't count
Text(event.team_score.toString() + " - " + event.opponent_score.toString() + " "),
//---Game Status---
if (event.status.toString() == "W") //Win
Text(
(" " + event.status.toString() + " "),
style: TextStyle(
color: Colors.white,
backgroundColor: Color.fromRGBO(0, 112, 60, 1),
)
),
if (event.status.toString() == "L" || event.status.toString() == "T") //Lose-Tie
Text(
(" " + event.status.toString() + " "),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
backgroundColor: Colors.grey,
)
),
if (event.status.toString() == "N" && event.postscore.toString() != "Canceled") //N
Text(
(" " + event.status.toString() + " "),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
backgroundColor: Colors.grey,
)
)
else if (event.team_score.toString() == "null" && event.opponent_score.toString() == "null"
&& event.status.toString() == "N") //Game was canceled
Text(
"Canceled",
style: TextStyle(
color: Colors.red,
)
),
],
),
onTap: () => print('$event tapped!'), //When event display is clicked
),
)).toList(),
);
}
}

View File

@@ -76,6 +76,7 @@ class ArticleCard extends StatelessWidget {
],
);
return SizedBox(
width: widthIn(context),
child: Card(
@@ -89,3 +90,59 @@ class ArticleCard extends StatelessWidget {
);
}
}
class ArticleCardVert extends StatelessWidget {
const ArticleCardVert({
Key key,
@required this.article,
this.numCards = 2.1,
}) : super(key: key);
final Article article;
final double numCards;
double heightIn(BuildContext context) {
return (MediaQuery.of(context).size.height * 7/8) / numCards;
}
@override
Widget build(BuildContext context) {
var decoration = BoxDecoration(
image: DecorationImage(
image: NetworkImage(
article.thumbUrl,
),
fit: BoxFit.cover,
),
);
var body = Column(
verticalDirection: VerticalDirection.up,
children: <Widget>[
Container(
color: Colors.white,
child: ListTile(
title: Text(
article.mediumHeadline,
overflow: TextOverflow.ellipsis,
maxLines: 2,
),
),
),
],
);
return SizedBox(
height: heightIn(context),
child: Card(
semanticContainer: true,
clipBehavior: Clip.antiAliasWithSaveLayer,
child: Container(
decoration: decoration,
child: body,
),
),
);
}
}

View File

@@ -18,22 +18,25 @@ class Feed {
class HorizontalNewsFeed extends StatelessWidget {
final Feed newsFeed;
final Widget title;
final Text title;
final double numCards;
final String sportFilter;
const HorizontalNewsFeed({
Key key,
@required this.newsFeed,
@required this.title,
@required this.sportFilter,
this.numCards = 3.25,
}) : super(key: key);
double heightIn(BuildContext context) {
return MediaQuery.of(context).size.height / numCards;
}
@override
Widget build(BuildContext context) {
var page = newsFeed.getPage(1, size: 100).then((page) => page.where((article) => article.sport.toLowerCase().contains(sportFilter.toLowerCase())).toList());
return SizedBox(
height: heightIn(context),
child: Column(
@@ -43,18 +46,25 @@ class HorizontalNewsFeed extends StatelessWidget {
title: title,
trailing: IconButton(
icon: Icon(Icons.navigate_next),
onPressed: () {},
onPressed: () => Navigator.of(context).pushNamed('/Sport', arguments: title.data),
/*onPressed: () { //changed
Navigator.of(context).pushNamed('/Sport');
print(Navigator.of(context).pushNamed('/Sport'));
}*/
),
),
Expanded(
child: FutureBuilder(
future: newsFeed.getPage(1),
future: page,
builder: (ctx, snapshot) {
if (!snapshot.hasData) {
return Center(child: CircularProgressIndicator());
} else {
List<Article> articles = snapshot.data;
return ListView.builder(
//shrinkWrap: true,
scrollDirection: Axis.horizontal,
itemCount: articles.length,
itemBuilder: (ctx, idx) {
@@ -72,3 +82,43 @@ class HorizontalNewsFeed extends StatelessWidget {
);
}
}
class VerticalNewsFeed extends StatelessWidget {
final Feed newsFeed;
final String sportFilter;
const VerticalNewsFeed({
Key key,
@required this.newsFeed,
@required this.sportFilter,
}) : super(key: key);
@override
Widget build(BuildContext context) {
var page = newsFeed.getPage(1, size: 100).then((page) => page.where((article) => article.sport.toLowerCase().contains(sportFilter.toLowerCase())).toList());
var size = MediaQuery.of(context).size;
return SizedBox(
height: size.height * (7/8),
child: FutureBuilder(
future: page,
builder: (ctx, snapshot) {
if (!snapshot.hasData) {
return Center(child: CircularProgressIndicator());
} else {
List<Article> articles = snapshot.data;
return ListView.builder(
//shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: articles.length,
itemBuilder: (ctx, idx) {
return ArticleCardVert(
article: articles[idx],
);
},
);
}
},
));
}
}

63
lib/route_generator.dart Normal file
View File

@@ -0,0 +1,63 @@
import 'models/game_details.dart';
import 'screens/chat.dart';
import 'screens/schedule.dart';
import 'screens/standing.dart';
import 'package:flutter/material.dart';
import 'screens/home_widget.dart';
import 'screens/sport.dart';
import 'screens/twitter_widget.dart';
import 'screens/favorites_reorder.dart';
class RouteGenerator {
static Route<dynamic> generateRoute(RouteSettings settings) {
final args = settings
.arguments; //This is how we pass arguments and can be used in case
print("args $args");
switch (settings.name) {
case '/':
return MaterialPageRoute(builder: (_) => Home());
case '/Sport':
//We can put logic and stuff here for checking if logged in
return MaterialPageRoute(builder: (_) => Sport(args));
case '/Schedule':
return MaterialPageRoute(builder: (_) => Schedule(args));
case '/Standing':
return MaterialPageRoute(builder: (_) => Standing(args));
case '/Chat':
return MaterialPageRoute(builder: (_) => Chat(args));
case '/Details':
return MaterialPageRoute(builder: (_) => GameDetailsWidget(args));
case '/Favorites':
return MaterialPageRoute(builder: (_) => FavoritesManager());
case '/Twitter':
return MaterialPageRoute(builder: (_) => TwitterFeed());
default:
return _errorRoute();
}
}
static Route _errorRoute() {
return MaterialPageRoute(builder: (_) {
return Scaffold(
appBar: AppBar(
title: Text("Error Page"),
),
body: Center(
child: Text("Error Page"),
),
drawer: Drawer(
child: ListView(
children: <Widget>[
ListTile(
title: IconButton(
icon: Icon(Icons.home),
onPressed: () => Navigator.pushNamed(_, '/'),
),
),
],
),
),
);
});
}
}

65
lib/screens/chat.dart Normal file
View File

@@ -0,0 +1,65 @@
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
import 'package:capstone_hungry_hippos/globals.dart' as globals;
class Chat extends StatelessWidget {
final List sport;
Chat(this.sport);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: false,
title: Text('${sport[0]} Chat'),
backgroundColor: Colors.green,
),
body: ContainerWithInterceptor(globals.client, sport[1]),
);
}
}
class ChannelPage extends StatelessWidget {
const ChannelPage({
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
Expanded(
child: MessageListView(
//messageBuilder: _messageBuilder,
),
),
MessageInput(),
],
);
}
}
class ContainerWithInterceptor extends StatefulWidget {
final Client client;
final int sport;
ContainerWithInterceptor(this.client, this.sport);
@override
State createState() => _ContainerWithInterceptorState();
}
class _ContainerWithInterceptorState extends State<ContainerWithInterceptor> {
Widget build(BuildContext context) {
var cc = widget.client.channel("messaging", id: "${widget.sport}");
print(widget.sport);
print("-------------------------------------------------------------");
cc.watch();
return StreamChat(
client: widget.client,
child: StreamChannel(
channel: cc,
child: ChannelPage(),
),
);
}
}

View File

@@ -0,0 +1,81 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
class Favorites {
Future<SharedPreferences> _prefs = SharedPreferences.getInstance();
static const List<String> DEFAULT_FAVORITES = [
'Football',
'Basketball',
'Baseball',
'Soccer',
'Volleyball'
];
Future<List<String>> get_favorites() async {
final prefs = await _prefs;
return prefs.getStringList('favorites') ?? DEFAULT_FAVORITES;
}
Future<bool> set_favorites(final List<String> favorites) async {
final prefs = await _prefs;
return await prefs.setStringList('favorites', favorites);
}
}
class FavoritesManager extends StatefulWidget {
FavoritesManager({Key key}) : super(key: key);
@override
_FavoritesManagerState createState() => _FavoritesManagerState();
}
class _FavoritesManagerState extends State<FavoritesManager> {
Favorites _mgr = Favorites();
Future<List<String>> _order;
@override
void initState() {
_order = _mgr.get_favorites();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: false,
title: Text('Manage Favorites'),
backgroundColor: Colors.green,
),
body: FutureBuilder<List<String>>(
future: _order,
builder: (ctx, snap) {
if (snap.connectionState == ConnectionState.waiting) {
return CircularProgressIndicator();
} else {
var order = snap.data.toList();
return ReorderableListView(
onReorder: (int oldIdx, int newIdx) {
if (newIdx > oldIdx) newIdx--;
order.insert(newIdx, order.removeAt(oldIdx));
setState(() {
_mgr.set_favorites(order);
_order = Future.value(order);
});
},
children: order.map((sport) {
return ListTile(
key: Key(sport),
title: Text(sport),
trailing: Icon(Icons.drag_handle),
);
}).toList(),
);
}
},
),
);
}
}

View File

@@ -0,0 +1,334 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class Details extends StatelessWidget {
static final List<Item> colorList = <Item>[
const Item('FootBall', Colors.green),
const Item("BasketBall", Colors.red),
const Item("Soccer", Colors.pinkAccent),
const Item('Baseball', Colors.orange),
];
@override
Widget build(BuildContext context) {
return StatefulBuilder(
builder: (context, StateSetter setState) => Scaffold(
appBar: AppBar(
centerTitle: false,
title: Text('Game Details'),
backgroundColor: Colors.green,
),
body: Container(
color: Colors.black12,
child: Column(
children: <Widget>[
Container(
color: Colors.black12,
child: Container(
decoration: BoxDecoration(
border: Border(
top: BorderSide(
color: Colors.black,
width: 2.0,
),
),
),
child: Padding(
padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 30.0),
child: Row(
children: <Widget>[
Padding(
padding: EdgeInsets.only(right: 5),
child: Column(
children: <Widget>[
SizedBox(
height: 45,
width: 45,
child: Image.network('https://upload.wikimedia.org/wikipedia/en/thumb/3/33/Charlotte_49ers_logo.svg/1200px-Charlotte_49ers_logo.svg.png'),
),
Text('UNCC',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
],
),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 0, horizontal: 25),
child: Text('10',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)
),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 0, horizontal: 25),
child: Text('vs',
style: TextStyle(
decoration: TextDecoration.underline,
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 0, horizontal: 25),
child: Text('52',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
),
Padding(
padding: EdgeInsets.only(left: 5),
child: Column(
children: <Widget>[
SizedBox(
width: 50,
height: 50,
child: Image.network('https://www.clemson.edu/brand/resources/logos/paw/orange.png'),
),
Text('Clemson',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
],
),
),
],
),
),
),
),
Container(
color: Colors.black12,
child: Container(
decoration: BoxDecoration(
border: Border(
top: BorderSide(
color: Colors.black,
width: 2.0,
),
bottom: BorderSide(
color: Colors.black,
width: 2.0,
),
),
),
child: Padding(
padding: EdgeInsets.symmetric(vertical: 0.0, horizontal: 5.0),
child: Row(
children: <Widget>[
Container(
child: GestureDetector(
onTap: () => Navigator.pushNamed(context, '/Standing'),
child: Card(
child: SizedBox(
width: 90,
height: 30,
child: Center(
child: Text('Standings',
style: TextStyle(fontSize: 16),
),
),
),
),
),
),
Container(
child: GestureDetector(
onTap: () => Navigator.pushNamed(context, '/Schedule'),
child: Card(
child: SizedBox(
width: 90,
height: 30,
child: Center(
child: Text('Schedule',
style: TextStyle(fontSize: 16),
),
),
),
),
),
),
Container(
child: Card(
child: SizedBox(
width: 100,
height: 30,
child: Center(
child: Text('Play-By-Play',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
Container(
color: Colors.black12,
child: GestureDetector(
onTap: () => Navigator.pushNamed(context, '/Chat'),
child: Card(
child: SizedBox(
width: 50,
height: 30,
child: Center(
child: Text('Chat',
style: TextStyle(fontSize: 16),
),
),
),
),
),
),
],
),
),
),
),
Container(
child: GameUpdates(),
),
],
),
),
drawer: Drawer(
child: ListView(
children: <Widget>[
DrawerHeader(
child: Text(
'Drawer Header',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
decoration: BoxDecoration(
color: Colors.green,
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.home),
onPressed: () => Navigator.pushNamed(context, '/'),
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.table_chart),
onPressed: () => Navigator.pushNamed(context, '/Standing'),
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.calendar_today),
onPressed: () => Navigator.pushNamed(context, '/Schedule'),
),
),
],
),
),
),
);
}
}
class Item {
const Item(this.name, this.color);
final String name;
final Color color;
}
class Play {
final String title;
final String action;
Play(
this.title,
this.action,
);
}
class GameUpdates extends StatelessWidget{
final test1 = new Play('1st and 10 at CLT 25', '(6:12 - 4th) Aidan Swanson kickoff for 65 yds for a touchback');
final test2 = new Play('2nd & 10 at CLT 25', '(5:00 - 4th) Ishod Finger run for no gain to the Charl 25');
final test3 = new Play('3rd & 10 at CLT 25', '(4:30 - 4th) CHARLOTTE Penalty, False Start (-5 Yards) to the Charl 20');
final test4 = new Play('3rd & 15 at CLT 20', '(4:00 - 4th) Brett Kean run for 5 yds to the Charl 25');
final test5 = new Play('4th & 10 at CLT 25', '(3:31 - 4th) Connor Bowler punt for 48 yds , Will Brown returns for 13 yds to the Clem 40');
final test6 = new Play('1st & 10 at CLEM 40','(3:00 - 4th) Taisun Phommachanh pass complete to Will Brown for 8 yds to the Clem 48');
final test7 = new Play('2nd & 2 at CLEM 48','(2:40 - 4th) Chez Mellusi run for 3 yds to the Charl 49 for a 1ST down');
final test8 = new Play('1st & 10 at CLT 49','(2:25 - 4th) Chez Mellusi run for 8 yds to the Charl 41');
final test9 = new Play('2nd & 2 at CLT 41','(1:37 - 4th) Ben Batson run for 5 yds to the Charl 36 for a 1ST down');
final test10 = new Play('1st & 10 at CLT 36', '(1:30 - 4th) CLEMSON Penalty, False Start (-5 Yards) to the Charl 41');
final test11 = new Play('1st & 15 at CLT 41','(0:55 - 4th) Chez Mellusi run for 4 yds to the Charl 37');
final test12 = new Play('2nd & 11 at CLT 37','(0:25 - 4th) Patrick McClure run for 3 yds to the Charl 34');
final test13 = new Play('3rd & 8 at CLT 34','(0:05 - 4th) Chez Mellusi run for 7 yds to the Charl 27');
final test14 = new Play('4th & 1 at CLT 27','(0:00 - 4th) Patrick McClure run for 9 yds to the Charl 18 for a 1ST down');
@override
Widget build(BuildContext context) {
List<Play> myList = [];
myList.add(test1);
myList.add(test2);
myList.add(test3);
myList.add(test4);
myList.add(test5);
myList.add(test6);
myList.add(test7);
myList.add(test8);
myList.add(test9);
myList.add(test10);
myList.add(test11);
myList.add(test12);
myList.add(test13);
myList.add(test14);
/* return StreamBuilder(
stream: myStream,
initialData: '0',
builder: (ctx, snapshot){
return Card(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 5),
child: Text('${snapshot.data}'),
),
);
},
); */
return Expanded(
child: Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
itemCount: myList.length,
itemBuilder: (context, int index){
return Card(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 5,horizontal: 10),
child: ListTile(
title: Text('${myList[index].title}'),
subtitle: Padding(
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 20),
child: Text('${myList[index].action}'),
),
),
),
);
}
),
),
);
}
}

View File

@@ -0,0 +1,90 @@
import 'package:capstone_hungry_hippos/screens/favorites_reorder.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../news/feed.dart';
class Home extends StatefulWidget {
@override
_HomeState createState() => _HomeState();
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: FutureBuilder(
future: _buildList(),
builder: (ctx, snap) {
if (snap.hasData) {
return CustomScrollView(
slivers: <Widget>[
_AppBar(),
SliverList(delegate: SliverChildListDelegate(snap.data)),
],
);
} else {
return CircularProgressIndicator();
}
},
),
drawer: Drawer(
child: ListView(
children: <Widget>[
DrawerHeader(
child: Text(
'Drawer Header',
style: TextStyle(
color: Colors.white,
fontSize: 28,
),
),
decoration: BoxDecoration(
color: Colors.green,
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.voice_chat),
onPressed: () => Navigator.pushNamed(context, '/Twitter'),
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.settings),
onPressed: () =>
Navigator.pushNamed(context, '/Favorites').then((e) {
setState(() {});
}),
),
)
],
),
),
);
}
}
class _AppBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SliverAppBar(
centerTitle: false,
title: Text("49ers"),
backgroundColor: Colors.green,
);
}
}
Future<List<HorizontalNewsFeed>> _buildList() async {
final feed = Feed();
final mgr = Favorites();
final sports = await mgr.get_favorites();
return sports.map((sport) {
return HorizontalNewsFeed(
newsFeed: feed,
title: Text(sport),
sportFilter: sport,
);
}).toList();
}

48
lib/screens/schedule.dart Normal file
View File

@@ -0,0 +1,48 @@
import 'package:flutter/material.dart';
import '../monthly_calendar.dart';
import '../screens/sport.dart' as globals;
class Schedule extends StatelessWidget{
final List sport;
Schedule(this.sport);
@override
Widget build(BuildContext context) {
var calendar = Calendar(sport[0]);
return StatefulBuilder(
builder: (context, StateSetter setState) => Scaffold(
appBar: AppBar(
centerTitle: false,
title: Text("${sport[1]}"),
backgroundColor: Colors.green,
),
body: Container (
child: calendar,
),
drawer: Drawer(
child: ListView(
children: <Widget>[
DrawerHeader(
child: Text(
'Drawer Header',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
decoration: BoxDecoration(
color: Colors.green,
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.home),
onPressed: () => Navigator.pushNamed(context, '/'),
),
),
],
),
)
));
}
}

179
lib/screens/sport.dart Normal file
View File

@@ -0,0 +1,179 @@
import 'package:flutter/material.dart';
import '../news/feed.dart';
import '../models/game_cards.dart';
class Sport extends StatelessWidget {
static final List<Item> colorList = <Item>[
const Item('Football',[3]),
const Item("Basketball",[5,13]),
const Item("Soccer",[9,17]),
const Item('Baseball',[1]),
const Item('Softball',[12]),
const Item('Volleyball',[20]),
const Item('Tennis',[10,18]),
];
final feed = Feed(); // was var not final
final gameCard = GameCardFeed();
final String imageMale = 'images/male.png';
final String imageFemale = 'images/female.png';
static bool genderSportSwitch = false; //determines if sport needs the gender switch
static bool genderSport = false; //determines which gender switch is set M - false / F - True
static int sport_ID;
final String sport;
Sport(this.sport);
Item _curSport = colorList[0];
@override
Widget build(BuildContext context) {
Item _setDefault(){
Item _curSport;
for (Item i in colorList){
if (i.name == sport){
_curSport = i;
break;
}
}
return _curSport;
}
_curSport = _setDefault();
sport_ID = _curSport.sportID[0];
Item selectedSport;
_genderSwitcherCheck();
return StatefulBuilder(
builder: (context, StateSetter setState) => Scaffold(
appBar: AppBar(
centerTitle: false,
title: buildDropdownButton(selectedSport, setState),
backgroundColor: Colors.green,
//--Gender Switch-- Need to make condition to determine gender
actions: <Widget>[
if (genderSportSwitch)
Switch(
value: genderSport,
onChanged: (value) {
setState(() {
genderSport = value;
_genderSwitcherCheck();
});
},
inactiveThumbColor: Colors.lightBlue,
inactiveThumbImage: Image.asset(imageMale).image,
activeColor: Colors.pinkAccent,
activeThumbImage: Image.asset(imageFemale).image,
),
]
),
body: bodyBuilder(),
drawer: Drawer(
child: ListView(
children: <Widget>[
DrawerHeader(
child: Text(
'Drawer Header',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
decoration: BoxDecoration(
color: Colors.green,
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.home),
onPressed: () => Navigator.pushNamed(context, '/'),
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.table_chart),
onPressed: () => Navigator.pushNamed(context, '/Standing', arguments: [sport_ID, _curSport.name]),
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.calendar_today),
onPressed: () => Navigator.pushNamed(context, '/Schedule',arguments: [sport_ID, _curSport.name],),
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.message),
onPressed: () => Navigator.pushNamed(context, '/Chat',arguments: [_curSport.name,sport_ID]),
),
)
],
),
),
),
);
}
Widget bodyBuilder() {
return Column(
children: <Widget>[
HorizontalGameCards(gameCard: gameCard, sportID: sport_ID,),
Expanded(
child: VerticalNewsFeed(newsFeed: feed, sportFilter: _curSport.name),
),
],
);
}
DropdownButtonHideUnderline buildDropdownButton(Item selectedSport, StateSetter setState) {
return DropdownButtonHideUnderline(
child: DropdownButton<Item>(
value: selectedSport,
icon: Icon(Icons.arrow_drop_down),
iconSize: 28,
style: TextStyle(color: Colors.black, fontSize: 28),
iconEnabledColor: Colors.white,
hint: Text(
_curSport.name,
style: TextStyle(
color: Colors.white, fontSize: 28, fontWeight: FontWeight.bold),
),
onChanged: (Item value) {
setState(() {
_curSport = value;
_genderSwitcherCheck();
//print(sport_ID);
});
},
items: colorList.map<DropdownMenuItem<Item>>((Item item) {
return DropdownMenuItem<Item>(
value: item,
child: SizedBox(
child: Text(item.name),
width: 150,
),
);
}).toList(),
),
);
}
void _genderSwitcherCheck() {
if (_curSport.name == "Soccer" || _curSport.name == "Basketball" || _curSport.name == "Tennis" ){
genderSportSwitch = true;
sport_ID = genderSport ? _curSport.sportID[1] : _curSport.sportID[0];
} else {
genderSportSwitch = false;
sport_ID = _curSport.sportID[0];
}
//print(sport_ID);
}
}
class Item {
const Item(this.name, this.sportID);
final String name;
final List<int> sportID;
}

View File

@@ -0,0 +1,206 @@
import 'package:flutter/material.dart';
class sport_schedule {
final int id; //id for each game
final DateTime date; //date: 2020-09-05T00:00:00
final String location_indicator; //location_indicator: H-Home / A-Away
final String location; //location: Knoxville, Tenn., Charlotte, NC
// -- sport json --
final int idSport; //id: Each sport different number
final String sportTitle; //title: Football, Men's Soccer
final String gender; //gender: M - F
// -- opponent json --
final String opponentTitle; //title: Tennessee, Norfolk State
final String image;
// -- result json --
final String status; //status: W - T - L
final String team_score; //team_score:
final String opponent_score; //opponent_score:
final String postscore;
sport_schedule(
this.id, {
this.date,
this.location_indicator,
this.location,
this.idSport,
this.sportTitle,
this.gender,
this.opponentTitle,
this.image,
this.status,
this.team_score,
this.opponent_score,
this.postscore,
});
factory sport_schedule.fromJson(Map<String, dynamic> json) {
return sport_schedule(
json['id'],
date: DateTime.parse(json['date']),
location_indicator: json['location_indicator'],
location: json['location'],
idSport: json['sport']['id'],
sportTitle: json['sport']['title'],
gender: json['sport']['gender'],
opponentTitle: json['opponent']['title'],
image: json['opponent']['image'],
status: json['result']['status'],
team_score: json['result']['team_score'],
opponent_score: json['result']['opponent_score'],
postscore: json['result']['postscore'],
);
}
}
class GameCard extends StatelessWidget {
const GameCard({
Key key,
@required this.gameCard,
this.numCards = 2.25,
}) : super(key: key);
final sport_schedule gameCard;
final double numCards;
double widthIn(BuildContext context) {
return MediaQuery.of(context).size.width / numCards;
}
Text _pastGameScore(
String homeAway, String winLoss, String uncc, String opponent) {
if (homeAway == "H" || homeAway == "T") {
return (Text('$uncc - $opponent'));
} else {
return (Text('$opponent - $uncc'));
}
}
Image _homeAwayImageOrder(String h, String opposingTeam, bool l, BuildContext ctx) {
if ((h == "H") == l) {
return (Image.network(
'https://fiusports.com/images/logos/UNC-Charlotte.png?width=80&height=80&mode=max',
));
} else {
return (Image.network(
'https://charlotte49ers.com' + opposingTeam,
));
}
}
Color winLoss(String wl){
if (wl == "W") {
return Colors.green;
} else if (wl == "L") {
return Colors.red;
} else {
return Colors.grey;
}
}
@override
Widget build(BuildContext ctx) {
var _months = {
1: 'JAN',
2: 'FEB',
3: 'MAR',
4: 'APR',
5: 'MAY',
6: 'JUN',
7: 'JUL',
8: 'AUG',
9: 'SEP',
10: 'OCT',
11: 'NOV',
12: 'DEC'
};
var decoration = BoxDecoration(
border: Border.all(
color: winLoss(gameCard.status), //UNCC Green
width: 1.2,
),
borderRadius: BorderRadius.circular(2),
);
var logoWidth = 4.5;
return SizedBox(
width: widthIn(ctx),
child: Card(
semanticContainer: true,
clipBehavior: Clip.antiAliasWithSaveLayer,
child: Container(
decoration: decoration,
child: buildCard(ctx, logoWidth, _months),
),
),
);
}
Widget buildCard(BuildContext ctx, double logoWidth, Map<int, String> _months) {
return InkWell(
splashColor: Colors.green,
child: Container(
color: Colors.black12,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Expanded(
child: _homeAwayImageOrder(
gameCard.location_indicator,
gameCard.image,
true, ctx),
),
Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Wrap(
children: <Widget>[
if (gameCard.status == null) // no game yet
Text(
'${_months[gameCard.date.month]} ${gameCard.date.day}'
)
else
_pastGameScore(
gameCard.location_indicator,
gameCard.status,
gameCard.team_score,
gameCard.opponent_score,),
],
),
Wrap(
children: <Widget>[
if (gameCard.status != null) // no game yet
Text(
'${_months[gameCard.date.month]} ${gameCard.date.day}', textAlign: TextAlign.center,
)
else
Text('${gameCard.date.hour}:${gameCard.date.minute} PM'),
],
)
]
),
),
Expanded(
child: _homeAwayImageOrder(
gameCard.location_indicator,
gameCard.image,
false, ctx),
)
],
),
),
onTap: () => Navigator.pushNamed(ctx, '/Details', arguments: gameCard),
);
}
}

54
lib/screens/standing.dart Normal file
View File

@@ -0,0 +1,54 @@
import 'package:flutter/material.dart';
import '../team_standings.dart';
class Standing extends StatelessWidget {
final int sport_id;
final String sport_name;
Standing(List args)
: sport_id = args[0],
sport_name = args[1];
@override
Widget build(BuildContext context) {
return StatefulBuilder(
builder: (context, StateSetter setState) => Scaffold(
appBar: AppBar(
centerTitle: false,
title: Text("$sport_name Standings"),
backgroundColor: Colors.green,
),
body: ListView(
children: <Widget>[
HorizontalStandings(sportName: sport_name,),
],
),
drawer: Drawer(
child: ListView(
children: <Widget>[
DrawerHeader(
child: Text(
'Drawer Header',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
decoration: BoxDecoration(
color: Colors.green,
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.home),
onPressed: () => Navigator.pushNamed(context, '/'),
),
),
],
),
),
),
);
}
}

View File

@@ -0,0 +1,65 @@
import 'package:capstone_hungry_hippos/twitter_assets/twitterFeed.dart';
import 'package:flutter/material.dart';
import '../twitter_assets/tweet.dart';
class TwitterFeed extends StatelessWidget{
List<Tweet> fuck = [];
final test = new Tweet(1, "We'll get through this together, Niner Nation. #WeAreAllNiners", "@unccharlotte", "https://pbs.twimg.com/profile_images/1175214096280629249/QC79Xju2_400x400.jpg", "test");
final test2 = new Tweet(2, "Let's test your UNC Charlotte knowledge...do you know why we became the 49ers? Here's the full history on the pioneering spirit that shaped our trajectory http://bit.ly/UNCC-1949", "@unccharlotte", "https://pbs.twimg.com/profile_images/1175214096280629249/QC79Xju2_400x400.jpg", "test");
final test3 = new Tweet(3, "Niner Nation means uplifting each other. This 4/9 Day, let's show our students why #WeAreAllNiners by supporting the Student Emergency Relief Fund http://bit.ly/UNCC-SER", "@unccharlotte", "https://pbs.twimg.com/profile_images/1175214096280629249/QC79Xju2_400x400.jpg", "test");
final test4 = new Tweet(4, "Niner Nation: Chancellor Dubois shares that UNC Charlotte will be able to apply our established parking refund procedures with special considerations for the impact of COVID-19.", "@unccharlotte", "https://pbs.twimg.com/profile_images/1175214096280629249/QC79Xju2_400x400.jpg", "test");
final test5 = new Tweet(5, "4/9 Day is just for us, Niner Nation. From wherever you are, you're family #WeAreAllNiners", "@unccharlotte", "https://pbs.twimg.com/profile_images/1175214096280629249/QC79Xju2_400x400.jpg", "test");
final test6= new Tweet(6, "Niner Nation, #49erAlumni Gene Johnson 73 is getting us excited for 4/9 Day tomorrow! Put on your Niner gear, call your friends and lets celebrate together virtually \n Were all in this together! ", "@unccharlotte", "https://pbs.twimg.com/profile_images/1175214096280629249/QC79Xju2_400x400.jpg", "test");
final test7 = new Tweet(7, "From virtual events to one-on-one sessions with counselors, it's easy to stay connected with @UNCCAdmissions", "@unccharlotte", "https://pbs.twimg.com/profile_images/1175214096280629249/QC79Xju2_400x400.jpg", "test");
@override
Widget build(BuildContext context) {
fuck.add(test);
fuck.add(test2);
fuck.add(test3);
fuck.add(test4);
fuck.add(test5);
fuck.add(test6);
fuck.add(test7);
return StatefulBuilder(
builder: (context, StateSetter setState) => Scaffold(
appBar: AppBar(
centerTitle: false,
title: Text("49ers Tweets"),
backgroundColor: Colors.green,
),
body: Container(
color: Colors.black12,
child:
VerticalTwitterFeed(twitterFeed: fuck),
),
drawer: Drawer(
child: ListView(
children: <Widget>[
DrawerHeader(
child: Text(
'Drawer Header',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
decoration: BoxDecoration(
color: Colors.green,
),
),
ListTile(
title: IconButton(
icon: Icon(Icons.home),
onPressed: () => Navigator.pushNamed(context, '/'),
),
),
],
),
)
));
}
}

122
lib/team_standings.dart Normal file
View File

@@ -0,0 +1,122 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'screens/sport.dart';
class HorizontalStandings extends StatelessWidget {
static final standingsUrls = {
"football": [
"https://site.web.api.espn.com/apis/v2/sports/football/college-football/standings?region=us&lang=en&contentorigin=espn&group=12&sort=leaguewinpercent%3Adesc%2Cvsconf_wins%3Adesc%2Cvsconf_gamesbehind%3Aasc%2Cvsconf_playoffseed%3Aasc%2Cwins%3Adesc%2Closses%3Adesc%2Cplayoffseed%3Aasc%2Calpha%3Aasc",
],
"basketball": [
"https://site.web.api.espn.com/apis/v2/sports/basketball/mens-college-basketball/standings?region=us&lang=en&contentorigin=espn&group=11&sort=leaguewinpercent%3Adesc%2Cvsconf_wins%3Adesc%2Cvsconf_gamesbehind%3Aasc%2Cvsconf_playoffseed%3Aasc%2Cwins%3Adesc%2Closses%3Adesc%2Cplayoffseed%3Aasc%2Calpha%3Aasc",
"https://site.web.api.espn.com/apis/v2/sports/basketball/womens-college-basketball/standings?region=us&lang=en&contentorigin=espn&group=11&sort=leaguewinpercent%3Adesc%2Cvsconf_wins%3Adesc%2Cvsconf_gamesbehind%3Aasc%2Cvsconf_playoffseed%3Aasc%2Cwins%3Adesc%2Closses%3Adesc%2Cplayoffseed%3Aasc%2Calpha%3Aasc",
],
};
final String sportName;
const HorizontalStandings({Key key, this.sportName}) : super(key: key);
Future<Widget> getStandingsTable(String url) async {
var response = await http.get(url);
var body = json.decode(response.body);
if (body['children'].length == 0) body['children'] = [body];
var res = Center(
child: Column(
children: <Widget>[
Text(
"${body['name']}",
style: TextStyle(fontSize: 24),
),
Column(
children: body['children']
.map((conference) {
var teams = conference['standings']['entries'].map((team) {
var stats = {};
for (var stat in team['stats']) {
stats[stat['name']] = stat;
}
var source = team;
return {'stats': stats, 'source': source};
}).toList();
var interested = {
'football': ['vsConf', 'streak'],
'basketball': ['Season','streak']
}[sportName.toLowerCase()];
var table = Table(
defaultVerticalAlignment:
TableCellVerticalAlignment.middle,
children: teams
.map((data) {
var stats = data['stats'];
var team = data['source'];
var row = interested
.map((e) => stats[e])
.where((e) => e != null)
.map((s) => Text("${s['displayValue']}"))
.cast<Widget>()
.toList();
row.insert(0, Text(team['team']['name']));
row.insert(
0,
Image.network(team['team']['logos'][0]['href'],
height: 40));
return TableRow(children: row);
})
.cast<TableRow>()
.toList(),
);
return Column(
children: <Widget>[
Text(
conference['shortName'],
style: TextStyle(fontSize: 16),
),
table,
],
);
})
.cast<Widget>()
.toList()),
],
),
);
return res;
}
@override
Widget build(BuildContext context) {
var sportUrl = standingsUrls[sportName.toLowerCase()];
var idx = (Sport.genderSportSwitch && Sport.genderSport) ? 1 : 0;
var url = sportUrl[idx];
return Center(
child: Column(
children: <Widget>[
FutureBuilder<Widget>(
future: getStandingsTable(url),
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (!snapshot.hasData) return CircularProgressIndicator();
return snapshot.data;
},
)
],
),
);
}
}

View File

@@ -0,0 +1,69 @@
import 'package:flutter/material.dart';
class Tweet {
final int id;
final String text;
final String userName;
final String userImgUrl;
final String url;
Tweet(
this.id,
this.text,
this.userName,
this.userImgUrl,
this.url,
);
/*factory Tweet.fromJson(Map<String, dynamic> json) {
return Tweet(
json['id_str'],
text: json['text'],
userName: json['user']['name'],
userImgUrl: json['user']['profile_image_url_https'],
url: json['urls']['expanded_url'],
);
}
Commenting out till we figure out the API
*/
}
class TwitterCard extends StatelessWidget{
const TwitterCard({
Key key,
@required this.tweet,
}) : super(key: key);
final Tweet tweet;
@override
Widget build(BuildContext context) {
return Card(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 0),
child: ListTile(
leading: SizedBox(
height: 150,
width: 75,
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
fit: BoxFit.fill,
image: NetworkImage('${tweet.userImgUrl}'),
),
),
),
),
title: Text('${tweet.userName}'),
subtitle: Text('${tweet.text}'),
),
),
);
}
}

View File

@@ -0,0 +1,78 @@
import 'dart:io';
import 'package:capstone_hungry_hippos/screens/twitter_widget.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'tweet.dart';
class TwitterFeedCreation {
static final twitterBase = 'https://api.twitter.com/1.1/search';
static final apiKey = 'AFBfOqx8uXIUBZMxAFoQyO3zA';
static final apiSecret = '48Gp7nczz9SqExorwYuWpA6Nmviuox6Beq83kjH1XtYtunorym';
getToken() async {
http.Response response = await http.get('https://api.twitter.com/oauth2/token',);
}
/*Future<List<Tweet>> getPage({int size = 10}) async {
var url = '$twitterBase/tweets.json?q=from%3ACharlotteFTBL&result_type=mixed&count=$size';
http.Response response = await http.get(url,
headers: <String, String> {'authorization': apiKey,}
);
Iterable tweets = json.decode(response.body);
return tweets.map((e) => Tweet.fromJson(e)).toList();
} */
}
class VerticalTwitterFeed extends StatelessWidget{
final List<Tweet> twitterFeed;
const VerticalTwitterFeed({
Key key,
@required this.twitterFeed,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
itemCount: twitterFeed.length,
itemBuilder: (ctx, idx){
return TwitterCard(
tweet: twitterFeed[idx],
);
},
),
);
/* return Container(
child: FutureBuilder(
future: twitterFeed.getPage(),
builder: (ctx, snapshot){
if(!snapshot.hasData){
return Center(child: CircularProgressIndicator());
}else{
List<Tweet> tweets = snapshot.data;
return ListView.builder(
scrollDirection: Axis.vertical,
itemCount: tweets.length,
itemBuilder: (ctx, idx) {
return TwitterCard(
tweet: tweets[idx],
);
},
);
}
},
),
); */
}
}

View File

@@ -7,42 +7,70 @@ packages:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
version: "1.6.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
version: "2.4.1"
bloc:
dependency: transitive
description:
name: bloc
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "2.0.0"
cached_network_image:
dependency: transitive
description:
name: cached_network_image
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
version: "1.1.3"
chewie:
dependency: transitive
description:
name: chewie
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.10"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
version: "1.14.12"
convert:
dependency: transitive
description:
@@ -56,7 +84,7 @@ packages:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
version: "2.1.4"
cupertino_icons:
dependency: "direct main"
description:
@@ -64,37 +92,147 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
dio:
dependency: transitive
description:
name: dio
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.9"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.0"
file_picker:
dependency: transitive
description:
name: file_picker
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_bloc:
dependency: "direct main"
description:
name: flutter_bloc
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.0"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.2"
flutter_keyboard_visibility:
dependency: transitive
description:
name: flutter_keyboard_visibility
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.0"
flutter_markdown:
dependency: transitive
description:
name: flutter_markdown
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.5"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.7"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
http:
dependency: "direct main"
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.0+4"
version: "0.12.1"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.3"
version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.1.12"
image_picker:
dependency: transitive
description:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.5+3"
intl:
dependency: transitive
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.1"
jiffy:
dependency: transitive
description:
name: jiffy
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.1+1"
json_annotation:
dependency: transitive
description:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "0.11.4"
markdown:
dependency: transitive
description:
name: markdown
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
matcher:
dependency: transitive
description:
@@ -109,6 +247,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.8"
mime:
dependency: transitive
description:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.6+3"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4"
open_iconic_flutter:
dependency: transitive
description:
name: open_iconic_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
path:
dependency: transitive
description:
@@ -116,13 +275,34 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.7"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4+1"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
version: "1.9.0"
petitparser:
dependency: transitive
description:
@@ -130,13 +310,76 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
provider:
dependency: transitive
description:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.5+1"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.1.3"
rxdart:
dependency: transitive
description:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.23.1"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.7"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+7"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2+4"
simple_gesture_detector:
dependency: transitive
description:
name: simple_gesture_detector
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
sky_engine:
dependency: transitive
description: flutter
@@ -148,7 +391,21 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.5"
version: "1.7.0"
sqflite:
dependency: transitive
description:
name: sqflite
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0+1"
stack_trace:
dependency: transitive
description:
@@ -163,6 +420,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
stream_chat:
dependency: transitive
description:
name: stream_chat
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.26"
stream_chat_flutter:
dependency: "direct main"
description:
name: stream_chat_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.26"
string_scanner:
dependency: transitive
description:
@@ -170,6 +441,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
synchronized:
dependency: transitive
description:
name: synchronized
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
table_calendar:
dependency: "direct main"
description:
name: table_calendar
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.3"
table_sticky_headers:
dependency: "direct main"
description:
name: table_sticky_headers
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
term_glyph:
dependency: transitive
description:
@@ -183,7 +475,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.11"
version: "0.2.15"
typed_data:
dependency: transitive
description:
@@ -191,6 +483,41 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
url_launcher:
dependency: transitive
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "5.4.5"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+5"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.6"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.1+2"
uuid:
dependency: transitive
description:
name: uuid
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
vector_math:
dependency: transitive
description:
@@ -198,12 +525,55 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
video_player:
dependency: transitive
description:
name: video_player
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.9+1"
video_player_platform_interface:
dependency: transitive
description:
name: video_player_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
video_player_web:
dependency: transitive
description:
name: video_player_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2+1"
visibility_detector:
dependency: transitive
description:
name: visibility_detector
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
wakelock:
dependency: transitive
description:
name: wakelock
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4+1"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
version: "3.6.1"
sdks:
dart: ">=2.4.0 <3.0.0"
dart: ">=2.7.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"

View File

@@ -14,23 +14,27 @@ description: A sports app for UNC-Charlotte 49ers
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
#sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.6.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_bloc: ^3.2.0
stream_chat_flutter: ^0.1.2
http: ^0.12.0+4
shared_preferences: ^0.5.6+3
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
table_calendar:
table_sticky_headers:
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
@@ -43,9 +47,23 @@ flutter:
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
assets:
- assets/school_logos/FIU.png
- assets/school_logos/FAU.png
- assets/school_logos/LT.png
- assets/school_logos/Marshall.png
- assets/school_logos/MT.png
- assets/school_logos/NorthTexas.png
- assets/school_logos/ODU.png
- assets/school_logos/RiceOwls.png
- assets/school_logos/SouthernMiss.png
- assets/school_logos/UAB.png
- assets/school_logos/uncc.png
- assets/school_logos/UTEP.png
- assets/school_logos/UTSA.png
- assets/school_logos/wku.png
- images/male.png
- images/female.png
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.