Product Add Done
This commit is contained in:
@@ -12,6 +12,8 @@ import '../providers/auth_provider.dart';
|
||||
import '../../transactions/providers/providers.dart';
|
||||
|
||||
import '../../../core/theme/theme_provider.dart';
|
||||
import '../../business/providers/business_mode_provider.dart';
|
||||
import '../../business/presentation/settings/business_settings_screen.dart';
|
||||
|
||||
class ProfileScreen extends ConsumerStatefulWidget {
|
||||
const ProfileScreen({super.key});
|
||||
@@ -114,7 +116,37 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
|
||||
Consumer(
|
||||
builder: (context, ref, child) {
|
||||
final isBusinessMode = ref.watch(businessModeProvider);
|
||||
return Column(
|
||||
children: [
|
||||
SwitchListTile(
|
||||
secondary: const Icon(LucideIcons.briefcase),
|
||||
title: const Text('Business Mode'),
|
||||
subtitle: const Text('Inventory and sales management'),
|
||||
value: isBusinessMode,
|
||||
onChanged: (val) {
|
||||
ref.read(businessModeProvider.notifier).toggleMode();
|
||||
},
|
||||
),
|
||||
if (isBusinessMode) ...[
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
leading: const Icon(LucideIcons.settings),
|
||||
title: const Text('Business Settings'),
|
||||
subtitle: const Text('Tax, Modules, POS'),
|
||||
trailing: const Icon(LucideIcons.chevronRight),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (_) => const BusinessSettingsScreen()));
|
||||
},
|
||||
),
|
||||
]
|
||||
],
|
||||
);
|
||||
}
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
leading: const Icon(LucideIcons.helpCircle),
|
||||
title: const Text('Help & Support'),
|
||||
|
||||
Reference in New Issue
Block a user