Limited Box Widget
Complete Code For LimitedBox Widget In Flutter
main.dart
import 'package:flutter/material.dart';
void main(){
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.red[700],
title: Text("LimitedBox Widget"
)),
body: Center(
child: LimitedBox(
child: Container(
color: Colors.red[800],
),
),
),
);
}
}