import 'package:flutter/material.dart'; import 'package:test_sa/views/app_style/sizing.dart'; class LandPageItem extends StatelessWidget { final String text; final IconData icon; final VoidCallback onPressed; const LandPageItem({Key key, this.text, this.icon, this.onPressed}) : super(key: key); @override Widget build(BuildContext context) { return ElevatedButton( style: ElevatedButton.styleFrom( padding: EdgeInsets.all(10 * AppStyle.getScaleFactor(context),), textStyle: Theme.of(context).textTheme.subtitle2, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular( AppStyle.getBorderRadius(context) ) ), //foregroundColor: Colors.white, ), onPressed: onPressed, child: Column( children: [ Expanded( child: Center( child: Icon(icon,size: 58 * AppStyle.getScaleFactor(context),) ), ), Text(text,textAlign: TextAlign.center,), ], ) ); } }