パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.0

flextras

追加機能を備えた Flex ウィジェット(Columns および Rows)のコレクション。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
9130
いいね数
143
Pub ポイント
150

パッケージをインストール

flutter pub add flextras

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Flextras は、標準の Column および Row ウィジェットの機能を拡張し、より柔軟で強力なレイアウト管理を可能にする Flutter パッケージです。配置、余白、応答性の挙動に対する強化された制御を提供し、複雑で適応的な UI を作成しやすくなります。組み込みの Flex ウィジェットを超えるカスタマイズを求める開発者向けに設計されており、既存の Flutter プロジェクトにスムーズに統合できます。このパッケージはモバイル、Web、デスクトップを含むすべての主要プラットフォームをサポートしており、デバイス間で一貫した動作を保証します。

用途

  • レスポンシブレイアウトの作成
  • 動的な余白を使用して複雑なUIを構築する
  • アライメント精度の向上
  • 複数の画面サイズに対応する柔軟なインターフェースの設計
  • 繰り返しのレイアウトパターンを簡素化する

主な機能

  • 拡張された配置オプション
  • 動的スペース制御
  • レスポンシブレイアウトヘルパー
  • クロスプラットフォームの一貫性
  • 既存のFlutterコードとの簡単な統合

適している対象

  • 複雑なレイアウトを構築するFlutter開発者
  • 複数プラットフォーム間でのUIの一貫性を重視するチーム
  • ウィジェットの配置に対して細かい制御が必要なプロジェクト

注意事項

  • Flutter のレイアウトシステムに精通している必要があります
  • シンプルなレイアウトにオーバーヘッドを追加する可能性があります
  • 高度なレイアウト要件を持つプロジェクトに最適

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

tests

flextras

A collection of Columns and Rows with extra functionality:

  • PaddedColumn / PaddedRow - Wraps a column/row in padding
  • SeparatedColumn / SeparatedRow - Insert any widget between each child
  • ExpandedScrollingColumn / ExpandedScrollingRow - Allow a column to hold Expandable children, while still scrolling if it needs to.

🔨 Installation

dependencies:
  flextras: ^0.0.1
⚙ Import
import 'package:flextras/flextras.dart';

🕹️ Usage

PaddedContainer and PaddedRow

A simple combination of Padding and Column/Row, as is often needed. Very simple, but saves a few lines in your tree:

return PaddedColumn(
    padding: EdgeInsets.all(20),
    children: [ ... ]
)
SeparatedColumn and SeparatedRow

Often you want to place a divider between the elements of a Column or Row. Use the separatorBuilder method to do so easily:

return SeparatedColumn(
    // 10px gap between each element
    separatorBuilder: () => SizedBox(height: 10),
    children: [ ... ]
)
ExpandedScrollingColumn and ExpandedScrollingRow

Solves a common use case where you want to have some expanding content, that can also begin scrolling if it runs out of room.

Normally, if you do something like this it will throw a layout error:

SingleChildScrollView(
    child: Column(
        children: [
            Expanded(child: ...) // This tries to expand to infinity :(
        ]
    )
)

ExpandedScrollingColumn fixes this by using the content's natural height, or the height of the parent view, whichever is greater.

// This will expand vertically to fill the parent, but begin scrolling when it has to
ExpandedScrollingColumn(
    children: [
        Expanded(child: Container(height: 400)),
    ]
)

🐞 Bugs/Requests

If you encounter any problems please open an issue. If you feel the library is missing a feature, please raise a ticket on Github and we'll look into it. Pull request are welcome.

📃 License

MIT License

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト