center_image.dart 530 B

123456789101112131415161718
  1. import 'package:flutter/material.dart';
  2. class CenterImage extends StatelessWidget {
  3. const CenterImage({Key? key, required this.videoPath}) : super(key: key);
  4. final String videoPath;
  5. @override
  6. Widget build(BuildContext context) {
  7. // double bottom = MediaQuery.of(context).viewInsets.bottom;
  8. // RecommendProvider provider = Provider.of<RecommendProvider>(context);
  9. return Center(
  10. child: Container(
  11. // padding: EdgeInsets.only(top: bottom),
  12. child: Image.asset(videoPath)),
  13. );
  14. }
  15. }