diagonal

Creator: coderz1093

Last updated:

0 purchases

diagonal Image
diagonal Images

Languages

Categories

Add to Cart

Description:

diagonal

diagonal #
Apply diagonal clipping to your widgets easily.
Example #

import 'package:diagonal/diagonal.dart';
import 'package:flutter/material.dart';

class DiagonalExamples extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Diagonal Examples'),
),
body: _getBody(),
);
}

_getBody() {
return ListView(
children: <Widget>[
Diagonal(
child: Image.asset('assets/images/backdrop.jpg'),
clipHeight: 90.0,
),
Diagonal(
child: Image.asset('assets/images/backdrop.jpg'),
position: Position.BOTTOM_RIGHT,
clipHeight: 90.0,
),
Diagonal(
child: Image.asset('assets/images/backdrop.jpg'),
position: Position.TOP_LEFT,
clipHeight: 90.0,
),
Diagonal(
child: Image.asset('assets/images/backdrop.jpg'),
position: Position.TOP_RIGHT,
clipHeight: 90.0,
),
]
.map((item) => Padding(
padding: EdgeInsets.only(bottom: 16.0),
child: item,
))
.toList(),
);
}
}
copied to clipboard
Credits #
Photo by Jannis Brandt on Unsplash

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.