From 84c2fb1f2a7a934ec2a601b728f5c6c5981d4f76 Mon Sep 17 00:00:00 2001 From: Felix Date: Tue, 20 Aug 2019 13:58:53 +0100 Subject: [PATCH] button is less square --- lib/pages/receipt_page_2.dart | 87 +++++++++++++++++------------------ 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/lib/pages/receipt_page_2.dart b/lib/pages/receipt_page_2.dart index e526f43..c565922 100644 --- a/lib/pages/receipt_page_2.dart +++ b/lib/pages/receipt_page_2.dart @@ -460,57 +460,56 @@ class ReceiptPage2State extends State { child: Tooltip( message: "Submit receipt", child: Container( - decoration: new BoxDecoration( - border: new Border.all(color : Colors.transparent, width: 2), - borderRadius: BorderRadius.all(Radius.circular(2)), - ), height: 75.0, - child: Stack( - children: [ - AnimatedBackground(), - Material( - type: MaterialType.transparency, - child: InkWell( - child: Center( - child : Text("GO", - style: - TextStyle(color: Colors.white, fontSize: 30.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(2), + child: Stack( + children: [ + AnimatedBackground(), + Material( + type: MaterialType.transparency, + child: InkWell( + child: Center( + child : Text("GO", + style: + TextStyle(color: Colors.white, fontSize: 30.0), + ), ), - ), - onTap: () { - try { - if (transaction.amount.text == "" || transaction.organisation.name == null) { - showDialog( - context: context, - builder: (BuildContext context) { - return _invalidDialog(context); - } - ); - } else { - if (double.tryParse(transaction.amount.text) != null && double.tryParse(transaction.amount.text) > 0) { - _submitReceipt(transaction); - } else { + onTap: () { + try { + if (transaction.amount.text == "" || transaction.organisation.name == null) { showDialog( - context: context, - builder: (BuildContext context) { - return _invalidDialog(context); - } + context: context, + builder: (BuildContext context) { + return _invalidDialog(context); + } ); + } else { + if (double.tryParse(transaction.amount.text) != null && double.tryParse(transaction.amount.text) > 0) { + _submitReceipt(transaction); + } else { + showDialog( + context: context, + builder: (BuildContext context) { + return _invalidDialog(context); + } + ); + } } } - } - catch (_) { - showDialog( - context: context, - builder: (BuildContext context) { - return _invalidDialog(context); - } - ); - } - }, + catch (_) { + showDialog( + context: context, + builder: (BuildContext context) { + return _invalidDialog(context); + } + ); + } + }, + ), ), - ), - ], + ], + ), ), ), ),