Search
 
SCRIPT & CODE EXAMPLE
 

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
              ),

            ],
          ),
        ]
    ),
      ),
   );
 }
}
Comment

create a row with two child in flutter

    class MemberProfile extends StatelessWidget {
   @override
    Widget build(BuildContext context) {
   return Scaffold(
    appBar:  LBAppBar().getAppBar(),
    drawer:  LBDrawer().getDrawer(),
     body: 
      Container(
        decoration: BoxDecoration(
          gradient: LinearGradient(
            colors: [Color.fromRGBO(1, 89, 99, 1.0), Colors.grey],
            begin: Alignment.bottomLeft,
            end: Alignment.topRight,
          ),
        ),
        child:     
         Container(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              Container(
                margin: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 20.0),
                child: Text("Name : Sam Cromer",
                    style: TextStyle(
                        color: Colors.white70,
                        fontWeight: FontWeight.bold,
                        fontSize: 19.0)),
              ),
              Container(
                  margin: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 20.0),
                  child: Text("Sex : Male",
                      style: TextStyle(
                          color: Colors.white70,
                          fontWeight: FontWeight.bold,
                          fontSize: 19.0))),
              Container(
                  margin: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 20.0),
                  child: Text("Age : 42",
                      style: TextStyle(
                          color: Colors.white70,
                          fontWeight: FontWeight.bold,
                          fontSize: 19.0))),
              Container(
                  margin: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 20.0),
                  child: Text("Status : Divorced",
                      style: TextStyle(
                          color: Colors.white70,
                          fontWeight: FontWeight.bold,
                          fontSize: 19.0))),
              Container(
                  margin: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 20.0),
                  child: Text("Trumatic Event : ",
                      style: TextStyle(
                          color: Colors.white70,
                          fontWeight: FontWeight.bold,
                          fontSize: 19.0))),
              Container(
                  margin: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 20.0),
                  child: Text("Motorcycle Accident July 2005, TBI",
                      style: TextStyle(
                          color: Colors.white70,
                          fontWeight: FontWeight.bold,
                          fontSize: 19.0))),
              Container(
                  margin: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 20.0),
                  child: Text("Bio :",
                      style: TextStyle(
                          color: Colors.white70,
                          fontWeight: FontWeight.bold,
                          fontSize: 19.0))),
              Container(
                margin: EdgeInsets.only(
                    left: 30.0, top: 150.0, bottom: 30.0, right: 30.0),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.end,
                  children: <Widget>[
                    Container(
                      margin: EdgeInsets.all(20.0),
                      child: OutlineButton(
                        child: Text('Offer support'),
                        textColor: Colors.white,
                        shape: RoundedRectangleBorder(
                            borderRadius: BorderRadius.circular(30.0)),
                        onPressed: () {
                          // Navigator.of(context).push( MaterialPageRoute(builder: (BuildContext context) =>  CheckInQ()));
                        },
                      ),
                    )
                  ],
                ),
              )
            ],
          ),

        ),
        //here
      ),

);
  }
}
Comment

PREVIOUS NEXT
Code Example
Dart :: dark mode in flutter packages 
Dart :: flutter increment decrement widget 
Dart :: dart map values 
Dart :: flutter build async 
Dart :: bubble sort dart 
Dart :: dart string variable stack 
Dart :: flutter showmodal initstate 
Dart :: arrary where dart 
Dart :: dart svg drawer 
Dart :: text widget not recognize the currency symbol flutter 
Dart :: how to create camera icon in flutter dev 
Dart :: dart break foreach 
Dart :: extension methods in dart 
Dart :: dart initialize array 
Dart :: dart multi line print statement 
Dart :: inkwell not splashing in stack 
Dart :: flutter when to use methods 
Swift :: center a text in swiftui 
Swift :: swift array to string 
Swift :: playing a sound in swift 
Swift :: swift function with return value 
Swift :: swift ui font color 
Swift :: ios rounded button 
Swift :: how to make box shadow swift 
Swift :: power number in swift 
Swift :: swiftui scrollview 
Swift :: define enum swift 
Swift :: Swift Swift continue statement with nested loops 
Swift :: didSelectRowAt in table view 
Swift :: swift iterate through string 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =