import 'package:flutter/material.dart'; void main() => runApp(const MaterialApp(home: WelcomeScreen(), debugShowCheckedModeBanner: false)); // 1. वेलकम स्क्रीन class WelcomeScreen extends StatelessWidget {   const WelcomeScreen({super.key});   @override   Widget build(BuildContext context) {     return Scaffold(       body: SafeArea(         child: SingleChildScrollView(           child: Padding(             padding: const EdgeInsets.all(24.0),             child: Column(               children: [                 const SizedBox(height: 20),                 const Icon(Icons.storefront, size: 70, color: Colors.indigo),                 const SizedBox(height: 10),                 const Text('शॉप और बिल मैनेजर', style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)),                 const SizedBox(height: 30),                 ElevatedButton(                   style: ElevatedButton.styleFrom(minimumSize: const Size(double.infinity, 50), backgroundColor: Colors.indigo),                   onPressed: () => Navigator.push(context, MaterialPageRoute(builder: (context) => const OwnerDashboard())),                   child: const Text('मैं दुकानदार हूँ (Business Login)', style: TextStyle(color: Colors.white)),                 ),                 const SizedBox(height: 15),                 OutlinedButton(                   style: OutlinedButton.styleFrom(minimumSize: const Size(double.infinity, 50), side: const BorderSide(color: Colors.indigo)),                   onPressed: () => Navigator.push(context, MaterialPageRoute(builder: (context) => const CustomerCatalog())),                   child: const Text('मैं ग्राहक हूँ (Customer Catalog)', style: TextStyle(color: Colors.indigo)),                 ),               ],             ),           ),         ),       ),     );   } } // ग्लोबल स्टेट (दुकान की जानकारी और इन्वेंटरी डेटा) Map shopProfile = {'name': 'कृष्णा जनरल स्टोर', 'address': '123, मेन मार्केट', 'phone': '9876543210'}; List> inventory = [   {'name': 'फॉर्च्यून रिफाइंड तेल', 'cost_price': 120, 'selling_price': 145, 'stock': 50, 'is_public': true},   {'name': 'आशीर्वाद आटा 5kg', 'cost_price': 210, 'selling_price': 250, 'stock': 30, 'is_public': true},   {'name': 'गोपनीय सप्लायर आइटम', 'cost_price': 50, 'selling_price': 90, 'stock': 5, 'is_public': false}, ]; // 2. शॉप ओनर डैशबोर्ड (एडिट बटन के साथ) class OwnerDashboard extends StatefulWidget {   const OwnerDashboard({super.key});   @override   State createState() => _OwnerDashboardState(); } class _OwnerDashboardState extends State {   @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title: Text(shopProfile['name']!, style: const TextStyle(color: Colors.white)),         backgroundColor: Colors.indigo,         iconTheme: const IconThemeData(color: Colors.white),         actions: [           IconButton(             icon: const Icon(Icons.edit, color: Colors.white),             onPressed: () async {               // एडिट स्क्रीन पर जाना और वापस आने पर स्क्रीन रीफ्रेश करना               await Navigator.push(context, MaterialPageRoute(builder: (context) => const EditProfileScreen()));               setState(() {});             },           )         ],       ),       body: Padding(         padding: const EdgeInsets.all(16.0),         child: Column(           crossAxisAlignment: CrossAxisAlignment.start,           children: [             Container(               width: double.infinity,               padding: const EdgeInsets.all(12),               decoration: BoxDecoration(color: Colors.indigo.shade50, borderRadius: BorderRadius.circular(8)),               child: Text(                 'पता: ${shopProfile['address']}\nफोन: ${shopProfile['phone']}',                 style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),               ),             ),             const SizedBox(height: 15),             const Text('पूरी इन्वेंटरी (शॉप ओनर व्यू)', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)),             const Divider(),             Expanded(               child: ListView.builder(                 itemCount: inventory.length,                 itemBuilder: (context, index) {                   final item = inventory[index];                   return Card(                     margin: const EdgeInsets.symmetric(vertical: 6),                     child: ListTile(                       title: Text(item['name'], style: const TextStyle(fontWeight: FontWeight.bold)),                       subtitle: Text('स्टॉक: ${item['stock']} | खरीद: ₹${item['cost_price']}'),                       trailing: Text('बिक्री: ₹${item['selling_price']}', style: const TextStyle(fontWeight: FontWeight.bold, color: Colors.indigo)),                     ),                   );                 },               ),             ),           ],         ),       ),     );   } } // 3. दुकान की जानकारी एडिट करने वाली नई स्क्रीन class EditProfileScreen extends StatefulWidget {   const EditProfileScreen({super.key});   @override   State createState() => _EditProfileScreenState(); } class _EditProfileScreenState extends State {   final _nameController = TextEditingController(text: shopProfile['name']);   final _addressController = TextEditingController(text: shopProfile['address']);   final _phoneController = TextEditingController(text: shopProfile['phone']);   @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(title: const Text('दुकान की जानकारी बदलें', style: TextStyle(color: Colors.white)), backgroundColor: Colors.indigo, iconTheme: const IconThemeData(color: Colors.white)),       body: Padding(         padding: const EdgeInsets.all(16.0),         child: Column(           children: [             TextField(controller: _nameController, decoration: const InputDecoration(labelText: 'दुकान का नाम', border: OutlineInputBorder())),             const SizedBox(height: 15),             TextField(controller: _addressController, decoration: const InputDecoration(labelText: 'दुकान का पता', border: OutlineInputBorder())),             const SizedBox(height: 15),             TextField(controller: _phoneController, decoration: const InputDecoration(labelText: 'फ़�न नंबर', border: OutlineInputBorder())),             const SizedBox(height: 30),             ElevatedButton(               style: ElevatedButton.styleFrom(minimumSize: const Size(double.infinity, 50), backgroundColor: Colors.indigo),               onPressed: () {                 shopProfile['name'] = _nameController.text;                 shopProfile['address'] = _addressController.text;                 shopProfile['phone'] = _phoneController.text;                 Navigator.pop(context); // वापस ओनर डैशबोर्ड पर जाएं               },               child: const Text('बदलाव सुरक्षित करें (Save)', style: TextStyle(color: Colors.white, fontSize: 16)),             )           ],         ),       ),     );   } } // 4. कस्टमर कैटलॉग स्क्रीन class CustomerCatalog extends StatelessWidget {   const CustomerCatalog({super.key});   @override   Widget build(BuildContext context) {     final publicItems = inventory.where((item) => item['is_public'] == true).toList();     return Scaffold(       appBar: AppBar(title: Text('${shopProfile['name']} - कैटलॉग', style: const TextStyle(color: Colors.white)), backgroundColor: Colors.teal, iconTheme: const IconThemeData(color: Colors.white)),       body: ListView.builder(         itemCount: publicItems.length,         itemBuilder: (context, index) {           final item = publicItems[index];           return ListTile(             leading: const Icon(Icons.shopping_bag, color: Colors.teal),             title: Text(item['name']),             trailing: Text('₹${item['selling_price']}', style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color: Colors.teal)),           );         },       ),     );   } }