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

sleek_button のカバー
パッケージ詳細v0.2.0

sleek_button

シンプルだが、カスタマイズ可能なボタン。

30日間ダウンロード
13
いいね数
19
Pub ポイント
40

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

flutter pub add sleek_button

パッケージ概要

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

Sleek Button は、最小限の努力で洗練された現代的なボタンを作成できる軽量でカスタマイズ可能な Flutter ウィジェットです。アニメーション、グラデーション、影などのさまざまな効果を用いたボタンのスタイル設定にシンプルな API を提供します。重い依存関係なしに、簡単で視覚的に魅力的なボタンコンポーネントを探している開発者に最適です。サイズ、色、形状、リップル効果のカスタマイズが可能で、基本的および高度な UI 要件に対応できます。あらゆる Flutter プロジェクトにスムーズに統合できます。

用途

  • モバイルアプリでのスタイリッシュなボタンの作成
  • アニメーションボタン効果の追加
  • 魅力的な入力コントロールを使用してフォームを構築する
  • インタラクティブなUI要素の設計
  • カスタムボタンテーマの実装
  • ユーザーインターフェースの美的な質の向上

主な機能

  • 高度にカスタマイズ可能な外観
  • 組み込みのアニメーションとリップル効果
  • グラデーションと影のサポート
  • シンプルで直感的な API
  • 軽量で高速なパフォーマンス
  • 既存のFlutterプロジェクトとの簡単な統合

適している対象

  • Flutterの初心者が使いやすいウィジェットを探している
  • 素早くボタンのスタイルを適用したい開発者
  • 洗練されたUIコンポーネントを必要とするプロジェクト
  • 視覚的魅力とインタラクティビティに焦点を当てたアプリ
  • 画面間で一貫したボタンデザインを目指すチーム

注意事項

  • ボタン固有の機能に限定
  • ロード中や無効などの複雑な状態を組み込みでサポートしていません
  • 高度な相互作用には追加のコードが必要になる場合があります
  • 非常に動的なまたはデータ駆動型のボタン論理には適していません

元の README

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

A simple but yet customizable button.

Install

Add the dependency to your pubspec.yaml :

dependencies:
    sleek_button: <version>

Quick start

SleekButton(
    onTap: () {
        print('tapped!');
    },
    style: SleekButtonStyle.flat(
        color: swatch.primary,
        inverted: true,
        rounded: true,
        size: SleekButtonSize.big,
        context: context,
    ),
    child: const Icon(Icons.format_bold),
)

Usage

Widget
SleekButton(
    onTap: () {
        print('tapped!');
    },
    style: <style>
    child: const Text('Save'),,
)
SleekButton(
    onTap: () {
        print('tapped!');
    },
    style: <style>
    child: Row(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
            const Icon(Icons.check),
            const SizedBox(width: 6),
            const Text('Save'),
        ],
    ),
)

If the direct child is an Icon, the button will be a square.

SleekButton(
    onTap: () {
        print('tapped!');
    },
    style: <style>
    child: const Icon(Icons.check),
)
Styles
Flat
SleekButtonStyle.flat(
    context: context,
)
SleekButtonStyle.flat(
    size: SleekButtonSize.small,
    context: context,
)
SleekButtonStyle.flat(
    inverted: true,
    context: context,
)
SleekButtonStyle.flat(
    rounded: true,
    context: context,
)
SleekButtonStyle.flat(
    size: SleekButtonSize.medium,
    rounded: true,
    context: context,
)
Outlined
SleekButtonStyle.outlined(
    context: context,
)
SleekButtonStyle.outlined(
    size: SleekButtonSize.small,
    context: context,
)
SleekButtonStyle.outlined(
    inverted: true,
    context: context,
)
SleekButtonStyle.outlined(
    rounded: true,
    context: context,
)
SleekButtonStyle.outlined(
    size: SleekButtonSize.medium,
    rounded: true,
    context: context,
)
Light
SleekButtonStyle.light(
    context: context,
)
SleekButtonStyle.light(
    size = SleekButtonSize.small,
    context: context,
)
SleekButtonStyle.light(
    rounded = true,
    context: context,
)
SleekButtonStyle.light(
    size: SleekButtonSize.medium,
    rounded = true,
    context: context,
)
Colors

If you give a color, all variants (dark, light, invert) will be calculated with the help of the derived_colors package.

SleekButtonStyle.flat(
    color: const Color(0xFF)
    context: context,
)
 SleekButtonStyle.light(
    color: const Color(0xFFFFC369),
    context: context,
)
SleekButtonStyle.outlined(
    color: const Color(0xFF323232),
    context: context,
)
Theme

You can customize the default appearance of the button by adding a SleekButtonTheme in the tree. If a Theme is in the tree, it will use it tu deduce a default theme.

SleekButtonTheme(
    data: const SleekButtonThemeData(
        padding: 24,
        textStyle: TextStyle(fontSize: 11),
        cornerRadius: 8.0,
        iconTheme: IconThemeData(size: 10),
        fill: Color(0xFFFF0000),
        borderWidth: 2,
    ),
    child: app,
)

Thanks

Thanks to the bulma framework team for the inspiration.

カテゴリー

依存関係

依存関係一覧 3 件

ソースリポジトリ

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

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