Answers for "use of fittedBox in flutter"

1

flutter fittedbox

Container(
      height: 200,
      width: 200,
      color: Colors.red,
      child: FittedBox(
        alignment: Alignment.center,
        clipBehavior: Clip.none,
        child: Image.network('https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg'),
        fit: BoxFit.fill,
      ),
    ),
Posted by: Guest on August-30-2021
-1

fittedBox in flutter

import 'package:flutter/material.dart';
void main()
{
  runApp(MaterialApp(
    title: 'Androidmonks',
    home: Scaffold(
      appBar: AppBar(title: Text("Androidmonks"),),
      body: ListView(
            children: <Widget>[
              FittedBox(child: Row(
                children: <Widget>[
                  Container(
                    child: Image.network("https://images.pexels.com/photos/414612/pexels-photo-414612.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"),
                  ),
                  Container(
                    child: Text("This is a sample text to understand FittedBox widget"),
                  )
                ],
              ),)
            ],
        ),
    ),
  ));
  
}
Posted by: Guest on August-29-2020

Code answers related to "use of fittedBox in flutter"

Code answers related to "Dart"

Browse Popular Code Answers by Language