resizable_widget
resizablewidget enables users to resize the internal widgets by dragging.
this package contains simple apis, but if needed, you can customize resizablewidget flexibly.
example
shows a simple code example below.
import 'package:flutter/material.dart';
import 'package:resizable_widget/resizable_widget.dart';
class mypage extends statelesswidget {
@override
widget build(buildcontext context) {
return scaffold(
body: resizablewidget(
children: [ // required
container(color: colors.greenaccent),
container(color: colors.yellowaccent),
container(color: colors.redaccent),
],
ishorizontalseparator: false, // optional
isdisabledsmarthide: false, // optional
separatorcolor: colors.white12, // optional
separatorsize: 4, // optional
percentages: [0.2, 0.5, 0.3], // optional
onresized: (infolist) => // optional
print(infolist.map((x) => '(${x.size}, ${x.percentage}%)').join(", ")),
),
);
}
}
Comments are closed.