skip to Main Content

how to call a method from another dart file? – Flutter

in my programme i want to call the same path inside a methode called getPhoto()=>upload(statefulwidget) to other file or statefulwidget Future getPhoto() async{ FirebaseFirestore fearbase = FirebaseFirestore.instance; Reference ref=FirebaseStorage.instance .ref() .child("${widget.user}/ProfileData") .child("Url_$postId"); await ref.putFile(file!); downloadUrl=await ref.getDownloadURL(); // upload image to…

VIEW QUESTION

I making Restaurant app form Udemy tutorial it show me this error – Flutter

I facing this error Error: The argument type 'Object?' can't be assigned to the parameter type 'Widget?'. tabs_screen.dart:34 Object is from dart:core. Widget is from package:flutter/src/widgets/framework.dart ('/C:/flutter_windows_3.3.4-stable/flutter/packages/flutter/lib/src/widgets/framework.dart'). framework.dart:1 body: _pages[_selectPageIndex]['page']. Code class TapScreen extends StatefulWidget { const TapScreen({super.key}); @override State<TapScreen>…

VIEW QUESTION

Showing empty widget while FutureBuilder is loading data – Flutter

I have the following FutureBuilder: child: FutureBuilder( future: fetchNotifications(widget.usuarioId), builder: (context, snapshot) { if (snapshot.hasData) { List<dynamic>? filteredList = snapshot.data as List; return ListView.separated( separatorBuilder: (BuildContext context, int index) => new Divider( color: Colors.black26, thickness: 0.5, ), itemCount: filteredList.length, shrinkWrap:…

VIEW QUESTION
Back To Top
Search