goAppVersionButton method
Future?
goAppVersionButton(
- BuildContext context, {
- String? message,
- String? assetsImage,
- Color? coloricons,
- Color? colorsGradient,
- Color? colorsGradient2,
- Color? colorsbutton,
- dynamic onOke()?,
- dynamic onClose()?,
- dynamic onThen()?,
- String? oketitle,
})
Implementation
Future? goAppVersionButton(
BuildContext context, {
String? message,
String? assetsImage,
Color? coloricons,
Color? colorsGradient,
Color? colorsGradient2,
Color? colorsbutton,
Function()? onOke,
Function()? onClose,
Function()? onThen,
String? oketitle,
}) {
var data = showModalBottomSheet(
isDismissible: true,
enableDrag: true,
context: context,
builder: (BuildContext context) {
return SafeArea(
child: Container(
alignment: Alignment.center,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
assetsImage != null ? Image.asset(assetsImage,width: 160,height: 160,) : Container(
height: 60,
width: 60,
margin: EdgeInsets.only(bottom: 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
colorsGradient!,
colorsGradient2!
])),
child: Icon(
Icons.security_update,
color: coloricons,
size: 40,
),
),
DefaultText(
margin: EdgeInsets.symmetric(horizontal: 20,vertical: 20),
textLabel: "Dear Customers!",
fontWeight: FontWeight.bold,
sizeText: 18,
),
DefaultText(
alignment: Alignment.center,
textAlign: TextAlign.center,
margin: EdgeInsets.symmetric(horizontal: 20),
sizeText: 14,
textLabel: message),
]),
),
GestureDetector(
onTap: onOke!,
child: DefaultText(
padding: EdgeInsets.all(16),
borderRadius: BorderRadius.circular(8),
alignment: Alignment.center,
margin: EdgeInsets.all(16),
colorbackground: colorsbutton,
fontWeight: FontWeight.bold,
textLabel: "Update now",
sizeText: 15,
colorsText: Colors.white,
isGradient: colorsbutton != null ? false : true,
),
)
],
),
),
);
});
data.then((value) {
return;
});
}