Flutter Container: cannot provide both a color and a decoration

Remove the color parameter from the Container and add it to the BoxDecoration: Widget bodyWidget() { return Container( decoration: BoxDecoration( color: Colors.yellow, border: Border.all(color: Colors.black), ), child: Text(“Flutter”), ); } If you check the Container source code you can see that the color parameter is just used to set the BoxDecoration color if the decoration … Read more

Limit max width of Container in Flutter

You can add a constraint to the Container Widget with the preferred maxWidth like this: Widget build(context) { return Row( mainAxisSize: MainAxisSize.min, children: [ Container( constraints: BoxConstraints(minWidth: 100, maxWidth: 200), padding: EdgeInsets.all(10), decoration: BoxDecoration( color: color ?? Colors.blue, borderRadius: BorderRadius.circular(10) ), child: msg ) ], ); }

Flutter: Scrolling to a widget in ListView

By far, the easiest solution is to use Scrollable.ensureVisible(context). As it does everything for you and work with any widget size. Fetching the context using GlobalKey. The problem is that ListView won’t render non-visible items. Meaning that your target most likely will not be built at all. Which means your target will have no context … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)