v1.0.5resizable_widget
允许用户通过拖动来调整内部小部件的大小。此包包含简单的 API,但如需自定义,您也可以灵活地定制 ResizableWidget。
187喜欢 39.1万近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
一个 Flutter 包,允许用户通过拖动来调整内部控件的大小。
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0-0以下为英文项目原文快照,最新内容请访问 GitHub。
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(", ")),
),
);
}
}
https://pub.dev/packages/resizable_widget
https://pub.dev/documentation/resizable_widget/latest/resizable_widget/resizable_widget-library.html