@@ -2,8 +2,7 @@ import 'package:flutter/material.dart';
2
2
import 'package:flutter_bloc/flutter_bloc.dart' ;
3
3
import 'package:flood_mobile/Blocs/filter_torrent_bloc/filter_torrent_bloc.dart' ;
4
4
import 'package:flood_mobile/Blocs/theme_bloc/theme_bloc.dart' ;
5
- import 'package:flood_mobile/Pages/torrent_screen/widgets/filter_by_bottom_sheet.dart' ;
6
- import 'package:flood_mobile/l10n/l10n.dart' ;
5
+ import 'package:flood_mobile/Pages/torrent_screen/widgets/sort_by_bottom_sheet.dart' ;
7
6
8
7
class SearchTorrentTextField extends StatefulWidget {
9
8
final int themeIndex;
@@ -38,6 +37,33 @@ class _SearchTorrentTextFieldState extends State<SearchTorrentTextField> {
38
37
isDense: true ,
39
38
contentPadding: EdgeInsets .symmetric (horizontal: 20 , vertical: 20 ),
40
39
hintText: context.l10n.search_torrent_text,
40
+ prefixIcon: IconButton (
41
+ icon: Icon (
42
+ FontAwesomeIcons .sortAlphaUp,
43
+ color: ThemeBloc .theme (widget.themeIndex).primaryColorDark,
44
+ size: 22 ,
45
+ ),
46
+ onPressed: () {
47
+ showModalBottomSheet (
48
+ shape: RoundedRectangleBorder (
49
+ borderRadius: BorderRadius .only (
50
+ topRight: Radius .circular (15 ),
51
+ topLeft: Radius .circular (15 ),
52
+ ),
53
+ ),
54
+ isScrollControlled: true ,
55
+ context: context,
56
+ backgroundColor:
57
+ ThemeBloc .theme (widget.themeIndex).colorScheme.background,
58
+ builder: (context) {
59
+ return SortByBottomSheet (
60
+ key: Key ("Sort By Status Bottom Sheet" ),
61
+ themeIndex: widget.themeIndex,
62
+ );
63
+ },
64
+ );
65
+ },
66
+ ),
41
67
suffixIcon: Padding (
42
68
key: Key ("Filter Torrent ActionChip" ),
43
69
padding: const EdgeInsets .only (right: 5 ),
@@ -81,8 +107,9 @@ class _SearchTorrentTextFieldState extends State<SearchTorrentTextField> {
81
107
.background,
82
108
builder: (context) {
83
109
return FilterByStatus (
84
- key: Key ("Filter By Status Bottom Sheet" ),
85
- themeIndex: widget.themeIndex);
110
+ key: Key ("Filter By Status Bottom Sheet" ),
111
+ themeIndex: widget.themeIndex,
112
+ );
86
113
},
87
114
);
88
115
},
0 commit comments