feat: consolidate backend and docker-compose setup
This commit is contained in:
commit
ff3753a745
306 files changed
+35450
No files matched your search
@@ -0,0 +1,116 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class AppConfig {
|
||||
// API Configuration
|
||||
static const String apiBaseUrl = 'http://192.168.80.84:3000/api/v1';
|
||||
static const String loginEndpoint = '/auth/login';
|
||||
static const String uploadDocumentEndpoint = '/documents/upload';
|
||||
static const String fetchDocumentsEndpoint = '/documents';
|
||||
|
||||
// App Constants
|
||||
static const String appName = 'Prima Mart Scanner';
|
||||
static const String appVersion = '1.0.0';
|
||||
|
||||
// Colors - Prima Fresh Mart Theme
|
||||
static const Color primaryColor = Color(0xFF6EBE4A); // Prima Green
|
||||
static const Color secondaryColor = Color(0xFF005DAA); // Prima Blue
|
||||
static const Color accentColor = Color(0xFFFFCC00); // Prima Yellow
|
||||
static const Color backgroundColor = Color(0xFFF8F9FA); // Off-white
|
||||
static const Color surfaceColor = Colors.white;
|
||||
static const Color errorColor = Color(0xFFD32F2F);
|
||||
static const Color successColor = Color(0xFF388E3C);
|
||||
|
||||
// Text Colors
|
||||
static const Color textPrimary = Color(0xFF212121);
|
||||
static const Color textSecondary = Color(0xFF757575);
|
||||
static const Color textOnPrimary = Colors.white;
|
||||
|
||||
// Typography Config
|
||||
// Using Google Fonts - Inter for clean, modern look
|
||||
static TextStyle get h1 => GoogleFonts.inter(
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: textPrimary,
|
||||
);
|
||||
|
||||
static TextStyle get h2 => GoogleFonts.inter(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: textPrimary,
|
||||
);
|
||||
|
||||
static TextStyle get h3 => GoogleFonts.inter(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: textPrimary,
|
||||
);
|
||||
|
||||
static TextStyle get bodyLarge => GoogleFonts.inter(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textPrimary,
|
||||
);
|
||||
|
||||
static TextStyle get bodyMedium => GoogleFonts.inter(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textPrimary,
|
||||
);
|
||||
|
||||
static TextStyle get bodySmall => GoogleFonts.inter(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: textSecondary,
|
||||
);
|
||||
|
||||
// Theme Data Builder
|
||||
static ThemeData get lightTheme {
|
||||
return ThemeData(
|
||||
primaryColor: primaryColor,
|
||||
scaffoldBackgroundColor: backgroundColor,
|
||||
colorScheme: const ColorScheme.light(
|
||||
primary: primaryColor,
|
||||
secondary: secondaryColor,
|
||||
surface: surfaceColor,
|
||||
error: errorColor,
|
||||
),
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: surfaceColor,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
iconTheme: const IconThemeData(color: textPrimary),
|
||||
titleTextStyle: h2.copyWith(color: textPrimary),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: textOnPrimary,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24),
|
||||
textStyle: bodyLarge.copyWith(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: surfaceColor,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(color: Colors.grey.shade300),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(color: Colors.grey.shade300),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: primaryColor, width: 2),
|
||||
),
|
||||
labelStyle: bodyMedium.copyWith(color: textSecondary),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user