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

card_banner のカバー
パッケージ詳細v0.0.1+2

card_banner

任意のウィジェットにバナーを配置するのに役立つシンプルなウィジェットです。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
6
いいね数
25
Pub ポイント
140

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

flutter pub add card_banner

パッケージ概要

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

CardBanner は、任意の他のウィジェットにバナーを簡単に配置できる軽量な Flutter ウィジェットです。複雑なレイアウト管理なしで、バッジ、リボン、ラベルなどの視覚的インジケータを UI 要素に追加する簡単な方法を提供します。バナーは親ウィジェットに対して位置決めでき、色、テキスト、配置オプションでカスタマイズ可能です。複数のプラットフォームでのアプリにおいて、機能やステータスインジケータ、プロモーションメッセージを強調するのに最適です。

用途

  • カードにステータスバッジを追加する
  • プロモーションコンテンツの強調
  • アイテムに優先度タグを表示する
  • UI要素用のカスタムリボンを作成する
  • 視覚的サインを用いたユーザーのフィードバックの強化

主な機能

  • 任意のウィジェットとの簡単な統合
  • カスタマイズ可能なバナーのテキストと色
  • 柔軟な配置オプション
  • 複数のプラットフォームをサポートしています
  • 最小限のボイラープレートコード
  • レスポンシブデザインの互換性

適している対象

  • UI重視のアプリを開発している開発者
  • 視覚的な注釈が必要なデザイナー
  • ステータスインジケーターを必要とするアプリ
  • クロスプラットフォームのモバイルおよびWebアプリケーション
  • 動的コンテンツタグ付きのプロジェクト

注意事項

  • 手動でのアラインメント調整が必要になる場合があります
  • 基本カスタマイズを超えるスタイルの制限
  • 複雑なアニメーションには適していません
  • シンプルで静的なバナーと併用するのが最適です
  • 大規模なリストで過剰に使用した場合のパフォーマンスへの影響

元の README

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

Card Banner

It is simple to add a banner to any widget using card banner.

Features

  • Highly customizable.
  • Multi-platform support.

Getting started

Add this line to your pubspec.yaml under the dependencies:

dependencies:
    card_banner: <latest-version>

alternatively, you can use this command:

flutter pub add card_banner

Import statement

import 'package:card_banner/card_banner.dart'

Screenshot

Usage

Simple example: Cover the card widget with the card banner and provide the required text. It's done

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color.fromARGB(255, 221, 222, 245),
      body: ListView.builder(
        padding: const EdgeInsets.symmetric(horizontal: 10),
        itemCount: 8,
        itemBuilder: (context, index) {
          return CardBanner(
            text: "50% Off",
            child: foodCard(),
          );
        },
      ),
    );
  }

  Card foodCard() {
    return Card(
      child: ListTile(
        contentPadding: EdgeInsets.zero,
        title: Image.network(
          "https://images.pexels.com/photos/461198/pexels-photo-461198.jpeg",
          fit: BoxFit.cover,
        ),
        subtitle: const Padding(
          padding: EdgeInsets.all(12.0),
          child: Text(
            "Nulla cillum qui elit adipisicing culpa ad laboris amet laboris velit. Pariatur sit tempor nostrud non duis commodo laboris. Consequat incididunt laborum qui dolore in velit consequat mollit amet. Proident eu et sint veniam sunt fugiat quis fugiat sunt pariatur do enim in.",
            overflow: TextOverflow.ellipsis,
            maxLines: 3,
          ),
        ),
      ),
    );
  }
}

Additional information

Check the example project on github for advanced usage.

カテゴリー

ソースリポジトリ

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

データはまだありません。