Skip to content

Commit 8e7e3c5

Browse files
authored
Redesigned some buttons (#20)
1 parent 2885d21 commit 8e7e3c5

6 files changed

Lines changed: 25 additions & 6 deletions

File tree

lib/pages/home_page.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ class _HomePageState extends State<HomePage> {
112112
child: SingleChildScrollView(
113113
child: Column(
114114
children: [
115+
const SizedBox(height: 5),
116+
DialogTextInput(
117+
label: "Event Key",
118+
onSubmit: (value) {
119+
Scouting.competitionName = value;
120+
localStorage?.setString("compName", value);
121+
},
122+
initialText: Scouting.competitionName,
123+
),
115124
const SizedBox(height: 5),
116125
DialogTextInput(
117126
label: "Scouter name",

lib/pages/summation/averages/insights_page.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class _InsightsPageState extends State<InsightsPage> {
3939
@override
4040
Widget build(BuildContext context) {
4141
switch (_sortBy) {
42-
// BUG: sorting breaks team names
4342
case "total_score":
4443
sortByTotalScore(widget.calculatedFormsData);
4544
break;
@@ -59,7 +58,7 @@ class _InsightsPageState extends State<InsightsPage> {
5958
child: Column(
6059
mainAxisAlignment: MainAxisAlignment.start,
6160
children: [
62-
const SizedBox(height: 5),
61+
const SizedBox(height: 10),
6362
TextButton(
6463
child: Row(
6564
mainAxisSize: MainAxisSize.min,

lib/services/scouting/scouting.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Scouting {
2424

2525
static List<BuildContext> _matchPagesContexts = [];
2626

27-
static const String competitionName = "2025isde1";
27+
static String competitionName = "2025isde1";
2828

2929
static int _currentPage = -1;
3030

@@ -242,6 +242,7 @@ class Scouting {
242242
}
243243

244244
static void initializeData() {
245+
competitionName = localStorage?.getString("compName") ?? competitionName;
245246
data.scouter = localStorage?.getString("scouter");
246247
}
247248

lib/widgets/scout_app_bar.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Flutter imports:
22
import 'package:flutter/material.dart';
3+
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
34

45
// Project imports:
56
import 'package:scouting_site/pages/home_page.dart';
@@ -67,13 +68,13 @@ Drawer getScoutHamburgerMenu(BuildContext context) {
6768
DrawerHeader(
6869
child: Column(
6970
children: [
70-
const Text("Scouting on: ${Scouting.competitionName}"),
71+
Text("Scouting on: ${Scouting.competitionName}"),
7172
Text("Scouter Name: ${Scouting.data.scouter}"),
7273
],
7374
),
7475
),
7576
ListTile(
76-
leading: const Icon(Icons.biotech_rounded),
77+
leading: const Icon(FontAwesomeIcons.binoculars),
7778
title: const Text("Scout"),
7879
onTap: () {
7980
navigateTo(context, const HomePage());

pubspec.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,14 @@ packages:
504504
description: flutter
505505
source: sdk
506506
version: "0.0.0"
507+
font_awesome_flutter:
508+
dependency: "direct main"
509+
description:
510+
name: font_awesome_flutter
511+
sha256: d3a89184101baec7f4600d58840a764d2ef760fe1c5a20ef9e6b0e9b24a07a3a
512+
url: "https://pub.dev"
513+
source: hosted
514+
version: "10.8.0"
507515
frontend_server_client:
508516
dependency: transitive
509517
description:

pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: scouting_site
2-
description: "A new Flutter project."
2+
description: "A generic scouting site for FIRST teams"
33
# The following line prevents the package from being accidentally published to
44
# pub.dev using `flutter pub publish`. This is preferred for private packages.
55
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
@@ -57,6 +57,7 @@ dependencies:
5757
carousel_slider: ^5.0.0
5858
camera: ^0.11.0+2
5959
geekyants_flutter_gauges: ^1.0.4
60+
font_awesome_flutter: ^10.8.0
6061

6162
dev_dependencies:
6263
flutter_test:

0 commit comments

Comments
 (0)