prodycrts
This commit is contained in:
224
lib/app.dart
224
lib/app.dart
@@ -117,227 +117,3 @@ class _AppBuilder extends ConsumerWidget {
|
||||
}
|
||||
}
|
||||
|
||||
/// Placeholder home page
|
||||
///
|
||||
/// This is a temporary home screen that will be replaced with the actual
|
||||
/// home page implementation from features/home/presentation/pages/home_page.dart
|
||||
///
|
||||
/// The actual home page will include:
|
||||
/// - Membership card display (Diamond/Platinum/Gold tiers)
|
||||
/// - Quick action grid
|
||||
/// - Bottom navigation bar
|
||||
/// - Floating action button for chat
|
||||
class _PlaceholderHomePage extends ConsumerWidget {
|
||||
const _PlaceholderHomePage();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Worker App'),
|
||||
centerTitle: true,
|
||||
),
|
||||
body: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// App logo placeholder
|
||||
Container(
|
||||
width: 120,
|
||||
height: 120,
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.primary,
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.business_center,
|
||||
size: 64,
|
||||
color: theme.colorScheme.onPrimary,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
|
||||
// Welcome text
|
||||
Text(
|
||||
'Chào mừng đến với Worker App',
|
||||
style: theme.textTheme.headlineMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: theme.colorScheme.onSurface,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Description
|
||||
Text(
|
||||
'Ứng dụng dành cho thầu thợ, kiến trúc sư, đại lý và môi giới',
|
||||
style: theme.textTheme.bodyLarge?.copyWith(
|
||||
color: theme.colorScheme.onSurface.withValues(alpha: 0.7),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 48),
|
||||
|
||||
// Status indicators
|
||||
const _StatusIndicator(
|
||||
icon: Icons.check_circle,
|
||||
color: Colors.green,
|
||||
label: 'Hive Database: Initialized',
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const _StatusIndicator(
|
||||
icon: Icons.check_circle,
|
||||
color: Colors.green,
|
||||
label: 'Riverpod: Active',
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const _StatusIndicator(
|
||||
icon: Icons.check_circle,
|
||||
color: Colors.green,
|
||||
label: 'Material 3 Theme: Loaded',
|
||||
),
|
||||
const SizedBox(height: 48),
|
||||
|
||||
// Next steps card
|
||||
Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.info_outline,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
'Next Steps',
|
||||
style: theme.textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const _NextStepItem(
|
||||
number: '1',
|
||||
text: 'Implement authentication flow',
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const _NextStepItem(
|
||||
number: '2',
|
||||
text: 'Create home page with membership cards',
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const _NextStepItem(
|
||||
number: '3',
|
||||
text: 'Set up navigation and routing',
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const _NextStepItem(
|
||||
number: '4',
|
||||
text: 'Implement feature modules',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Floating action button (will be used for chat)
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Chat feature coming soon!'),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: const Icon(Icons.chat_bubble_outline),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Status indicator widget
|
||||
class _StatusIndicator extends StatelessWidget {
|
||||
const _StatusIndicator({
|
||||
required this.icon,
|
||||
required this.color,
|
||||
required this.label,
|
||||
});
|
||||
|
||||
final IconData icon;
|
||||
final Color color;
|
||||
final String label;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(icon, color: color, size: 20),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
label,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Next step item widget
|
||||
class _NextStepItem extends StatelessWidget {
|
||||
const _NextStepItem({
|
||||
required this.number,
|
||||
required this.text,
|
||||
});
|
||||
|
||||
final String number;
|
||||
final String text;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 24,
|
||||
height: 24,
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.primary.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
number,
|
||||
style: theme.textTheme.labelSmall?.copyWith(
|
||||
color: theme.colorScheme.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
text,
|
||||
style: theme.textTheme.bodyMedium,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user