File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ class Header extends StatelessWidget {
104104 ),
105105 margin: EdgeInsets .symmetric (horizontal: 48 , vertical: 20 ),
106106 child: TextField (
107+ onSubmitted: (value) => openUrl (buildSearchUrlFromQuery (value)),
107108 style: TextStyle (color: Colors .white, fontSize: 24 ),
108109 decoration: InputDecoration (
109110 border: InputBorder .none,
@@ -214,11 +215,14 @@ class FlutterFavorites extends StatelessWidget {
214215 alignment: Alignment .centerRight,
215216 child: Padding (
216217 padding: EdgeInsets .only (right: 16 ),
217- child: Text ('VIEW ALL' ,
218- style: TextStyle (
219- color: linkColor,
220- fontSize: 16 ,
221- fontWeight: FontWeight .bold)),
218+ child: GestureDetector (
219+ onTap: () => openUrl ('https://pub.dev/flutter/favorites' ),
220+ child: Text ('VIEW ALL' ,
221+ style: TextStyle (
222+ color: linkColor,
223+ fontSize: 16 ,
224+ fontWeight: FontWeight .bold)),
225+ ),
222226 ),
223227 ),
224228 ],
Original file line number Diff line number Diff line change @@ -18,3 +18,7 @@ String buildPackageUrlFromName(String name) {
1818String buildPublisherUrlFromName (String name) {
1919 return 'https://pub.dev/publishers/$name /packages' ;
2020}
21+
22+ String buildSearchUrlFromQuery (String query) {
23+ return 'https://pub.dev/packages?q=$query ' ;
24+ }
You can’t perform that action at this time.
0 commit comments