FLUTTER ECOSYSTEM

ibako/resizable_widget

一個 Flutter 套件,可讓使用者透過拖曳來調整內部組件的大小。

可調整大小的元件 專案封面
Stars
53
Forks
40
最近推送(UTC)
2023年4月2日
專案狀態
未封存
ibako GitHub avatar
GITHUB User

ibako ↗

Software Engineer

Kyoto, Japan官方網站 ↗
語言Dart

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}
  • flutter_lints開發依賴^1.0.0-0

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

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

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(", ")),
      ),
    );
  }
}

Package page (pub.dev)

https://pub.dev/packages/resizable_widget

API Document

https://pub.dev/documentation/resizable_widget/latest/resizable_widget/resizable_widget-library.html