Skip to content

Instantly share code, notes, and snippets.

@VB10
Last active August 15, 2019 23:39
Show Gist options
  • Select an option

  • Save VB10/6e1d8386f9b852e266a627cd62a76a06 to your computer and use it in GitHub Desktop.

Select an option

Save VB10/6e1d8386f9b852e266a627cd62a76a06 to your computer and use it in GitHub Desktop.
Healtho Reminder Page
class _ReminderViewState extends State<ReminderView> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
floatingActionButton: FloatingActionButton(
onPressed: () {},
backgroundColor: Colors.transparent,
elevation: 0,
shape: CircleBorder(
side: BorderSide(color: Colors.yellow[600], width: 3)),
child: Icon(
Icons.add,
color: Colors.yellow[600],
size: UIHelper.Space30,
),
),
body: ListView.builder(
padding: EdgeInsets.symmetric(horizontal: UIHelper.Space10),
itemCount: Constants.REMINDER_COUNT,
itemBuilder: (context, index) {
/// Set listview both [FloatingActionButton] space
return index == Constants.REMINDER_COUNT - 1
? SizedBox(height: UIHelper.Space100)
: _cardItem;
},
));
}
Widget get _cardItem => Card(
color: UIHelper.SETTINGS_CARD_BACKGROUND_COLOR,
margin: EdgeInsets.only(top: UIHelper.Space20),
child: Container(
height: UIHelper.dynamicHeight(UIHelper.Space300),
padding: EdgeInsets.all(UIHelper.Space10),
child: Row(
children: <Widget>[
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("Workout Reminder", style: profileHeaderCardSubTitle),
Text("06 : 00 AM", style: profileHeaderCardSubTitle),
RichText(
text: TextSpan(children: [
TextSpan(
text: "Repeat",
style: profileHeaderCardNormalYellowTitle),
TextSpan(text: " -- ", style: profileHeaderCardSubTitle),
TextSpan(
text: "Mon, Tue, fri",
style: profileHeaderCardNormalTitle)
]),
),
],
)),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
SizedBox(
width: UIHelper.Space25 * 3,
child: Switch(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
value: false,
activeColor: Colors.yellow[600],
inactiveTrackColor: Colors.yellow[600],
activeTrackColor: Colors.yellow[600],
inactiveThumbColor: Colors.yellow[600],
onChanged: (val) {},
),
),
Icon(
Icons.delete_outline,
color: Colors.yellow[600],
size: UIHelper.Space30,
)
],
),
],
),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment