HeyMrDigital
Wholesale Order App

Wholesale Order App Flutter Project

A Cross-Platform Flutter Solution for B2B Wholesale Order Management

Project Summary

The Wholesale Order App is a multilingual mobile and web application designed to streamline wholesale product ordering and inventory tracking. Built with Flutter, integrated with Firebase Firestore, and connected to an external API, the app empowers wholesale businesses to process orders quickly, manage customer data, and access real-time product availability.
It features a sleek, responsive UI with support for English and Myanmar languages, making it user-friendly for a diverse workforce. The system ensures that only in-stock items can be ordered, reducing errors and improving business efficiency.

Key Features & Contributions

  • ๐Ÿ›๏ธ Product Catalog & Real-Time Search: Grid-based, image-rich catalog with barcode/keyword search.
  • ๐Ÿ›’ Cart Management & Order Flow: Provider-based cart, quantity control, customer input, Firebase upload.
  • ๐Ÿงพ Receipt Generation & Sharing: Shareable receipts post-order submission.
  • ๐Ÿ”— API & Firebase Integration: Live product data from API, real-time order storage, multi-platform Firebase init.
  • ๐Ÿ“ฆ Inventory-aware Order System: Only in-stock items shown, avoids overselling.
  • ๐ŸŒ Multilingual & Responsive UI: Material Design 3, bilingual support.
  • ๐Ÿ“ก Offline Functionality: Local storage fallback for offline use.

Code Showcase

main.dart
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'cart_model.dart';
import 'product_list_page.dart';
import 'package:firebase_core/firebase_core.dart';
import 'firebase_options.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  runApp(
    ChangeNotifierProvider(
      create: (_) => CartModel(),
      child: const MyApp(),
    ),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Cart App',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const ProductListPage(),
    );
  }
}
product_list_page.dart
class ProductListPage extends StatefulWidget {
  const ProductListPage({super.key});
  @override
  State<ProductListPage> createState() => _ProductListPageState();
}

class _ProductListPageState extends State<ProductListPage> {
  // ...
  Future<void> _fetchAllProducts() async {
    // Fetch products from API, filter by stock, update state
  }
  void _filterProducts() {
    // Filter products by search
  }
  void _addToCart(Map<String, dynamic> product) {
    // Add product to cart
  }
  void _goToCart() {
    // Navigate to cart page
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Product List')),
      body: Column(
        children: [
          // Search bar, product grid, etc.
        ],
      ),
    );
  }
}
cart_page.dart
class CartPage extends StatelessWidget {
  const CartPage({super.key});
  void _confirmRemoveItem(BuildContext context, int index) {
    // Confirm and remove item from cart
  }
  void _increaseQuantity(BuildContext context, int index) {
    // Increase item quantity
  }
  void _decreaseQuantity(BuildContext context, int index) {
    // Decrease item quantity or remove
  }
  void _saveOrderToFirestore(BuildContext context, String customerName) async {
    // Save order to Firebase
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Cart")),
      body: Column(
        children: [
          // Cart items, order button, etc.
        ],
      ),
    );
  }
}

Results & Value Delivered

  • Reduced manual ordering and stock errors by digitizing the entire process
  • Enabled real-time inventory tracking from API and Firebase
  • Enhanced order efficiency with barcode-based search and order flow
  • Supported cross-platform deployment with one codebase
  • Delivered a bilingual solution for multilingual regions