You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

39 lines
1.0 KiB

4 years ago
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class AkuCupertinoButton extends CupertinoButton {
final VoidCallback onPressed;
final Widget child;
final Color color;
final EdgeInsetsGeometry padding;
final double radius;
final double minHeight;
final Color nullColor;
4 years ago
final double minWidth;
4 years ago
AkuCupertinoButton({
Key key,
@required this.onPressed,
@required this.child,
this.color = Colors.transparent,
this.padding = EdgeInsets.zero,
this.radius = 0,
this.minHeight = 0,
this.nullColor,
4 years ago
this.minWidth,
4 years ago
}) : super(
key: key,
4 years ago
child: Container(
alignment: Alignment.center,
constraints: BoxConstraints(minWidth: minWidth),
child: child,
),
4 years ago
color: color,
onPressed: onPressed,
padding: padding,
borderRadius: BorderRadius.circular(radius),
minSize: minHeight,
disabledColor: nullColor ?? color.withAlpha(170),
);
}