import 'package:flutter/widgets.dart';
import 'package:initial_folder/helper/user_info.dart';
import 'package:initial_folder/providers/carts_provider.dart';
import 'package:initial_folder/providers/my_course_provider.dart';
import 'package:initial_folder/providers/user_info_provider.dart';
import 'package:initial_folder/providers/whislist_provider.dart';
import 'package:provider/provider.dart';

getUserData(BuildContext context) async {
  var email = await UsersInfo().getEmail();
  await Provider.of<UserInfoProvider>(context, listen: false)
      .getUserInfo(email);
  await Provider.of<CartsProvider>(context, listen: false).getCarts();
  await Provider.of<WishlistProvider>(context, listen: false).getWishlist();
  await Provider.of<MyCourseProvider>(context, listen: false).getMyCourse();
}
