Skip to content

Commit

Permalink
Merge pull request #411 from jaivsh/fifth
Browse files Browse the repository at this point in the history
Modified UI of search bar in home screen
  • Loading branch information
avinashkranjan authored Aug 9, 2023
2 parents 8b8065b + 0edae20 commit d8eebf0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 26 deletions.
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class _MyAppState extends State<MyApp> {
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
locale: Locale('en'),
locale: Locale('hi'),
supportedLocales: [
Locale('ru'),
Locale('en'), // English
Expand Down
13 changes: 8 additions & 5 deletions lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ class DataSearch extends SearchDelegate<String> {
@override
ThemeData appBarTheme(BuildContext context) {
return Theme.of(context).copyWith(
scaffoldBackgroundColor: Theme.of(context).colorScheme.background.withOpacity(0.8),

appBarTheme: AppBarTheme(
backgroundColor: Colors.black,
titleTextStyle: TextStyle(color: kTextColor),
Expand Down Expand Up @@ -254,21 +256,22 @@ class DataSearch extends SearchDelegate<String> {
.toList();
if (query.isEmpty) {
return Center(
child: Text('Search for the notes here'),
child: Text('Search for the notes here', style: TextStyle(color: Colors.white),),
);
}
return SingleChildScrollView(

child: Padding(
padding: EdgeInsets.all(8.0),
child: Column(
child: Container(child: Column(
children: [
Column(
children: [
if (suggestionList.length != 0)
Text(
"Recent Alerts",
style: TextStyle(
color: Colors.black,
color: Colors.white,
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
Expand Down Expand Up @@ -447,7 +450,7 @@ class DataSearch extends SearchDelegate<String> {
Text(
"Recent Homework",
style: TextStyle(
color: Colors.black,
color: Colors.white,
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
Expand Down Expand Up @@ -533,7 +536,7 @@ class DataSearch extends SearchDelegate<String> {
],
),
),
);
));
}

_getColor(BuildContext context, double percent) {
Expand Down
20 changes: 0 additions & 20 deletions lib/widgets/build_classes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,26 +154,6 @@ class _BuildClassesState extends State<BuildClasses> {
),
),),

TableCalendar<Classes>(
onFormatChanged: (format) {},
firstDay: DateTime.utc(2002),
lastDay: DateTime.utc(2024),
focusedDay: _focusedDay,
selectedDayPredicate: (day) => isSameDay(_selectedDay, day),
eventLoader: _getEventsForDay,
onDaySelected: _onDaySelected,

calendarStyle: CalendarStyle(
disabledTextStyle: TextStyle(color: Colors.white),
weekNumberTextStyle: TextStyle(color: Theme.of(context).primaryColor),
markerDecoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.amber,
),
),
),



classesList != null && classesList.isNotEmpty
? Padding(
Expand Down

0 comments on commit d8eebf0

Please sign in to comment.