import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:syncrow_web/utils/constants/assets.dart';

class FirstLayer extends StatelessWidget {
  final Widget? second;
  const FirstLayer({super.key, this.second});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Stack(
        children: [
          SizedBox(
            width: MediaQuery.sizeOf(context).width,
            height: MediaQuery.sizeOf(context).height,
            child: SvgPicture.asset(
              Assets.webBackground,
              fit: BoxFit.cover,
            ),
          ),
          Container(
            width: MediaQuery.sizeOf(context).width,
            height: MediaQuery.sizeOf(context).height,
            decoration: const BoxDecoration(
              image: DecorationImage(
                image: AssetImage(Assets.vector),
                fit: BoxFit.cover,
                opacity: 0.9,
              ),
            ),
          ),
          second!
        ],
      ),
    );
  }
}
