Files
flutter_wisetronic/lib/pages/order_detail.dart
2021-08-31 13:28:33 -04:00

31 lines
910 B
Dart

import 'package:flutter/material.dart';
import 'package:responsive_builder/responsive_builder.dart';
import '../store/actions.dart';
import '../store/store.dart';
import '../widgets/desktop/desktop_order_detail.dart';
import '../widgets/mobile/mobile_order_detail.dart';
class OrderDetail extends StatelessWidget {
final int orderId;
final bool fromOrders;
const OrderDetail(this.orderId, {this.fromOrders = false, Key key}) :
super(key: key);
@override
Widget build(BuildContext context) {
store.dispatch(UpdateContext(context));
return ResponsiveBuilder(
builder: (context, sizingInformation) =>
ScreenTypeLayout(
mobile: MobileOrderDetail(orderId, fromOrders: fromOrders,),
tablet: DesktopOrderDetail(orderId, fromOrders: fromOrders,),
desktop: DesktopOrderDetail(orderId, fromOrders: fromOrders,),
),
);
}
}