Created
December 6, 2018 11:44
-
-
Save shubie/9d02823e88dce07193c677576dac68f3 to your computer and use it in GitHub Desktop.
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
ListTile makeListTile(Lesson lesson) => ListTile( | |
contentPadding: | |
EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), | |
leading: Container( | |
padding: EdgeInsets.only(right: 12.0), | |
decoration: new BoxDecoration( | |
border: new Border( | |
right: new BorderSide(width: 1.0, color: Colors.white24))), | |
child: Icon(Icons.autorenew, color: Colors.white), | |
), | |
title: Text( | |
lesson.title, | |
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold), | |
), | |
// subtitle: Text("Intermediate", style: TextStyle(color: Colors.white)), | |
subtitle: Row( | |
children: <Widget>[ | |
Expanded( | |
flex: 1, | |
child: Container( | |
// tag: 'hero', | |
child: LinearProgressIndicator( | |
backgroundColor: Color.fromRGBO(209, 224, 224, 0.2), | |
value: lesson.indicatorValue, | |
valueColor: AlwaysStoppedAnimation(Colors.green)), | |
)), | |
Expanded( | |
flex: 4, | |
child: Padding( | |
padding: EdgeInsets.only(left: 10.0), | |
child: Text(lesson.level, | |
style: TextStyle(color: Colors.white))), | |
) | |
], | |
), | |
trailing: | |
Icon(Icons.keyboard_arrow_right, color: Colors.white, size: 30.0), | |
onTap: () { | |
// Navigator.pushReplacementNamed(context, '/dashboard'); | |
Navigator.push( | |
context, MaterialPageRoute(builder: (context) => DetailPage())); | |
}, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment