flex_list 1.0.0 copy "flex_list: ^1.0.0" to clipboard
flex_list: ^1.0.0 copied to clipboard

A Flutter layout widget for flexible lists. It behaves as you would expect Expand widgets to behave within a wrap.

example/lib/main.dart

import 'package:flex_list/flex_list.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'FlexList Demo',
        theme: ThemeData(),
        home: Scaffold(
          body: Center(
            child: SizedBox(
                width: 300,
                child: FlexList(
                  horizontalSpacing: 5,
                  verticalSpacing: 10,
                  children: [
                    for (var i = 0; i < 10; i++)
                      Container(
                        color: Theme.of(context).backgroundColor,
                        padding: EdgeInsets.symmetric(
                            horizontal: 20 + 20 * (i % 4), vertical: 10),
                        child: Text("Item $i"),
                      )
                  ],
                )),
          ),
        ));
  }
}
20
likes
160
pub points
89%
popularity

Publisher

unverified uploader

A Flutter layout widget for flexible lists. It behaves as you would expect Expand widgets to behave within a wrap.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flex_list