skip to Main Content

Flutter – How to change parent of widgets without rebuilding their states

In flutter, I have widgets like: class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) => Scaffold( body: OrientationBuilder( builder: (context, orientation) { const List<ColorfulBox> children = [ColorfulBox(), ColorfulBox()]; return orientation == Orientation.portrait ? const Row(children: children) : const Column(children:…

VIEW QUESTION

Flutter records return type issue

This is the error I am currently dealing with: A value of type '(Null, List<BoatModel>)' can't be returned from the method 'getBoatsFromOwnership' because it has a return type of 'Future<(Failure?, List<Boat>?)>'. related to this code: @override Future<(Failure?, List<Boat>?)> getBoatsFromOwnership(User user)…

VIEW QUESTION

Sort Map in Dart/Flutter

I have a Map<String, dynamic> i get from a json response as below. map = { "status": "Success", "payments": [ { "id": 99, "groupID": 19, "paymentDueDate": "2023-05-12", "paymentDate": null, "userID": 13, "amount": 500, "forDuration": "May", "proofOfPayment": null, "paymentMode": null, "paymentID":…

VIEW QUESTION
Back To Top
Search