premier app version beta
This commit is contained in:
48
lib/core/constants/app_constants.dart
Normal file
48
lib/core/constants/app_constants.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
class AppConstants {
|
||||
AppConstants._();
|
||||
|
||||
// Database
|
||||
static const String databaseName = 'bully_targets.db';
|
||||
static const int databaseVersion = 1;
|
||||
|
||||
// Tables
|
||||
static const String sessionsTable = 'sessions';
|
||||
static const String shotsTable = 'shots';
|
||||
|
||||
// Image processing
|
||||
static const double minImpactRadius = 2.0;
|
||||
static const double maxImpactRadius = 20.0;
|
||||
static const int gaussianBlurSize = 5;
|
||||
static const double houghCirclesDp = 1.0;
|
||||
static const double houghCirclesMinDist = 20.0;
|
||||
static const int houghCirclesParam1 = 50;
|
||||
static const int houghCirclesParam2 = 30;
|
||||
|
||||
// Scoring zones for concentric targets (10 zones, from center)
|
||||
static const List<double> concentricZoneRadii = [
|
||||
0.05, // Zone 10 (bullseye)
|
||||
0.10, // Zone 9
|
||||
0.15, // Zone 8
|
||||
0.20, // Zone 7
|
||||
0.25, // Zone 6
|
||||
0.30, // Zone 5
|
||||
0.40, // Zone 4
|
||||
0.50, // Zone 3
|
||||
0.65, // Zone 2
|
||||
0.80, // Zone 1
|
||||
];
|
||||
|
||||
// Silhouette scoring zones (as percentage of height from top)
|
||||
static const Map<String, double> silhouetteZones = {
|
||||
'head': 0.15, // Top 15% = head = 5 points
|
||||
'center': 0.45, // 15-45% = center mass = 5 points
|
||||
'body': 0.70, // 45-70% = body = 4 points
|
||||
'lower': 1.0, // 70-100% = lower = 3 points
|
||||
};
|
||||
|
||||
// UI
|
||||
static const double defaultPadding = 16.0;
|
||||
static const double smallPadding = 8.0;
|
||||
static const double largePadding = 24.0;
|
||||
static const double borderRadius = 12.0;
|
||||
}
|
||||
91
lib/core/theme/app_theme.dart
Normal file
91
lib/core/theme/app_theme.dart
Normal file
@@ -0,0 +1,91 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AppTheme {
|
||||
AppTheme._();
|
||||
|
||||
static const Color primaryColor = Color(0xFF1E88E5);
|
||||
static const Color secondaryColor = Color(0xFF43A047);
|
||||
static const Color errorColor = Color(0xFFE53935);
|
||||
static const Color warningColor = Color(0xFFFFA726);
|
||||
static const Color successColor = Color(0xFF66BB6A);
|
||||
|
||||
static const Color backgroundColor = Color(0xFFF5F5F5);
|
||||
static const Color surfaceColor = Colors.white;
|
||||
static const Color textPrimary = Color(0xFF212121);
|
||||
static const Color textSecondary = Color(0xFF757575);
|
||||
|
||||
// Impact colors for visualization
|
||||
static const Color impactColor = Color(0xFFFF5722);
|
||||
static const Color impactOutlineColor = Color(0xFFFFFFFF);
|
||||
static const Color groupingCenterColor = Color(0xFF2196F3);
|
||||
static const Color groupingCircleColor = Color(0x4D2196F3);
|
||||
|
||||
// Score zone colors
|
||||
static const List<Color> zoneColors = [
|
||||
Color(0xFFFFEB3B), // Zone 10 - Gold
|
||||
Color(0xFFFFEB3B), // Zone 9
|
||||
Color(0xFFFF5722), // Zone 8
|
||||
Color(0xFFFF5722), // Zone 7
|
||||
Color(0xFF2196F3), // Zone 6
|
||||
Color(0xFF2196F3), // Zone 5
|
||||
Color(0xFF4CAF50), // Zone 4
|
||||
Color(0xFF4CAF50), // Zone 3
|
||||
Color(0xFFFFFFFF), // Zone 2
|
||||
Color(0xFFFFFFFF), // Zone 1
|
||||
];
|
||||
|
||||
static ThemeData get lightTheme {
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: primaryColor,
|
||||
brightness: Brightness.light,
|
||||
),
|
||||
scaffoldBackgroundColor: backgroundColor,
|
||||
appBarTheme: const AppBarTheme(
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
cardTheme: CardThemeData(
|
||||
elevation: 2,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
),
|
||||
floatingActionButtonTheme: const FloatingActionButtonThemeData(
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static ThemeData get darkTheme {
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: primaryColor,
|
||||
brightness: Brightness.dark,
|
||||
),
|
||||
appBarTheme: const AppBarTheme(
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
),
|
||||
cardTheme: CardThemeData(
|
||||
elevation: 2,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user