providerManager.dart 474 B

123456789101112131415161718
  1. import 'package:provider/provider.dart';
  2. import 'package:provider/single_child_widget.dart';
  3. import 'package:video/model/refreshModel.dart';
  4. import 'package:video/model/urlModel.dart';
  5. List<SingleChildWidget> providers = [
  6. ...independentServices,
  7. ];
  8. //独立的model
  9. List<SingleChildWidget> independentServices = [
  10. ChangeNotifierProvider<UrlInfo>(
  11. create: (context) => UrlInfo(),
  12. ),
  13. ChangeNotifierProvider<Refresh>(
  14. create: (context) => Refresh(),
  15. ),
  16. ];