You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
Dart
38 lines
1.1 KiB
Dart
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,),
|
|
],
|
|
)
|
|
);
|
|
}
|
|
}
|