box_builder

Creator: coderz1093

Last updated:

0 purchases

box_builder Image
box_builder Images

Languages

Categories

Add to Cart

Description:

box builder

BoxBuilder #
Arbitrary logic during layout.
Example #
import 'dart:math';
import 'package:box_builder/box_builder.dart';

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

@override
Widget build(BuildContext context) {
return BoxBuilder(builder: (context, constraints, build, order) {
final a = build(const SizedBox(height: 200, width: 100));
final b = build(const SizedBox(height: 200, width: 100));

a.layout(constraints);
b.layout(constraints);

b.offset = Offset(0, a.size.height);

return Size(max(a.size.width, b.size.width), a.size.height + b.size.height);
});
}
}
copied to clipboard
Would place box b under box a.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.