parent
1d1d0757c6
commit
eb56c5a287
3 changed files with 68 additions and 11 deletions
@ -0,0 +1,32 @@ |
||||
import 'package:flutter/material.dart'; |
||||
|
||||
class SimpleDialogItem extends StatelessWidget { |
||||
const SimpleDialogItem( |
||||
{required this.icon, |
||||
required this.color, |
||||
required this.text, |
||||
required this.onPressed, |
||||
Key? key}) |
||||
: super(key: key); |
||||
|
||||
final IconData icon; |
||||
final Color color; |
||||
final String text; |
||||
final VoidCallback onPressed; |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return SimpleDialogOption( |
||||
onPressed: onPressed, |
||||
child: Row( |
||||
children: [ |
||||
Icon(icon, size: 36, color: color), |
||||
Padding( |
||||
padding: const EdgeInsetsDirectional.only(start: 16), |
||||
child: Text(text), |
||||
), |
||||
], |
||||
), |
||||
); |
||||
} |
||||
} |
Loading…
Reference in new issue