@@ -70,25 +70,25 @@ class DatasetsList extends StatelessWidget {
70
70
children: filteredDatasets
71
71
.map (
72
72
(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
+ ),
92
92
)
93
93
.toList ());
94
94
}
@@ -158,6 +158,18 @@ class DatasetActions extends StatelessWidget {
158
158
}
159
159
}
160
160
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
+
161
173
Color getColor (Dataset dataset) {
162
174
if (dataset.isOwner (model)) {
163
175
return Colors .teal;
@@ -203,28 +215,44 @@ class DatasetActions extends StatelessWidget {
203
215
crossAxisAlignment: CrossAxisAlignment .start,
204
216
mainAxisAlignment: MainAxisAlignment .center,
205
217
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
+ ],
213
235
),
214
236
Padding (
215
237
padding: const EdgeInsets .symmetric (vertical: 4.0 ),
216
238
child: Row (
217
239
children: < Widget > [
218
- Icon (
219
- getIcon (dataset),
220
- size: 16 ,
221
- color: Colors .black54,
222
- ),
223
- SizedBox (width: 4 ),
224
240
new Text (
225
241
dataset.description,
226
242
style: TextStyle (color: Colors .black54),
227
243
),
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
+ ),
228
256
],
229
257
),
230
258
),
@@ -241,7 +269,7 @@ class DatasetActions extends StatelessWidget {
241
269
if (modelExists)
242
270
Container (
243
271
child: IconButton (
244
- color: Colors .blueGrey ,
272
+ color: Colors .deepPurple ,
245
273
icon: Icon (Icons .center_focus_weak),
246
274
tooltip: 'Run inference on an image' ,
247
275
onPressed: () async {
@@ -463,13 +491,36 @@ class ModelStatusInfo extends StatelessWidget {
463
491
}
464
492
}
465
493
466
- return new Row (
494
+ return Row (
467
495
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
+ ),
473
524
),
474
525
],
475
526
);
0 commit comments