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.
cake_wallet/lib/src/widgets/alert_with_one_action.dart

55 lines
1.5 KiB

import 'package:flutter/material.dart';
import 'package:cake_wallet/src/widgets/base_alert_dialog.dart';
import 'package:cake_wallet/palette.dart';
class AlertWithOneAction extends BaseAlertDialog {
AlertWithOneAction({
@required this.alertTitle,
@required this.alertContent,
@required this.buttonText,
@required this.buttonAction,
this.alertBarrierDismissible = true
});
final String alertTitle;
final String alertContent;
final String buttonText;
final VoidCallback buttonAction;
final bool alertBarrierDismissible;
@override
String get titleText => alertTitle;
@override
String get contentText => alertContent;
@override
bool get barrierDismissible => alertBarrierDismissible;
@override
Widget actionButtons(BuildContext context) {
return Container(
width: 300,
height: 52,
padding: EdgeInsets.only(left: 12, right: 12),
color: Palette.blueCraiola,
child: ButtonTheme(
minWidth: double.infinity,
child: FlatButton(
onPressed: buttonAction,
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
child: Text(
buttonText,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w600,
color: Colors.white,
decoration: TextDecoration.none,
),
)),
),
);
}
}