Skip to content

Commit 40bcaae

Browse files
Akshatji800jesec
authored andcommitted
Adds display applied filter information on the home screen feature
1 parent dc1916f commit 40bcaae

File tree

1 file changed

+75
-1
lines changed

1 file changed

+75
-1
lines changed

lib/Pages/torrent_screen.dart

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,80 @@ class _TorrentScreenState extends State<TorrentScreen> {
122122
),
123123
),
124124
),
125+
Padding(
126+
padding: EdgeInsets.only(
127+
right: wp * 0.05,
128+
left: wp * 0.05,
129+
top: 0,
130+
bottom: 0),
131+
child: Row(
132+
mainAxisAlignment: MainAxisAlignment.center,
133+
crossAxisAlignment: CrossAxisAlignment.center,
134+
children: [
135+
Text(
136+
'Filter type:',
137+
textAlign: TextAlign.center,
138+
style: TextStyle(
139+
color: ThemeProvider.theme.accentColor,
140+
fontSize: 18,
141+
fontWeight: FontWeight.bold,
142+
),
143+
),
144+
SizedBox(width: 5),
145+
Text(
146+
trackerURISelected == 'all' ||
147+
trackerURISelected == 'null' ||
148+
trackerURISelected == ''
149+
? 'Filter by status'
150+
: 'Filter by trackers',
151+
textAlign: TextAlign.center,
152+
style: TextStyle(
153+
color: ThemeProvider
154+
.theme.primaryColorDark,
155+
fontSize: 18,
156+
fontWeight: FontWeight.bold,
157+
),
158+
),
159+
],
160+
),
161+
),
162+
Padding(
163+
padding: EdgeInsets.only(
164+
right: wp * 0.05,
165+
left: wp * 0.05,
166+
top: hp * 0.005,
167+
bottom: hp * 0.02),
168+
child: Row(
169+
mainAxisAlignment: MainAxisAlignment.center,
170+
crossAxisAlignment: CrossAxisAlignment.center,
171+
children: [
172+
Text(
173+
'Filter selected:',
174+
textAlign: TextAlign.center,
175+
style: TextStyle(
176+
color: ThemeProvider.theme.accentColor,
177+
fontSize: 18,
178+
fontWeight: FontWeight.bold,
179+
),
180+
),
181+
SizedBox(width: 5),
182+
Text(
183+
trackerURISelected == 'all' ||
184+
trackerURISelected == 'null' ||
185+
trackerURISelected == ''
186+
? '${filterStatus.toString().split(".").last}'
187+
: '$trackerURISelected',
188+
textAlign: TextAlign.center,
189+
style: TextStyle(
190+
color: ThemeProvider
191+
.theme.primaryColorDark,
192+
fontSize: 18,
193+
fontWeight: FontWeight.bold,
194+
),
195+
),
196+
],
197+
),
198+
),
125199
Expanded(
126200
child: Container(
127201
height: 100,
@@ -136,7 +210,7 @@ class _TorrentScreenState extends State<TorrentScreen> {
136210
decoration: InputDecoration(
137211
isDense: true,
138212
contentPadding: EdgeInsets.symmetric(
139-
horizontal: 20, vertical: 20),
213+
horizontal: 15, vertical: 15),
140214
hintText: 'Search Torrent',
141215
suffixIcon: Padding(
142216
padding: const EdgeInsets.all(5.0),

0 commit comments

Comments
 (0)