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

import '../constants.dart';
import '../models/business.dart';
import '../store/actions.dart';
import '../store/store.dart';
import '../widgets/desktop/desktop_renew_license.dart';
import '../widgets/mobile/mobile_renew_license.dart';

class RenewLicense extends StatefulWidget {

  const RenewLicense({Key? key}) :
      super(key: key);

  @override
  State<StatefulWidget> createState() => RenewLicenseState();
}

class RenewLicenseState extends State<RenewLicense> {

  @override
  Widget build(BuildContext context) {

    store.dispatch(UpdateContext(context));

    return ResponsiveBuilder(
      builder: (context, sizingInformation) =>
          ScreenTypeLayout(
            mobile: MobileRenewLicense(Constants.BUSINESS_ID),
            tablet: DesktopRenewLicense(Constants.BUSINESS_ID),
            desktop: DesktopRenewLicense(Constants.BUSINESS_ID),
          ),
    );
  }

  @override
  void initState() {
    super.initState();
  }
}