Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- class WrapExample extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Container(
- color: Colors.green,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- Wrap(
- spacing: 8.0, // gap between adjacent chips
- runSpacing: 4.0,
- children: <Widget>[
- Container(
- width: 100.0,
- height: 100.0,
- color: Colors.blueGrey,
- ),
- Container(
- width: 100.0,
- height: 100.0,
- color: Colors.blue,
- ),
- Container(
- width: 100.0,
- height: 100.0,
- color: Colors.yellow,
- ),
- Container(
- width: 100.0,
- height: 100.0,
- color: Colors.red,
- ),
- Container(
- width: 100.0,
- height: 100.0,
- color: Colors.white,
- ),
- ],
- )
- ],
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement