import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../const/colors.dart';

class WidgetBase extends StatefulWidget{
  Widget? widgetHeader;
  late Widget widgetBody;
  Widget? widgetFooter;
  WidgetBase({this.widgetHeader, required this.widgetBody, this.widgetFooter});
  @override
  State<StatefulWidget> createState() =>WidgetBaseState();

}

class WidgetBaseState extends State<WidgetBase>{
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        resizeToAvoidBottomInset: true,
        backgroundColor: Theme.of(context).appBarTheme.color,
        appBar: AppBar(
          elevation: 0,
          backgroundColor: AppColors.primary,
          backwardsCompatibility: false,
          toolbarHeight: 0,
        ),
        body: Container(
          // margin: checkLandscape(context)?EdgeInsets.only(left: 120,right: 120):EdgeInsets.all(0),
          child: Column(
            children: [
              widget.widgetHeader==null?Container():widget.widgetHeader!,
              Expanded(child:  widget.widgetBody,),
            ],
          ),
        ),
      bottomNavigationBar: widget.widgetFooter,
    );
  }

}