skip to Main Content

Flutter – Expand a SingleChildScrollView inside a column to take up as much room as it needs but no more

I have a Flutter widget like this, with a SingleChildScrollView inside a Column inside a parent container: class MyWidget extends StatelessWidget { @override Widget build(BuildContext context) { return Container( padding: const EdgeInsets.all(10), decoration: BoxDecoration( color: Colors.grey, borderRadius: BorderRadius.circular(10), ), child:…

VIEW QUESTION

handle null values in flutter/dart model

i have a model it looks like this class UserModel { final String? username; final int? age; final String? phoneNumber; UserModel( {required this.age, required this.phoneNumber, required this.username}); @override String toString() { return 'Username => $usernamenAge => $agenPhone number => $phoneNumber';…

VIEW QUESTION
Back To Top
Search