Skip to content

Snehasis4321/ecommerce_app_flutter_firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecommerce-app2

Build a Full E-commerce Application with Admin Control in Flutter with Firebase, Stripe

don't just copy and paste the code from here try to learn from it, it will be more beneficial for you.

⚠️ Important :

  • Updated the code swap the functions firebase storage with cloudinary for image storage in ecommerce_admin_app.

  • Changes you need to do :

    • add packages http,flutter_dotenv using
      flutter pub add http flutter_dotenv
    • create .env at the root of ecommerce_admin_app
      CLOUDINARY_CLOUD_NAME="*******"
      CLOUDINARY_API_KEY="**************"
      CLOUDINARY_SECRET_KEY="*************"
    • add .env to assets in pubspec.yaml
      assets:
      - .env
    • main function modify
    void main() async {
    WidgetsFlutterBinding.ensureInitialized();
    await Firebase.initializeApp(
      options: DefaultFirebaseOptions.currentPlatform,
    );
    await dotenv.load(fileName: ".env");
    runApp(const MyApp());
    }
    • copy the contents of lib/controllers/cloudinary_service.dart from here

    • modify the image upload function user this instead of the old one, for ModifyCategory() in categories_page.dart,ModifyProduct() in modify_product.dart,ModifyPromo() in modify_promo.dart

     void _pickImageAndCloudinaryUpload() async {
      image = await picker.pickImage(source: ImageSource.gallery);
      if (image != null) {
        String? res = await uploadToCloudinary(image);
        setState(() {
          if (res != null) {
            imageController.text = res;
            print("set image url ${res} : ${imageController.text}");
            ScaffoldMessenger.of(context).showSnackBar(
                const SnackBar(content: Text("Image uploaded successfully")));
          }
        });
      }
    }

What You'll Learn:

  • Firebase Authentication & Firestore Integration
  • Implementing Sign-up, Login, and Password Reset
  • Real-time Database with Cloud Firestore
  • CRUD Operations for Categories, Products, Promos, and Coupons
  • Image Uploads to Firebase Storage
  • Stripe Payment Gateway Setup
  • Building Dynamic UI for Admin and Client Apps
  • Creating and Managing Shopping Cart and Orders
  • Handling Discounts, Coupons, and Promo Codes
  • Secure Checkout Flow and Order Receipts
  • Optimizing State Management with Providers
  • Managing Streams in Flutter for Real-Time Updates

Authors:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published