Layout-Wrap

 Wrap

Source Code
import 'package:flutter/material.dart';

void main() {
runApp( MaterialApp(
title:"Wrap",
home:Scaffold(appBar: AppBar(title: Text(' Wrap',),),
body: Material(
child: Center(
child:
WrapExample()
,
),
) ,
),
));
}

class WrapExample extends StatelessWidget {
const WrapExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Wrap(
// Gap between adjacent chips.
spacing: 8.0,
// Gap between lines.
runSpacing: 4.0,
children: [
'Cauchy',
'Fourrier',
'Lagrange',
'Lebesgue',
'Levy',
'Poisson',
'Pointcare',
]
.map((String name) => Chip(
avatar: CircleAvatar(child: Text(name.substring(0, 1))),
label: Text(name),
))
.toList(),
);
}
}



Comments