Skip to content

Commit

Permalink
Fix some bugs and add some features. This is an AUTOMATED Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MYavuzYAGIS committed Feb 14, 2022
1 parent fdb82d6 commit ceb31f9
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ class FavoritesPage extends StatelessWidget {
appBar: AppBar(
title: Text('Saved Queries'),
backgroundColor: Colors.redAccent[700],
actions: [
// Navigate to the Search Screen
IconButton(
onPressed: () => Navigator.of(context)
.push(MaterialPageRoute(builder: (_) => SearchPage())),
icon: Icon(Icons.search))
],
),
body: ListView(
children: favorites
Expand Down Expand Up @@ -180,3 +187,37 @@ class NavigationControls extends StatelessWidget {
}
}
}

// appbar Search for history
class SearchPage extends StatelessWidget {
const SearchPage({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.redAccent[700],
// The search area here
title: Container(
width: double.infinity,
height: 40,
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(5)),
child: Center(
child: TextField(
decoration: InputDecoration(
prefixIcon: Icon(Icons.search),
suffixIcon: IconButton(
icon: Icon(Icons.clear),
onPressed: () {
/* Clear the search field */
},
),
hintText: 'Search...',
border: InputBorder.none),
),
),
)),
);
}
}

0 comments on commit ceb31f9

Please sign in to comment.