Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 committed Aug 13, 2023
0 parents commit 8c9e864
Show file tree
Hide file tree
Showing 103 changed files with 10,266 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
45 changes: 45 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.

version:
revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
channel: stable

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
- platform: android
create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
- platform: ios
create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
- platform: linux
create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
- platform: macos
create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
- platform: web
create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
- platform: windows
create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff
base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ![Elastic Logo](assets/logos/logo_full.png)

A simple, modern dashboard for FRC teams.
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include: package:flutter_lints/flutter.yaml
18 changes: 18 additions & 0 deletions assets/fields/2023-chargedup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"game": "Charged Up",
"field-image": "assets/fields/2023-field.png",
"field-corners": {
"top-left": [
46,
36
],
"bottom-right": [
1088,
544
]
},
"field-size": [
16.54,
8.01
]
}
Binary file added assets/fields/2023-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/first-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logos/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logos/logo_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flutter_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flutter_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flutter_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import 'package:elastic_dashboard/pages/dashboard_page.dart';
import 'package:elastic_dashboard/services/field_images.dart';
import 'package:elastic_dashboard/services/globals.dart';
import 'package:elastic_dashboard/services/nt4_connection.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:window_manager/window_manager.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
final SharedPreferences preferences = await SharedPreferences.getInstance();
await windowManager.ensureInitialized();

Globals.gridSize = preferences.getInt('grid_size') ?? 128;
Globals.snapToGrid = preferences.getBool('snap_to_grid') ?? true;
Globals.showGrid = preferences.getBool('show_grid') ?? false;

NT4Connection.connect();

await FieldImages.loadFields('assets/fields/');

await windowManager.setTitleBarStyle(TitleBarStyle.hidden);

runApp(Elastic(preferences: preferences));
}

class Elastic extends StatelessWidget {
final SharedPreferences preferences;

const Elastic({super.key, required this.preferences});

@override
Widget build(BuildContext context) {
ThemeData theme = ThemeData(
useMaterial3: true,
colorSchemeSeed: Colors.blueAccent,
brightness: Brightness.dark,
);
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Elastic',
theme: theme,
home: DashboardPage(
preferences: preferences,
),
);
}
}
Loading

0 comments on commit 8c9e864

Please sign in to comment.