@@ -70,25 +70,25 @@ class DatasetsList extends StatelessWidget {
7070 children: filteredDatasets
7171 .map (
7272 (dataset) => new Container (
73- decoration: new BoxDecoration (
74- border: Border (
75- bottom: BorderSide (color: Colors .grey[300 ])),
76- ),
77- height: 80 ,
78- child: InkWell (
79- onTap: () {
80- Navigator .push (
81- context,
82- MaterialPageRoute (
83- builder: (context) =>
84- new ListLabelsScreen (dataset),
85- ),
86- );
87- },
88- child: new DatasetActions (
89- dataset, model, scaffoldKey),
90- ),
91- ),
73+ decoration: new BoxDecoration (
74+ border: Border (
75+ bottom: BorderSide (color: Colors .grey[300 ])),
76+ ),
77+ height: 80 ,
78+ child: InkWell (
79+ onTap: () {
80+ Navigator .push (
81+ context,
82+ MaterialPageRoute (
83+ builder: (context) =>
84+ new ListLabelsScreen (dataset),
85+ ),
86+ );
87+ },
88+ child:
89+ new DatasetActions ( dataset, model, scaffoldKey),
90+ ),
91+ ),
9292 )
9393 .toList ());
9494 }
@@ -158,6 +158,18 @@ class DatasetActions extends StatelessWidget {
158158 }
159159 }
160160
161+ String sharingLabel (Dataset dataset) {
162+ if (dataset.isOwner (model)) {
163+ return "Private" ;
164+ }
165+ if (dataset.isCollaborator (model)) {
166+ return "Shared" ;
167+ }
168+ if (dataset.isPublic) {
169+ return "Public" ;
170+ }
171+ }
172+
161173 Color getColor (Dataset dataset) {
162174 if (dataset.isOwner (model)) {
163175 return Colors .teal;
@@ -203,28 +215,44 @@ class DatasetActions extends StatelessWidget {
203215 crossAxisAlignment: CrossAxisAlignment .start,
204216 mainAxisAlignment: MainAxisAlignment .center,
205217 children: < Widget > [
206- new Text (
207- dataset.name.toUpperCase (),
208- style: TextStyle (
209- fontSize: 14 ,
210- letterSpacing: 1.1 ,
211- fontWeight: FontWeight .bold,
212- ),
218+ Row (
219+ children: < Widget > [
220+ Icon (
221+ getIcon (dataset),
222+ size: 14 ,
223+ color: Colors .black54,
224+ ),
225+ SizedBox (width: 4 ),
226+ new Text (
227+ dataset.name.toUpperCase (),
228+ style: TextStyle (
229+ fontSize: 14 ,
230+ letterSpacing: 1.4 ,
231+ fontWeight: FontWeight .bold,
232+ ),
233+ ),
234+ ],
213235 ),
214236 Padding (
215237 padding: const EdgeInsets .symmetric (vertical: 4.0 ),
216238 child: Row (
217239 children: < Widget > [
218- Icon (
219- getIcon (dataset),
220- size: 16 ,
221- color: Colors .black54,
222- ),
223- SizedBox (width: 4 ),
224240 new Text (
225241 dataset.description,
226242 style: TextStyle (color: Colors .black54),
227243 ),
244+ new Text (
245+ '\u 00B7' ,
246+ style: TextStyle (
247+ color: Colors .black54,
248+ fontWeight: FontWeight .bold,
249+ fontSize: 20 ,
250+ ),
251+ ),
252+ new Text (
253+ sharingLabel (dataset),
254+ style: TextStyle (color: Colors .black54),
255+ ),
228256 ],
229257 ),
230258 ),
@@ -241,7 +269,7 @@ class DatasetActions extends StatelessWidget {
241269 if (modelExists)
242270 Container (
243271 child: IconButton (
244- color: Colors .blueGrey ,
272+ color: Colors .deepPurple ,
245273 icon: Icon (Icons .center_focus_weak),
246274 tooltip: 'Run inference on an image' ,
247275 onPressed: () async {
@@ -463,13 +491,36 @@ class ModelStatusInfo extends StatelessWidget {
463491 }
464492 }
465493
466- return new Row (
494+ return Row (
467495 children: < Widget > [
468- Icon (modelIcon, size: 16 ),
469- SizedBox (width: 4 ),
470- new Text (
471- statusText,
472- style: TextStyle (color: Colors .black54),
496+ Container (
497+ decoration: new BoxDecoration (
498+ color:
499+ doesModelExist ? Color (0x80B2DFDB ) : Colors .grey.shade300,
500+ borderRadius: new BorderRadius .circular (4.0 ),
501+ ),
502+ child: Padding (
503+ padding:
504+ const EdgeInsets .symmetric (vertical: 2.0 , horizontal: 4 ),
505+ child: new Row (
506+ mainAxisAlignment: MainAxisAlignment .start,
507+ children: < Widget > [
508+ Icon (
509+ modelIcon,
510+ size: 16 ,
511+ color: doesModelExist ? Colors .teal : Colors .black54,
512+ ),
513+ SizedBox (width: 4 ),
514+ new Text (
515+ statusText,
516+ style: TextStyle (
517+ fontWeight: FontWeight .bold,
518+ color:
519+ doesModelExist ? Colors .teal : Colors .black54),
520+ ),
521+ ],
522+ ),
523+ ),
473524 ),
474525 ],
475526 );
0 commit comments