@@ -6,12 +6,12 @@ import 'package:flutter/material.dart';
6
6
class UsersListView extends StatelessWidget {
7
7
final List <CurrentUserDetailModel > usersList;
8
8
final String currentUsername;
9
- final int index ;
9
+ final int indexColour ;
10
10
const UsersListView ({
11
11
Key ? key,
12
12
required this .usersList,
13
13
required this .currentUsername,
14
- required this .index ,
14
+ required this .indexColour ,
15
15
}) : super (key: key);
16
16
17
17
@override
@@ -25,10 +25,10 @@ class UsersListView extends StatelessWidget {
25
25
height: 50.0 ,
26
26
padding: EdgeInsets .symmetric (vertical: 5 ),
27
27
decoration: BoxDecoration (
28
- color: ThemeProvider .theme (index ).primaryColorLight,
28
+ color: ThemeProvider .theme (indexColour ).primaryColorLight,
29
29
borderRadius: BorderRadius .circular (8 ),
30
30
border: Border .all (
31
- color: ThemeProvider .theme (index ).primaryColor,
31
+ color: ThemeProvider .theme (indexColour ).primaryColor,
32
32
width: 1.0 ,
33
33
),
34
34
),
@@ -39,26 +39,29 @@ class UsersListView extends StatelessWidget {
39
39
Text (
40
40
usersList[index].username,
41
41
style: TextStyle (
42
- color:
43
- ThemeProvider .theme (index).textTheme.bodyLarge? .color,
42
+ color: ThemeProvider .theme (indexColour)
43
+ .textTheme
44
+ .bodyLarge
45
+ ? .color,
44
46
),
45
47
),
46
48
Spacer (),
47
49
(usersList[index].username == currentUsername)
48
50
? Container (
49
51
decoration: BoxDecoration (
50
- color: ThemeProvider .theme (index).highlightColor,
52
+ color:
53
+ ThemeProvider .theme (indexColour).highlightColor,
51
54
borderRadius: BorderRadius .circular (20 ),
52
55
),
53
56
child: Padding (
54
57
padding: const EdgeInsets .symmetric (
55
58
horizontal: 6.0 ,
56
- vertical: 4 .0 ,
59
+ vertical: 3 .0 ,
57
60
),
58
61
child: Text (
59
62
'Current User' ,
60
63
style: TextStyle (
61
- color: ThemeProvider .theme (index ).primaryColor),
64
+ color: ThemeProvider .theme (1 ).primaryColor),
62
65
),
63
66
),
64
67
)
0 commit comments