Create a comprehensive Point of Sale (POS) system in Flutter, incorporating the following features and requirements:

Core Features:

    User Authentication: Implement a login screen for staff members with user roles (e.g., cashier, manager). Use a local backend database for authentication. Ensure secure password storage and transmission.
    Product Management: Add, edit, and delete products with product categories. Implement barcode scanning functionality using a Flutter package (e.g., flutter_barcode_scanner). Track inventory levels and update in real-time.
    Sales Interface: Implement product search and selection functionality with autocomplete. Include a shopping cart with the ability to apply discounts or promotions. Calculate total sales and display subtotal and total.
    Payment Processing: Generate receipts with order details and payment information. Implement payment processing using a single payment method (e.g., cash).
    Order Management: View and manage current orders with order status and details. Implement order history and search functionality with filtering and sorting.
    Reporting and Analytics: Generate sales reports (daily, weekly, monthly) with revenue and product sales data. Display best-selling products with sales data and ranking. Provide revenue analysis with charts and graphs.
    Settings and Configuration: Implement receipt customization with logo, footer, and header options. Allow for offline mode operation without internet connection.
    UI/UX Design: Design a responsive layout for different screen sizes using Flutter's built-in widgets and media queries. Create an intuitive and user-friendly interface with clear typography and color scheme. Implement multi-language support for Arabic and English with right-to-left (RTL) layout for Arabic.
    Notifications: Send low stock alerts with product details and quantity. Provide daily sales summaries with revenue and product sales data.
    Hardware Integration: Control cash drawer with opening and closing functionality. Integrate receipt printer with printing functionality. Support barcode scanner with scanning functionality.

Non-Essential Features (Exclude):

    Support multiple payment methods (cash, credit card, etc.).
    Integration with payment gateways.
    Customer Management (customer database, loyalty program integration).
    Settings and Configuration for tax rates, currency settings, and integrations (accounting software, e-commerce platform sync).

Technical Requirements:

    Implement state management using Provider, Bloc, or Riverpod for efficient data handling.
    Utilize Flutter packages for specific functionalities like barcode scanning, printing, etc.
    Design reusable widgets for common UI elements.
    Implement responsive layouts using Flutter's built-in widgets and media queries.
    Use asynchronous programming for API calls and database operations.
    Implement proper error handling and logging with crash reporting.

Deliverables:

Provide a complete project code for the POS system in Flutter, including all the features and requirements listed above. The code should be well-structured, readable, and maintainable.

Please generate the complete code for the POS system in Flutter, following the above requirements and features.