

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 int businessId;

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

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

}