

import 'package:flutter/material.dart';
import 'package:responsive_builder/responsive_builder.dart';

import '../../utils/utils.dart';
import '../widgets/desktop/shop.dart' as desktop;
import '../widgets/mobile/shop.dart' as mobile;

class Shop extends StatefulWidget {
  final int businessId;

  const Shop({this.businessId, Key? key}) : super(key: key);

  @override
  State<StatefulWidget> createState() => ShopState();
}

class ShopState extends State<Shop> {
  @override
  Widget build(BuildContext context) {
    int _businessId =
    widget.businessId == null ? Utils.getBusinessId() : widget.businessId;

    return ResponsiveBuilder(
      builder: (context, sizingInformation) => ScreenTypeLayout(
        mobile: mobile.Shop(
          businessId: _businessId,
        ),
        tablet: desktop.Shop(
          businessId: _businessId,
        ),
        desktop: desktop.Shop(
          businessId: _businessId,
        ),
      ),
    );
  }

  @override
  void dispose() {
    super.dispose();
    print("shop parent dispose");
  }

  @override
  void initState() {
    super.initState();
  }
}