Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

create a row with two child in flutter

import 'package:flutter/material.dart';



class MemberProfile extends StatelessWidget {
 @override
 Widget build(BuildContext context) {
 return Scaffold(
 body: Container(
    decoration: BoxDecoration(
      gradient: LinearGradient(
        colors: [Color.fromRGBO(1, 89, 99, 1.0), Colors.grey],
        begin: Alignment.bottomLeft,
        end: Alignment.topRight,
      ),
    ),
    width: MediaQuery.of(context).size.width,
    //height: 1500.0,
    child: Row(
      mainAxisAlignment: MainAxisAlignment.start,
        children: <Widget> [
          Column(
            mainAxisAlignment: MainAxisAlignment.start,
            children: <Widget>[

              Text("Name : Sam Cromer",
                  style: TextStyle(
                      color: Colors.white70,
                      fontWeight: FontWeight.bold,
                      fontSize: 19.0)),

              Text("Sex : Male",
                  style: TextStyle(
                      color: Colors.white70,
                      fontWeight: FontWeight.bold,
                      fontSize: 19.0)),
              Text("Age : 42",
                  style: TextStyle(
                      color: Colors.white70,
                      fontWeight: FontWeight.bold,
                      fontSize: 19.0)),
              Text("Status : Divorced",
                  style: TextStyle(
                      color: Colors.white70,
                      fontWeight: FontWeight.bold,
                      fontSize: 19.0)),
              Text("Event : Motorcycle",
                  style: TextStyle(
                      color: Colors.white70,
                      fontWeight: FontWeight.bold,
                      fontSize: 19.0)),
              Text("Bio :",
                  style: TextStyle(
                      color: Colors.white70,
                      fontWeight: FontWeight.bold,
                      fontSize: 19.0)),
                       Text("Bio :",
                  style: TextStyle(
                      color: Colors.white70,
                      fontWeight: FontWeight.bold,
                      fontSize: 19.0)),
                       Text("Bio :",
                  style: TextStyle(
                      color: Colors.white70,
                      fontWeight: FontWeight.bold,
                      fontSize: 19.0)),
                       Text("Bio :",
                  style: TextStyle(
                      color: Colors.white70,
                      fontWeight: FontWeight.bold,
                      fontSize: 19.0)),

            ],
          ),
          Column(
            children: <Widget>[

              SizedBox(
                width: 200.0,
                height: 200.0,
                child: Image.asset('lib/img/darth-vader_small.jpg'),  // Your image widget here
              ),

            ],
          ),
        ]
    ),
      ),
   );
 }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #row #child #flutter
ADD COMMENT
Topic
Name
3+9 =