

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

import '../constants.dart';
import '../widgets/desktop/desktop_blog.dart';
import '../widgets/mobile/mobile_blog.dart';

class Blog extends StatelessWidget {
  final Key? key;
  final int businessId;

  const Blog({this.key, int businessId}) :
      businessId = businessId ?? Constants.BUSINESS_ID;

  @override
  Widget build(BuildContext context) {
    return ResponsiveBuilder(
      builder: (context, sizingInformation) =>
        ScreenTypeLayout(
          mobile: MobileBlog(businessId: businessId,),
          tablet: DesktopBlog(businessId: businessId,),
          desktop: Scrollbar(
            isAlwaysShown: true,
            child: DesktopBlog(businessId: businessId,),
          ),
        ),
    );
  }

}