cupertino_superellipse 1.0.1 cupertino_superellipse: ^1.0.1 copied to clipboard
Flutter Cupertino Superellipse. Provides iOS-like rounded corners, which are calculated using superellipse formula.
Flutter Cupertino Superellipse #
Formula-based superellipse implementation for Flutter. Compared to traditional BorderRadius it provides more optically balanced shape:
Usage #
1. Depend
Add this to you package's pubspec.yaml
file:
dependencies:
cupertino_superellipse: ^1.0.1
2. Install
Run command:
$ flutter packages get
3. Import
Import in Dart code:
import 'package:cupertino_superellipse/cupertino_superellipse.dart';
4. Use
// n: superellipse n>2 property
// corners: square/rounded corners (BR, BL, TL, TR)
new Material(
clipBehavior: Clip.antiAlias,
shape: SuperEllipse(
n: 4,
corners: [true, true, true, true],
),
color: Colors.white,
child: new Container(
height: 300,
width: 300,
),
),