to standardize the design and avoid mistakes and reduce build time,
I'm trying to define a BorderRadius class that takes a double corner
value as an argument so It can be used in many places throughout the app
i'm getting lots of errors with defining the class constructors and can't really get the solution here
import 'package:flutter/material.dart';
class Borderz extends BorderRadius{
final BorderRadius enBorderz;
final double corner;
static const double zeroCorner = 0.0,
const Borderz({
@required this.corner,
this.enBorderz = BorderRadius.only(
topLeft: Radius.circular(corner),
topRight: Radius.circular(corner),
bottomLeft: Radius.circular(corner),
bottomRight: Radius.circular(zeroCorner),
)
}) : super(zeroCorner : zeroCorner)
}
some serious fundamental mistake here in this code that makes me feel embarrassed, appreciate your help
You can copy paste run full code below
You can directly call
super.only
and no need to useenBorderz
working demo
full code