cupertino_superellipse 1.0.1 copy "cupertino_superellipse: ^1.0.1" to clipboard
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 #

pub package

Formula-based superellipse implementation for Flutter. Compared to traditional BorderRadius it provides more optically balanced shape:

demo screenshot

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,
  ),
),
9
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Flutter Cupertino Superellipse. Provides iOS-like rounded corners, which are calculated using superellipse formula.

Repository (GitLab)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on cupertino_superellipse