How to store a return value in variable flutter

I need a little help. I have this function in another file and i want to store the return value in a variable, because i dont want to repeat the same code again and again and I want to reuse it as many times I want. here is the code in another file. double dropDownIf(dropDownVal,… Read More How to store a return value in variable flutter

How can Widget Classes Arguments be used as props to create dynamic Widgets with Row and Columns in Flutter?

I am revisiting Flutter development after working with React after some times and I was trying to implement something as passing props across multiple components, in order to create dynamic Widgets (components) that render based on props. I could somehow achieve the result but still I cannot understand something. So, in this example, I am… Read More How can Widget Classes Arguments be used as props to create dynamic Widgets with Row and Columns in Flutter?

How to use widget lists in ListView.builder?

class CardPage extends StatelessWidget { String title; String description; CardPage({Key key,this.title,this.description}) : super(key: key); @override Widget build(BuildContext context) { final ThemeData themeData = Theme.of(context); return Container( height: (108), child: Card( semanticContainer: true, clipBehavior: Clip.antiAliasWithSaveLayer, child: ElevatedButton( onPressed: () {}, style: ElevatedButton.styleFrom( primary: Colors.white54, ), child: ListTile( title: Text(title, style: themeData.textTheme.headline2), trailing: Padding( padding: const EdgeInsets.only(bottom:… Read More How to use widget lists in ListView.builder?

OutlinedButton exception when trying to set max size

I’m trying to create something like the below image: I used two OutlinedButton in a row: Row( mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[ OutlinedButton( child: const Icon( Icons.arrow_back, color: colorBackButton, ), style: ButtonStyle( fixedSize: MaterialStateProperty.resolveWith( (states) => Size(65.0, 65.0)))), Padding(padding: EdgeInsets.only(left: 14.0)), OutlinedButton( child: Text( ‘Next’, style: GoogleFonts.inter( textStyle: const TextStyle( fontSize: 20, fontWeight: FontWeight.bold, color: Colors.white)),… Read More OutlinedButton exception when trying to set max size