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

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;
final double minWidth;
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,
this.minWidth,
}) : super(
key: key,
child: Container(
alignment: Alignment.center,
constraints: BoxConstraints(minWidth: minWidth),
child: child,
),
color: color,
onPressed: onPressed,
padding: padding,
borderRadius: BorderRadius.circular(radius),
minSize: minHeight,
disabledColor: nullColor ?? color.withAlpha(170),
);
}