import 'package:douyin_demo/providers/recommend_provider.dart'; import 'package:douyin_demo/widgets/bottom_bar.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class BottomSafeBar extends StatelessWidget { const BottomSafeBar({Key? key, required this.selIndex}) : super(key: key); final int selIndex; @override Widget build(BuildContext context) { RecommendProvider provider = Provider.of(context); // double toBottom=MediaQuery.of(context).viewInsets.bottom; return Container( // padding: EdgeInsets.only(top:toBottom), decoration: BoxDecoration(color: Colors.black), child: SafeArea( child: BottomAppBar( child: Container( decoration: BoxDecoration(color: Colors.black), height: 60, // decoration: BoxDecoration(color: Colors.black), child: BtmBar( selectIndex: selIndex, ), ), )), ); } }