34 lines
1.0 KiB
Dart
34 lines
1.0 KiB
Dart
|
|
import 'package:flutter/material.dart';
|
|
import 'package:responsive_builder/responsive_builder.dart';
|
|
|
|
import '../models/business.dart';
|
|
import '../models/product.dart';
|
|
import '../store/actions.dart';
|
|
import '../store/store.dart';
|
|
import '../widgets/desktop/desktop_product_detail_page.dart';
|
|
import '../widgets/mobile/mobile_product_detail_page.dart';
|
|
|
|
class ProductDetailPage extends StatelessWidget {
|
|
final Business business;
|
|
final Product product;
|
|
|
|
const ProductDetailPage({this.business, this.product, Key key}) :
|
|
super(key: key);
|
|
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
store.dispatch(UpdateContext(context));
|
|
|
|
return ResponsiveBuilder(
|
|
builder: (context, sizingInformation) =>
|
|
ScreenTypeLayout(
|
|
mobile: MobileProductDetailPage(business: business, product: product,),
|
|
tablet: DesktopProductDetailPage(business: business, product: product,),
|
|
desktop: DesktopProductDetailPage(business: business, product: product,),
|
|
),
|
|
);
|
|
}
|
|
|
|
} |