how to make condition statement after dot(.) or before property in any method or class

how to make condition statement after dont(.) or before property in any method or class for example i have the following bool a = true ; FirebaseFirestore.instance.collection(‘users’) .limit(10) .where(‘visible’, isEqualTo: true) // here i need to use a? isEqualTo : whereIn {………….} or at least a?.where(‘visible’, isEqualTo: true) : .where(‘visible’, whereIn: [1]) what is the… Read More how to make condition statement after dot(.) or before property in any method or class

I'm trying to create an empty 2d/multidimensional array and then add data to it at specific indexes. Can someone tell me where I'm going wrong?

Struggling to add data to a specific index of a 2D array. I’m quite new to programming so I could have this all completely wrong but any help would be appreciated. Maybe my declaration of the array is wrong but I am seeing the first pair of [] as the first part where data can… Read More I'm trying to create an empty 2d/multidimensional array and then add data to it at specific indexes. Can someone tell me where I'm going wrong?

Command ValidateEmbeddedBinary failed with a nonzero exit code error while running on iPhone 13

I am getting this annoying message whenever I try to run ios build on my iPhone 13. I am using M1 2020 enter image description here I try the all available solution posted on like "uncheck rosetta, Build Active Architecture only" is there something I missing? >Solution : Steps: Run flutter doctor -v Flutter clean… Read More Command ValidateEmbeddedBinary failed with a nonzero exit code error while running on iPhone 13

The instance member 'widget' can't be accessed in an initializer in flutter

i want to assign value of defulttitle into the text but its showing some error.. final foldertitle = TextEditingController(text: folderbox.isEmpty ? defulttitle : folderbox.get(1)); class Addnotes extends StatefulWidget { const Addnotes( {super.key, this.defulttitle = "My passwords.."}); final String defulttitle; @override State<Addnotes> createState() => _AddnotesState(); } class _AddnotesState extends State<Addnotes> { BuildContext? myContext; final foldertitle =… Read More The instance member 'widget' can't be accessed in an initializer in flutter

CocoaPods could not find compatible versions for pod "Firebase/Firestore" || FLUTTER

I have an app that use firebase auth for authentication and use firestore, and some other dependency that shown below, now when I add firebase storage to the dependency the get error that is shown below, what should i do to fix it. when I add firebase_storage to dependency the below error happens. [!] CocoaPods… Read More CocoaPods could not find compatible versions for pod "Firebase/Firestore" || FLUTTER

Can you help me solving this error in flutter , which says 'Error: Can't access 'this' in a field initializer.'?

Here is my code: The error is at line : onTap: () => _showActionSheet(this.context), I don’t know whats the problem is with this line as I’m a beginner in the flutter. So please help me solving this error. >Solution : Firstly, you may use method instead of variable for this. List<Marker> _list()=>[…] You can do… Read More Can you help me solving this error in flutter , which says 'Error: Can't access 'this' in a field initializer.'?

How to set gradient color to Container's border in flutter

I’m trying to set gradient color to container’s border line, here is the example i need. here is my code. Container( height: 50, width: 140, decoration: BoxDecoration( border: Border.all( color: Colors.black ), borderRadius: BorderRadius.circular(30), color: Colors.white ), child: const Center( child: Text( ‘Sign in’, style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, color: Colors.black, ), ), ),… Read More How to set gradient color to Container's border in flutter

Flutter call function of another widget

I try to call a function named _callMe from AlertDialog . this is my example code : import ‘package:flutter/material.dart’; void main() { runApp(const MainApplication()); } class MainApplication extends StatelessWidget { const MainApplication({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return const MaterialApp( debugShowCheckedModeBanner: false, title: "Training", home: HomePage(), ); } } class HomePage… Read More Flutter call function of another widget