Answers for "reusable widget flutter"

4

flutter stateful widget

class YellowBird extends StatefulWidget {
  const YellowBird({ Key key }) : super(key: key);

  @override
  _YellowBirdState createState() => _YellowBirdState();
}

class _YellowBirdState extends State<YellowBird> {
  @override
  Widget build(BuildContext context) {
    return Container(color: const Color(0xFFFFE306));
  }
}
Posted by: Guest on May-10-2020
1

flexible widget flutter

Row(children:[
  Flexible(
  flex:5
    child: Container(color: Colors.red, child: Text('This is a very long text that won’t fit the line.'))),
  Flexible(
  flex:5
    child: Container(color: Colors.green, child: Text(‘Goodbye!’))),
  ]
)
Posted by: Guest on December-07-2020

Code answers related to "Dart"

Browse Popular Code Answers by Language