skip to Main Content

The constructor being called isn't a const constructor. Try removing 'const' from the constructor invocation, Flutter dart. How To Solve?

The container always displays an error like that class HomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( body: Container( padding: EdgeInsets.symmetric(vertical: 30), width: double.infinity, decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, colors: [ Color.fromARGB(255, 9, 106, 185),…

VIEW QUESTION

How do i solve this RangeError in flutter?

Theres a funtion i wrote that uses switch below Widget buildVerdict(BuildContext context, bool firstGuessResult, bool? secondGuessResult, bool? thirdGuessResult) { switch (widget.noOfAttempts) { case 1: return firstGuessResult == true ? const Icon( Icons.check_box, color: Colors.green, ) : Container(); case 2: return…

VIEW QUESTION
Back To Top
Search