skip to Main Content

Listview does not scroll – Flutter

The listview I have used in the application I am making with flutter cannot be scrolled. I tried everything but couldn't find the solution.There is no other scroll in the code tree.I also added pysics but it still didn't work.…

VIEW QUESTION

Instance of _Future<int> is all I get when I try to get the total 'document' of my 'collection' in Firestore – Flutter

Following is my code. I'm trying to get all the 'Babies' which are in documents: class _HomePageeState extends State<HomePagee> { String t_babies = getCount().toString(); } Future getCount() async { return FirebaseFirestore.instance.collection('Babies').snapshots().length; } Instead I get this error: instance of _future<int>…

VIEW QUESTION

How to add textstyle in global class using flutter

class CATextStyle extends TextStyle { static const style = TextStyle(); //const CATextStyle._(TextStyle style) : super(style); CATextStyle._style(TextStyle style) : super(style); } abstract class CATextStyles { static const _parent = TextStyle(); static final headLine1 = CATextStyle._style(_parent.copyWith(color: Colors.amber)); } I want to created…

VIEW QUESTION

I'm trying to create a optional parameter in constructor but still getting error, can any one help me with that? – Flutter

class ReusableCard extends StatelessWidget { ReusableCard({required this.colour, this.cardChild}); final Color colour; final Widget cardChild; @override Widget build(BuildContext context) { return Container( margin: const EdgeInsets.all(15.0), decoration: BoxDecoration( borderRadius: BorderRadius.circular(10.0), color: colour, ), // child: cardChild, ); } } This is the…

VIEW QUESTION
Back To Top
Search