Home > database >  How to place image & textfiled both at center in flutter
How to place image & textfiled both at center in flutter

Time:12-09

enter image description here

How to place image & textfield both at center in flutter.

Below is code what i have tried so far any help is appreciated!

Container(
  child: Padding(
    padding: const EdgeInsets.only(top: 32.0),
    child: Row(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Container(
          child: Image.asset(
            'images/Warning.png',
          ),
        ),
        Padding(
          padding: const EdgeInsets.only(left: 8.0),
          child: Container(
            alignment: Alignment.center,
            child: Text(
              'OTP is valid for 5 minutes only.',
              style: TextStyle(
                color: Color(0xFF4B4B4B),
                fontSize: 12,
                fontFamily: 'Soleil_Regular',
              ),
            ),
          ),
        ),
      ],
    ),
  ),
),

trying as some thing shown in the picture both text & image is in same line any help is appreciated!

CodePudding user response:

Simple way of doing it by using enter image description here

  • Related