Last active
December 6, 2018 11:47
-
-
Save shubie/c1bfc139af5c87c0d63f2ece2b4e95f1 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: 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.push( | |
| context, MaterialPageRoute(builder: (context) => DetailPage())); | |
| }, | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment