Skip to content

Commit

Permalink
Merge pull request #192 from atharva-khewle/main
Browse files Browse the repository at this point in the history
imorov ui
  • Loading branch information
atharva-khewle authored Jul 12, 2024
2 parents 90ef496 + 4f5a831 commit 230ac2d
Show file tree
Hide file tree
Showing 7 changed files with 207 additions and 208 deletions.
2 changes: 2 additions & 0 deletions lib/new_ui/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const commonbgLLightblack = Color(0xff323232);
const cardcolorblue = Color(0xff0077b6);
const oldDateSelectBlue = Color(0xff2196F3);
const cardlightblue = Color(0xff90e0ef);
const timePickerBg = Color(0xff252526);
const timePickerBorder = Color(0xff313334);
// const commonbgwhite = Color(0xfff1f5f8);
const greencontainercolor = Color(0xff2e9d59);
//the red container uses a gradient, unsure of its start and end values
Expand Down
34 changes: 34 additions & 0 deletions lib/new_ui/screens/home_screen/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,40 @@ import 'package:tsec_app/new_ui/screens/timetable_screen/timetable_screen.dart';
import 'package:tsec_app/provider/auth_provider.dart';
import 'package:tsec_app/new_ui/screens/profile_screen/profile_screen.dart';
import 'package:tsec_app/provider/railway_concession_provider.dart';











///////////////////////// THIS SCREEN ISNT BEING USED . HOME WIDGET IS BRING USWED ////////////////////////////////////////////////////////////






















