background.dart 475 B

12345678910111213141516171819202122232425
  1. import 'package:flutter/material.dart';
  2. class Background extends StatelessWidget {
  3. final Widget child;
  4. final Widget image;
  5. Background({Key key, this.child, this.image}) : super(key:key);
  6. @override
  7. Widget build(BuildContext context) {
  8. return Container(
  9. width: double.infinity,
  10. height: double.infinity,
  11. child: Stack(
  12. alignment: Alignment.center,
  13. children: [
  14. image,
  15. child
  16. ],
  17. ),
  18. );
  19. }
  20. }