import 'package:douyin_demo/providers/recommend_provider.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class BtnContent extends StatelessWidget { const BtnContent({Key? key}) : super(key: key); @override Widget build(BuildContext context) { RecommendProvider provider = Provider.of(context); return Container( child: Column( mainAxisSize: MainAxisSize.min, children: [ ListTile( title: Text( "@${provider.mainInfo.userName}", style: TextStyle(color: Colors.white, fontSize: 16), ), subtitle: Text( "${provider.mainInfo.content}", style: TextStyle(color: Colors.white, fontSize: 16), maxLines: 3, overflow: TextOverflow.ellipsis, ), ), Row( children: [ SizedBox( width: 10, ), Icon( Icons.music_note, color: Colors.white, ), ], ) ], ), ); } }