Last active
December 6, 2019 08:21
-
-
Save tirth-aubergine/dd533279e385aa51d1f93c2fbeea7df9 to your computer and use it in GitHub Desktop.
HomeScreen - List
This file contains 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
ListView( | |
padding: EdgeInsets.all(16), | |
children: <Widget>[ | |
...SpreadsheetDecoder.decodeBytes( | |
File(homeProvider.xlsxFilePath).readAsBytesSync()) | |
.tables[homeProvider.xlsxFileSelectedTable] | |
.rows | |
.map( | |
(value) => Column( | |
children: <Widget>[ | |
Container( | |
decoration: BoxDecoration( | |
color: Colors.transparent.withOpacity(0.1), | |
borderRadius: BorderRadius.circular(50), | |
), | |
child: ListTile( | |
contentPadding: EdgeInsets.all(16), | |
onTap: () { | |
Navigator.pushNamed(context, '/result', | |
arguments: {'result': value}); | |
}, | |
leading: Container( | |
width: 40, | |
height: 40, | |
decoration: BoxDecoration( | |
shape: BoxShape.circle, | |
color: Colors.deepPurple[200], | |
), | |
child: Icon( | |
Icons.person, | |
color: Colors.deepPurple[100], | |
size: 30, | |
), | |
), | |
title: Text( | |
value[0], | |
style: TextStyle( | |
color: Colors.white70, | |
fontWeight: FontWeight.w700, | |
), | |
), | |
), | |
), | |
SizedBox( | |
height: 24, | |
), | |
], | |
), | |
), | |
], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment