import 'package:flutter/material.dart';

class CommonBackground extends StatelessWidget {
  final Widget child;
  final bool isFullWidth;

  const CommonBackground(
      {super.key, required this.child, this.isFullWidth = true, appBar});

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      child: Stack(children: [
        Container(
            height: isFullWidth
                ? MediaQuery.sizeOf(context).height
                : MediaQuery.sizeOf(context).height * 0.90,
            decoration: BoxDecoration(
                image: const DecorationImage(
                    image: AssetImage('assets/images/image_1.png'),
                    fit: BoxFit.cover))),
        child
      ]),
    );
  }
}
