Last active
January 23, 2020 19:28
-
-
Save VB10/814d09f83ec3372a483ec74555e9c2de to your computer and use it in GitHub Desktop.
Rounded Button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import '../../theme.dart'; | |
| import '../../ui_helper.dart'; | |
| import '../padding/base_padding.dart'; | |
| import '../padding/base_padding_enum.dart'; | |
| import '../text/subtitle.dart'; | |
| import 'circle_card.dart'; | |
| import 'rounded_rectange_card.dart'; | |
| class IconLabelCard extends StatelessWidget { | |
| final String title; | |
| final String decription; | |
| final IconData icon; | |
| final VoidCallback onPressed; | |
| IconLabelCard({ | |
| Key key, | |
| @required this.title, | |
| @required this.decription, | |
| @required this.icon, | |
| @required this.onPressed, | |
| }) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return RoundedRectangleCard( | |
| color: greyCardColor, | |
| child: InkWell(onTap: onPressed, child: _listTile), | |
| ); | |
| } | |
| Widget get _listTile => ListTile( | |
| contentPadding: EdgeInsets.all(SpaceValue.VERY_LOW), | |
| title: Text(title), | |
| subtitle: SubTitleText(decription), | |
| leading: CircleCard(borderColor: yellowSearchCardColor, child: _icon), | |
| ); | |
| Widget get _icon => BasePadding( | |
| level: BasePaddingLevel.LOW, | |
| child: Icon(icon, color: yellowSearchCardColor), | |
| ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:healthoui/ui/shared/widget/text/subtitle.dart'; | |
| class ListViewHeader extends StatelessWidget { | |
| final String leftText; | |
| final String righText; | |
| final Color rightColor; | |
| final Color leftColor; | |
| final VoidCallback onPressed; | |
| const ListViewHeader( | |
| {Key key, | |
| @required this.leftText, | |
| @required this.righText, | |
| this.rightColor, | |
| this.leftColor, | |
| this.onPressed}) | |
| : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return InkWell( | |
| onTap: onPressed, | |
| child: Row( | |
| mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
| children: <Widget>[ | |
| Text(leftText), | |
| SubTitleText(righText, color: rightColor), | |
| ], | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment