payfrit-app/lib/screens/about_screen.dart
John Mizerek c4792189dd App Store Version 2: Beacon scanning, preload caching, business selector
Features:
- Beacon scanner service for detecting nearby beacons
- Beacon cache for offline-first beacon resolution
- Preload cache for instant menu display
- Business selector screen for multi-location support
- Rescan button widget for quick beacon refresh
- Sign-in dialog for guest checkout flow
- Task type model for server tasks

Improvements:
- Enhanced menu browsing with category filtering
- Improved cart view with better modifier display
- Order history with detailed order tracking
- Chat screen improvements
- Better error handling in API service

Fixes:
- CashApp payment return crash fix
- Modifier nesting issues resolved
- Auto-expand modifier groups

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 19:51:54 -08:00

205 lines
5.8 KiB
Dart

import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';
class AboutScreen extends StatefulWidget {
const AboutScreen({super.key});
@override
State<AboutScreen> createState() => _AboutScreenState();
}
class _AboutScreenState extends State<AboutScreen> {
String _version = '';
@override
void initState() {
super.initState();
_loadVersion();
}
Future<void> _loadVersion() async {
final info = await PackageInfo.fromPlatform();
if (mounted) {
setState(() {
_version = 'Version ${info.version}';
});
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('About Payfrit'),
),
body: ListView(
padding: const EdgeInsets.all(24),
children: [
// Logo/Icon
Center(
child: Container(
width: 100,
height: 100,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primaryContainer,
borderRadius: BorderRadius.circular(20),
),
child: Icon(
Icons.restaurant_menu,
size: 50,
color: Theme.of(context).colorScheme.primary,
),
),
),
const SizedBox(height: 24),
// App name
Center(
child: Text(
'Payfrit',
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
fontWeight: FontWeight.bold,
),
),
),
const SizedBox(height: 4),
// Version
Center(
child: Text(
_version,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
),
const SizedBox(height: 32),
// Description
Text(
'Payfrit makes dining out easier. Order from your table, split the bill with friends, and pay without waiting.',
style: Theme.of(context).textTheme.bodyLarge,
textAlign: TextAlign.center,
),
const SizedBox(height: 32),
// Features section
_buildSectionHeader(context, 'Features'),
const SizedBox(height: 12),
_buildFeatureItem(
context,
Icons.qr_code_scanner,
'Scan & Order',
'Scan the table beacon to browse the menu and order directly from your phone',
),
_buildFeatureItem(
context,
Icons.group,
'Group Orders',
'Invite friends to join your order and split the bill easily',
),
_buildFeatureItem(
context,
Icons.delivery_dining,
'Delivery & Takeaway',
'Order for delivery or pick up when dining in isn\'t an option',
),
_buildFeatureItem(
context,
Icons.payment,
'Easy Payment',
'Pay your share securely with just a few taps',
),
const SizedBox(height: 32),
// Contact section
_buildSectionHeader(context, 'Contact'),
const SizedBox(height: 12),
ListTile(
leading: const Icon(Icons.help_outline),
title: const Text('help.payfrit.com'),
contentPadding: EdgeInsets.zero,
),
ListTile(
leading: const Icon(Icons.language),
title: const Text('www.payfrit.com'),
contentPadding: EdgeInsets.zero,
),
const SizedBox(height: 32),
// Legal
Center(
child: Text(
'\u00a9 2025 Payfrit. All rights reserved.',
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
),
const SizedBox(height: 16),
],
),
);
}
Widget _buildSectionHeader(BuildContext context, String title) {
return Text(
title,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.primary,
),
);
}
Widget _buildFeatureItem(
BuildContext context,
IconData icon,
String title,
String description,
) {
return Padding(
padding: const EdgeInsets.only(bottom: 16),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primaryContainer.withValues(alpha: 0.5),
borderRadius: BorderRadius.circular(8),
),
child: Icon(
icon,
size: 24,
color: Theme.of(context).colorScheme.primary,
),
),
const SizedBox(width: 16),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: Theme.of(context).textTheme.titleSmall?.copyWith(
fontWeight: FontWeight.w600,
),
),
const SizedBox(height: 2),
Text(
description,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
],
),
),
],
),
);
}
}