separated_row 3.0.4 copy "separated_row: ^3.0.4" to clipboard
separated_row: ^3.0.4 copied to clipboard

Flutter package for rendering Row widget that injects the separator in between the children.

example/main.dart

import 'package:flutter/material.dart';

import 'package:separated_row/separated_row.dart';

void main() {
  runApp(Application());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'SeparatedRow',
      home: HomePage('SeparatedRow'),
    );
  }
}

class HomePage extends StatelessWidget {
  final String title;

  const HomePage(this.title, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: SeparatedRow(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          separatorBuilder: (BuildContext context, int index) {
            return Container(
              width: 1.0,
              height: 15.0,
              color: Colors.grey,
            );
          },
          children: <Widget>[
            IconButton(
              onPressed: () {},
              icon: Icon(Icons.favorite),
            ),
            IconButton(
              onPressed: () {},
              icon: Icon(Icons.favorite_border),
            ),
            IconButton(
              onPressed: () {},
              icon: Icon(Icons.check),
            ),
            IconButton(
              onPressed: () {},
              icon: Icon(Icons.close),
            ),
          ],
        ),
      ),
    );
  }
}
20
likes
160
points
3.26k
downloads
screenshot

Documentation

API reference

Publisher

verified publisheremaq.ba

Weekly Downloads

Flutter package for rendering Row widget that injects the separator in between the children.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on separated_row