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

import '../models/located_address.dart';
import '../widgets/desktop/desktop_new_address.dart';
import '../widgets/mobile/mobile_new_address.dart';

class NewAddress extends StatelessWidget {
  final LocatedAddress? locatedAddress;
  final int? businessId;
  const NewAddress({Key? key, this.locatedAddress, this.businessId}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ResponsiveBuilder(
      builder: (context, sizingInformation) =>
        ScreenTypeLayout.builder(
          mobile: (context) => MobileNewAddress(
            locatedAddress: locatedAddress,
            businessId: businessId,
          ),
          tablet: (context) => DesktopNewAddress(
            locatedAddress: locatedAddress,
            businessId: businessId,
          ),
          desktop: (context) => DesktopNewAddress(
            locatedAddress: locatedAddress,
            businessId: businessId,
          ),
        ),
    );
  }

}