Skip to content

Instantly share code, notes, and snippets.

@tirth-aubergine
Last active December 6, 2019 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tirth-aubergine/dd533279e385aa51d1f93c2fbeea7df9 to your computer and use it in GitHub Desktop.
Save tirth-aubergine/dd533279e385aa51d1f93c2fbeea7df9 to your computer and use it in GitHub Desktop.
HomeScreen - List
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