Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ class _HomePageState extends State<HomePage> {
child: SingleChildScrollView(
child: Column(
children: [
const SizedBox(height: 5),
DialogTextInput(
label: "Event Key",
onSubmit: (value) {
Scouting.competitionName = value;
localStorage?.setString("compName", value);
},
initialText: Scouting.competitionName,
),
const SizedBox(height: 5),
DialogTextInput(
label: "Scouter name",
Expand Down
3 changes: 1 addition & 2 deletions lib/pages/summation/averages/insights_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class _InsightsPageState extends State<InsightsPage> {
@override
Widget build(BuildContext context) {
switch (_sortBy) {
// BUG: sorting breaks team names
case "total_score":
sortByTotalScore(widget.calculatedFormsData);
break;
Expand All @@ -59,7 +58,7 @@ class _InsightsPageState extends State<InsightsPage> {
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
const SizedBox(height: 5),
const SizedBox(height: 10),
TextButton(
child: Row(
mainAxisSize: MainAxisSize.min,
Expand Down
3 changes: 2 additions & 1 deletion lib/services/scouting/scouting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Scouting {

static List<BuildContext> _matchPagesContexts = [];

static const String competitionName = "2025isde1";
static String competitionName = "2025isde1";

static int _currentPage = -1;

Expand Down Expand Up @@ -242,6 +242,7 @@ class Scouting {
}

static void initializeData() {
competitionName = localStorage?.getString("compName") ?? competitionName;
data.scouter = localStorage?.getString("scouter");
}

Expand Down
5 changes: 3 additions & 2 deletions lib/widgets/scout_app_bar.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Flutter imports:
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

// Project imports:
import 'package:scouting_site/pages/home_page.dart';
Expand Down Expand Up @@ -67,13 +68,13 @@ Drawer getScoutHamburgerMenu(BuildContext context) {
DrawerHeader(
child: Column(
children: [
const Text("Scouting on: ${Scouting.competitionName}"),
Text("Scouting on: ${Scouting.competitionName}"),
Text("Scouter Name: ${Scouting.data.scouter}"),
],
),
),
ListTile(
leading: const Icon(Icons.biotech_rounded),
leading: const Icon(FontAwesomeIcons.binoculars),
title: const Text("Scout"),
onTap: () {
navigateTo(context, const HomePage());
Expand Down
8 changes: 8 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
font_awesome_flutter:
dependency: "direct main"
description:
name: font_awesome_flutter
sha256: d3a89184101baec7f4600d58840a764d2ef760fe1c5a20ef9e6b0e9b24a07a3a
url: "https://pub.dev"
source: hosted
version: "10.8.0"
frontend_server_client:
dependency: transitive
description:
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: scouting_site
description: "A new Flutter project."
description: "A generic scouting site for FIRST teams"
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
Expand Down Expand Up @@ -57,6 +57,7 @@ dependencies:
carousel_slider: ^5.0.0
camera: ^0.11.0+2
geekyants_flutter_gauges: ^1.0.4
font_awesome_flutter: ^10.8.0

dev_dependencies:
flutter_test:
Expand Down
Loading