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

GitHub リポジトリCodingFries/Flutter-ShapeOfView

Flutter-ShapeOfView

CodingFries/Flutter-ShapeOfView open-source repository details.

Flutter-ShapeOfView のプロジェクト画像
スター
7
フォーク
2
最終プッシュ(UTC)
2025/08/16
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

flutter_shape_of_view

Give a custom shape to any flutter widget, Material Design 2 ready

Note

This package is a fork of

https://pub.dev/packages/shape_of_view

with added null safety.

I reserve no rights to any of the content. Hopefully you don't sue me or anything :D I'm just trynna make this package null safe :)

dependencies:
  shape_of_view: 

Give a custom shape to any android view Useful for Material Design 2

screen screen screen

ShapeOfView(
  shape: YOUR_SHAPE,
  elevation: 4,
  height: 300, //height & width are optional
  child: ...
),

Use implemented shapes

ShapeOfView came with pre-created shapes :

Circle

screen

ShapeOfView(
  shape: CircleShape(
    borderColor: Colors.white, //optional
    borderWidth: 2, //optional
  ),
  child: ...

RoundRect

screen

ShapeOfView(
  shape: RoundRectShape(
     borderRadius: BorderRadius.circular(12),
     borderColor: Colors.white, //optional
     borderWidth: 2, //optional
  ),
  child: ...

ClipCorner

screen

ShapeOfView(
  shape: CutCornerShape(
     borderRadius: BorderRadius.circular(12);
  ),
  child: ...

Arc

screen

ShapeOfView(
  shape: ArcShape(
    direction: ArcDirection.Outside,
    height: 20,
    position: ArcPosition.Bottom
  ),
  child: ...
)

Diagonal

screen

ShapeOfView(
  elevation: 4,
  height: 300,
  shape: DiagonalShape(
    position: DiagonalPosition.Bottom,
    direction: DiagonalDirection.Right,
    angle: DiagonalAngle.deg(angle: 10)
  ),
  child: ...
)

Triangle

screen

ShapeOfView(
  shape: TriangleShape(
    percentBottom: 0.5,
    percentLeft: 0,
    percentRight: 0
  ),
  child: ...,
)

Bubble

screen

ShapeOfView(
  shape: BubbleShape(
    position: BubblePosition.Bottom,
    arrowPositionPercent: 0.5,
    borderRadius: 20,
    arrowHeight: 10,
    arrowWidth: 10
  ),
  child: ...,
)

Star

screen screen

ShapeOfView(
  shape: StarShape(
    noOfPoints: 5
  ),
  child: ...,
)

Polygon

screen

ShapeOfView(
  shape: PolygonShape(
    numberOfSides: 9
  ),
  child: ...,
)

Use a custom Shape

ShapeOfView(
  shape: CustomShape(
    builder: (rect) => Path()
        ..moveTo(0, 0)
        ..close()
  ),
  child: ...,
)

or extend Shape

class MyShape extends Shape {

  @override
  Path build({Rect rect, double scale}) {
    return Path()
       ..moveTo(0, 0)
       ..close();
  }

}

then

ShapeOfView(
  shape: MyShape(),
  child: ...,
)

Getting Started with Flutter

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

License

Copyright 2019 florent37, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Coding Fries GitHub avatar
GitHub 作者

Coding Fries ↗

I have "Fries like Fingers" for Flutter Development

Pakistan
言語DartSwiftJavaShellObjective-C

使用している依存関係

依存関係一覧 5 件

  • flutter{"sdk":"flutter"}
  • vector_math^2.1.4
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^5.0.0
  • kenburns_nullsafety開発用^1.0.1

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