class HomeScreen extends ConsumerStatefulWidget {
String currentBottomNavPage;
Expand Down
55 changes: 31 additions & 24 deletions lib/new_ui/screens/home_screen/widgets/home_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -490,37 +490,44 @@ class _HomeWidgetState extends ConsumerState<HomeWidget> {
//DATE SELECTOR
if(_onlyUserLoggedIn)
Padding(
padding: const EdgeInsets.all(15),
padding: const EdgeInsets.fromLTRB(0, 7, 0, 20),
child: Container(
width: _size.width * 0.9,
// color: Colors.red,
height: 85,
height: 70,
// could have used _size but fuck it whore-licks
child: ClipRRect(
borderRadius: BorderRadius.circular(15.0),
child: DatePicker(
DateTime.now(),
width: 50,
monthTextStyle: _theme.textTheme.headlineSmall!.copyWith(
fontSize: 14,
color: Colors.grey,
borderRadius: BorderRadius.circular(10.0),
child: Container(
decoration: BoxDecoration(
border: Border.all(color: timePickerBorder, width: 1.0), // Change the color and width as needed
borderRadius: BorderRadius.circular(10.0),
color: timePickerBg,
),
dayTextStyle: _theme.textTheme.headlineSmall!.copyWith(
fontSize: 14,
color: Colors.grey,
),
dateTextStyle: _theme.textTheme.titleSmall!.copyWith(
fontSize: 13,
color: Colors.grey,
child: DatePicker(
DateTime.now(),
width: 45,
monthTextStyle: _theme.textTheme.headlineSmall!.copyWith(
fontSize: 11,
color: Colors.grey,
),
dayTextStyle: _theme.textTheme.headlineSmall!.copyWith(
fontSize: 11,
color: Colors.grey,
),
dateTextStyle: _theme.textTheme.titleSmall!.copyWith(
fontSize: 11,
color: Colors.grey,
),
initialSelectedDate: DateTime.now(),
selectionColor: oldDateSelectBlue,
selectedTextColor: Colors.white,
onDateChange: (selectedDate) {
ref
.read(dayProvider.notifier)
.update((state) => selectedDate);
},
),
initialSelectedDate: DateTime.now(),
selectionColor: oldDateSelectBlue,
selectedTextColor: Colors.white,
onDateChange: (selectedDate) {
ref
.read(dayProvider.notifier)
.update((state) => selectedDate);
},
),
),
),
Expand Down
17 changes: 8 additions & 9 deletions lib/new_ui/screens/notes_screen/widgets/notes_filter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:intl/intl.dart';
import 'package:tsec_app/models/subject_model/subject_model.dart';
import 'package:tsec_app/models/user_model/user_model.dart';
import 'package:tsec_app/new_ui/colors.dart';
import 'package:tsec_app/provider/auth_provider.dart';
import 'package:tsec_app/provider/subjects_provider.dart';
import 'package:tsec_app/utils/custom_snackbar.dart';
Expand Down Expand Up @@ -146,7 +147,7 @@ class _NotesFilterBarState extends ConsumerState<NotesFilterBar>
pinned: true,
// toolbarHeight: _isFilterVisible ? 500 : 60,
toolbarHeight: sizeAnimation.value,
surfaceTintColor: Colors.transparent,

automaticallyImplyLeading: false,
backgroundColor: Colors.transparent,
title: AnimatedCrossFade(
Expand Down Expand Up @@ -192,9 +193,11 @@ class _NotesFilterBarState extends ConsumerState<NotesFilterBar>

// Second child is the filter bar
secondChild: Container(

decoration: BoxDecoration(
borderRadius: BorderRadius.circular(18),
color: Theme.of(context).colorScheme.tertiary,
color: timePickerBorder,
border: Border.all(color: timePickerBorder, width: 1.0), // Change the color and width as needed
// boxShadow: isItDarkMode
// ? shadowLightModeTextFields
// : shadowDarkModeTextFields,
Expand Down Expand Up @@ -241,7 +244,7 @@ class _NotesFilterBarState extends ConsumerState<NotesFilterBar>
? Column(
mainAxisSize: MainAxisSize.max,
children: [
const Text("Subjects"),
const Text("Subjects",style: TextStyle(color: Colors.white),),
SizedBox(
height: 250,
child: GridView.builder(
Expand Down Expand Up @@ -353,9 +356,7 @@ class _NotesFilterBarState extends ConsumerState<NotesFilterBar>
},
icon: Icon(
Icons.cancel_outlined,
color: Theme.of(context)
.colorScheme
.onSecondaryContainer,
color: Colors.white,
size: 30,
),
),
Expand All @@ -366,9 +367,7 @@ class _NotesFilterBarState extends ConsumerState<NotesFilterBar>
},
icon: Icon(
Icons.refresh,
color: Theme.of(context)
.colorScheme
.onSecondaryContainer,
color: Colors.white,
size: 30,
),
),
Expand Down
65 changes: 31 additions & 34 deletions lib/new_ui/screens/railway_screen/railway_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ class _RailwayConcessionScreenState
SizedBox(
height: size.height * .075,
),
if (concessionDetails?.status != null && (concessionDetails!.status == 'serviced' || concessionDetails!.status == 'unserviced'))
if (concessionDetails!= null && concessionDetails.status != null && (concessionDetails!.status == 'serviced' || concessionDetails!.status == 'unserviced'))
//Old UI Container
/*Container(
width: size.width * 0.8,
Expand Down Expand Up @@ -704,13 +704,7 @@ class _RailwayConcessionScreenState
height: 60,
child: Padding(
padding: const EdgeInsets.all(10.0),
child:
(concessionDetails!.status == 'serviced')
? Text(
futurePassMessage(concessionDetails),
textAlign: TextAlign.justify,
style: const TextStyle(color: Colors.white),)
: Row(
child: Row(
children: [
Image.asset('assets/images/icons/box_imp.png',width: 16,),
SizedBox(width: 10.0,),
Expand Down Expand Up @@ -852,32 +846,35 @@ class _RailwayConcessionScreenState
Column(
children: [
SizedBox(height: 20.0,),
Container(
width: size.width*0.75,
decoration: BoxDecoration(
color: oldDateSelectBlue,
borderRadius: BorderRadius.circular(size.width*0.05),
border: Border.all(color: Colors.white),
boxShadow: [
BoxShadow(offset: Offset.fromDirection(2),spreadRadius: 2,color: Colors.black,blurRadius: 2)
],
),
alignment: Alignment.center,
height: 60,
child: Padding(
padding: const EdgeInsets.all(10.0),
child:
Row(
children: [
Image.asset('assets/images/icons/box_imp.png',width: 16,),
SizedBox(width: 10.0,),
Expanded(
child: Text(
futurePassMessage(concessionDetails),
style: const TextStyle(color: Colors.white),),
)
],
),
GestureDetector(
onTap: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=> GuideLinesScreen(),),),
child: Container(
width: size.width*0.75,
decoration: BoxDecoration(
color: oldDateSelectBlue,
borderRadius: BorderRadius.circular(size.width*0.05),
border: Border.all(color: Colors.white),
boxShadow: [
BoxShadow(offset: Offset.fromDirection(2),spreadRadius: 2,color: Colors.black,blurRadius: 2)
],
),
alignment: Alignment.center,
height: 60,
child: Padding(
padding: const EdgeInsets.all(10.0),
child:
Row(
children: [
Image.asset('assets/images/icons/box_imp.png',width: 16,),
SizedBox(width: 10.0,),
Expanded(
child: Text(
futurePassMessage(concessionDetails),
style: const TextStyle(color: Colors.white),),
)
],
),
),
),
),
Container(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class StatusStepper extends StatelessWidget {
if (concessionStatus == "unserviced") {
return EasyStep(
customStep: getStatusCircle(1),
title: "Under Review",
title: "Reviewing",
);
}
else if(concessionStatus == "serviced" || concessionStatus == "rejected") {
Expand Down
Loading

0 comments on commit 230ac2d

Please sign in to comment.