https://github.com/yako-dev/flutter-diagonal-decoration
Custom box decoration with diagonals on the background
https://github.com/yako-dev/flutter-diagonal-decoration
Last synced: 4 months ago
JSON representation
Custom box decoration with diagonals on the background
- Host: GitHub
- URL: https://github.com/yako-dev/flutter-diagonal-decoration
- Owner: yako-dev
- License: mit
- Created: 2023-07-09T13:50:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-19T01:41:00.000Z (almost 2 years ago)
- Last Synced: 2025-05-06T21:47:20.688Z (5 months ago)
- Language: C++
- Size: 969 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Diagonal Decoration
You can use plain color or gradient for backgrounds, but there is a third option that can make your app look more interesting.
Use this DiagonalDecoration or MatrixDecoration to create custom backgrounds for your containers.
![]()
## Installing:
In your pubspec.yaml
```yaml
dependencies:
diagonal_decoration: ^1.0.2
```## Basic Usage:
Just add DiagonalDecoration or MatrixDecoration to your Container's decoration parameter
```dart
return Container(
width: 200,
height: 200,
decoration: DiagonalDecoration(),
);
```
## Advanced usage
```dart
decoration: const DiagonalDecoration(
lineColor: Colors.black,
backgroundColor: Colors.grey,
radius: Radius.circular(20),
lineWidth: 1,
distanceBetweenLines: 5,
)
```
Check out other Yako packages:
[Badges](https://pub.dev/packages/badges),
[Settings UI](https://pub.dev/packages/settings_ui),
[Status Alert](https://pub.dev/packages/status_alert),
[Full Screen Menu](https://pub.dev/packages/full_screen_menu) and more to come!