import 'package:flutter/material.dart'; payWithGold( BuildContext context, String type, Function selected, String? tapped) { return Container( margin: EdgeInsets.all(5), width: 90, height: 90, decoration: new BoxDecoration( shape: BoxShape.circle, color: Colors.transparent, ), child: Container( width: 90, height: 90, decoration: new BoxDecoration( shape: BoxShape.circle, color: Colors.transparent, ), child: ClipRRect( borderRadius: BorderRadius.circular(120.0), child: InkWell( onTap: () => selected(type), child: Stack( children: [ Image( width: 90, height: 90, fit: BoxFit.fill, image: AssetImage("assets/images/gold1.png"), ), Visibility( visible: type == tapped ? false : true, child: Container( width: double.infinity, height: double.infinity, color: Color.fromRGBO(0, 0, 0, 0.4), ), ), ], ), ), ), ), ); }