Skip to content

Instantly share code, notes, and snippets.

@VB10
Created September 8, 2019 15:39
Show Gist options
  • Save VB10/fc49c6bb4620111103dca14a78dda0b2 to your computer and use it in GitHub Desktop.
Save VB10/fc49c6bb4620111103dca14a78dda0b2 to your computer and use it in GitHub Desktop.
Tips Detail
Widget build(BuildContext context) {
HealthTips tipItem = ModalRoute.of(context).settings.arguments;
return Scaffold(
appBar: AppBar(
centerTitle: false,
title: Text(Constants.HEALTH_TIPS),
backgroundColor: UIHelper.SETTINGS_APP_BAR_COLOR,
),
body: Column(
children: <Widget>[
UIHelper.verticalSpace,
Image.asset(tipItem.image),
UIHelper.verticalSpace,
Text(
tipItem.title,
style: profileHeaderCardSubTitle,
),
Expanded(
child: ListView.builder(
itemCount: 6,
shrinkWrap: true,
itemBuilder: (context, index) {
return ListTile(
title: RichText(
text: TextSpan(children: [
TextSpan(
text: "$index) ", style: profileHeaderCardSubTitle),
TextSpan(
text: "${tipItem.subTitle})",
style: profileHeaderCardNormalTitle),
]),
),
// title: Text("$index) ${tipItem.subTitle}",
// style: profileHeaderCardNormalTitle),
);
},
),
)
],
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment