LateinitializationError: Field ‘scrollController’ has not been initialised

I am trying to redirect from homepage when the icon user it’s pressed to his own profile page but I receive the error: ‘LateinitializationError: Field ‘scrollController’ has not been initialised.’ what I should change to the code to make it work. I added scrollController in the UserPage and UserProfile

class UserPage extends StatefulWidget {
  late ScrollController scrollController;

  UserPage({super.key});

  @override
  State<UserPage> createState() => UserProfile();
}

class UserProfile extends State<UserPage> with SingleTickerProviderStateMixin {
  bool isFileImage = false;
  late User user;
  late ScrollController scrollController;
  late File pickedFile;
  String? userImage;
  String? address;
  String? precise_address;
  String? userName;
  String? facebookUrl;
  String? instagramUrl;
  String? tikTokUrl;

  TextEditingController facebookController = TextEditingController();
  TextEditingController instagramController = TextEditingController();
  TextEditingController tiktokController = TextEditingController();
  late String userId;
  Random randomGenerator = Random();

  String? searchString;
  String? country;

  QuerySnapshot? querySnapshot;
  Stream<QuerySnapshot<Map>>? stream;
  TabController? tabController;
  @override
  void initState() {
    tabController = TabController(
      length: 3,
      vsync: this,
    );
    tabController?.addListener(() {
      setState(() {});
    });
    initUser();
  }

  final Algolia _algoliaApp = AlgoliaApplication.algolia;

  String? serviveProvideId;
  Future<List<AlgoliaObjectSnapshot>> _operation(String input) async {
    AlgoliaQuery query = _algoliaApp.instance.index("users").search(input);
    AlgoliaQuerySnapshot querySnap = await query.getObjects();
    List<AlgoliaObjectSnapshot> results = querySnap.hits;
    return results;
  }

  initUser() async {
    user = FirebaseAuth.instance.currentUser!;
    userId = user.uid;
    logger.e("user id at init user =$userId");
    getSocialData();
    getData();
  }

  final TextEditingController _userNameController = TextEditingController();

  late File _image;
  final picker = ImagePicker();

  Future getImage() async {
    final pickedFile = await picker.pickImage(source: ImageSource.gallery);
    if (pickedFile != null) {
      setState(() {
        _image = File(pickedFile.path);
      });
      Reference storageReference = FirebaseStorage.instance.ref();
      Uint8List imageData = _image.readAsBytesSync();
      storageReference
          .child("Users Profile")
          .child(userId)
          .putData(imageData)
          .then((uploadTask) async {
        var dowurl = await uploadTask.ref.getDownloadURL();
        String url = dowurl.toString();

        Map<String, dynamic> urlNull = {
          'avatarUrl': url,
        };
        DocumentReference prereference =
            FirebaseFirestore.instance.collection('Users').doc(userId);

        await FirebaseFirestore.instance.runTransaction((transaction) async {
          transaction.update(prereference, urlNull);
        });
      });
    }
  }

  // Future<void> _createDynamicLink(bool short) async {
  //   setState(() {
  //     _isCreatingLink = true;
  //   });

  //   final DynamicLinkParameters parameters = DynamicLinkParameters(
  //     uriPrefix: 'https://cx4k7.app.goo.gl',
  //     link: Uri.parse('https://tariffo.page.link/homepage'),
  //     androidParameters: AndroidParameters(
  //       packageName: 'com.svapps.tariffo',
  //       minimumVersion: 0,
  //     ),
  //     dynamicLinkParametersOptions: DynamicLinkParametersOptions(
  //       shortDynamicLinkPathLength: ShortDynamicLinkPathLength.short,
  //     ),
  //     iosParameters: IosParameters(
  //       bundleId: 'com.google.FirebaseCppDynamicLinksTestApp.dev',
  //       minimumVersion: '0',
  //     ),
  //   );

  //   Uri url;
  //   if (short) {
  //     final ShortDynamicLink shortLink = await parameters.buildShortLink();
  //     url = shortLink.shortUrl;
  //   } else {
  //     url = await parameters.buildUrl();
  //   }

  //   setState(() {
  //     _linkMessage = url.toString();
  //     _isCreatingLink = false;
  //   });
  // }

  Future<void> displayPrediction(Prediction p, BuildContext context) async {
    var placeId = p.placeId;
    var address = await FlGeocoder(Constants.googlePlaceKey)
        .findAddressesFromPlaceId(placeId!);
    setState(() {
      searchString = p.description!;
    });
    FirebaseFirestore.instance.collection('Users').doc(userId).update({
      "precise_location": searchString,
    });
    country = address.first.country!.longName;
  }

  var addresses;
  var first;
  double lat = 0.0;
  double long = 0.0;

  @override
  void didChangeDependencies() async {
    super.didChangeDependencies();
  }

  @override
  Widget build(BuildContext context) {
    void viewReview(var ratings, String name, String review, String avatarUrl) {
      showGeneralDialog(
        context: context,
        barrierDismissible: false,
        transitionDuration: const Duration(
          milliseconds: 400,
        ), // how long it takes to popup dialog after button click
        pageBuilder: (_, __, ___) {
          // your widget implementation
          return Container(
            color: Colors.black.withOpacity(0.4),
            child: Scaffold(
              backgroundColor: Colors.transparent,
              appBar: AppBar(
                backgroundColor: Colors.transparent,
                automaticallyImplyLeading: false,
                actions: [
                  IconButton(
                    icon: const Icon(
                      Icons.close,
                      color: Colors.white,
                    ),
                    onPressed: () {
                      Navigator.pop(context);
                    },
                  ),
                ],
              ),
              body: SafeArea(
                // top: false,
                child: Container(
                  padding: const EdgeInsets.all(8.0),
                  child: Container(
                    // color: Colors.white,
                    // height: MediaQuery.of(context).size.height * 0.9,
                    // width: MediaQuery.of(context).size.width * 1,
                    child: ListView(
                      children: [
                        Container(
                          // width: 200,
                          // margin: EdgeInsets.only(
                          //     top: 8, bottom: 8, right: 12),
                          margin: const EdgeInsets.only(right: 12, bottom: 0),
                          //     padding: const EdgeInsets.all(11),
                          // width: MediaQuery.of(context)
                          //         .size
                          //         .width -
                          //     140,
                          decoration: BoxDecoration(
                              color: Colors.white,
                              boxShadow: [
                                BoxShadow(
                                    color: Colors.black.withOpacity(0.1),
                                    blurRadius: 2,
                                    spreadRadius: 1)
                              ],
                              borderRadius: BorderRadius.circular(8)),
                          child: Column(
                            children: [
                              Row(
                                children: [
                                  CircleAvatar(
                                    backgroundImage: const AssetImage(
                                        'assets/images/profilepic.png'),
                                    child: Image.network(avatarUrl),
                                  ),
                                  const SizedBox(width: 8),
                                  Text(name,
                                      style: const TextStyle(
                                          fontWeight: FontWeight.bold)),
                                  const SizedBox(width: 50),
                                  Row(
                                    children: [
                                      _buildRatingStars(ratings),
                                    ],
                                  )
                                ],
                              ),
                              // Row(
                              //   children: [
                              //     _buildRatingStars(snapshot
                              //         .data
                              //         .docs[index]
                              //         .data["rating"]),
                              //   ],
                              // ),
                              // Text(
                              //     snapshot
                              //         .data
                              //         .docs[index]
                              //         .data["text"],
                              //     overflow:
                              //         TextOverflow.ellipsis,
                              //     textScaleFactor: 1.1),
                              Container(
                                margin: const EdgeInsets.only(top: 8),
                                width: MediaQuery.of(context).size.width - 140,
                                child: Text(
                                  review,
                                  textScaleFactor: 1.1,
                                ),
                              ),
                              TextButton(
                                style: TextButton.styleFrom(
                                  shape: const StadiumBorder(),
                                  backgroundColor: Colors.black,
                                ),
                                onPressed: () {
                                  Navigator.pop(context);
                                },
                                child: const Text(
                                  'Close',
                                  style: TextStyle(
                                    color: Colors.white,
                                  ),
                                ),
                              ),
                            ],
                          ),
                        ),
                      ],
                    ),
                  ),
                ),
              ),
            ),
          );
        },
      );
    }

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật