From 0419a25e9bc2fbb0cb0c07149fb966dac40e4774 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 11 May 2021 23:23:33 +0530 Subject: [PATCH] changed: theme (0xBDE4F5) with shadows 0x86A2AE and 0xF4FFFF --- .../listViewBuilder_sessions.dart | 27 +++---- .../reusable_functions.dart | 62 +++++++++++++--- lib/main.dart | 74 +++++++++++-------- lib/pages/searchByDistrict.dart | 61 +++++++-------- lib/pages/searchByPin.dart | 40 +++++----- 5 files changed, 165 insertions(+), 99 deletions(-) diff --git a/lib/classes_and_modules/listViewBuilder_sessions.dart b/lib/classes_and_modules/listViewBuilder_sessions.dart index 7011629..45c4510 100644 --- a/lib/classes_and_modules/listViewBuilder_sessions.dart +++ b/lib/classes_and_modules/listViewBuilder_sessions.dart @@ -19,21 +19,22 @@ class _ListViewSessionsState extends State { itemCount: c.length, itemBuilder: (context, index) { return Container( - margin: EdgeInsets.fromLTRB(7, 5, 7, 5), + margin: EdgeInsets.fromLTRB(8, 7, 8, 7), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(8)), + color: Color(0xffbde4f5), + borderRadius: BorderRadius.all(Radius.circular(15)), boxShadow: [ BoxShadow( - color: Color(0xff8f6ac5), - offset: Offset(1, 1), - blurRadius: 2, + color: Color(0xff86a2ae), + offset: Offset(1.5, 1.5), + blurRadius: 3, spreadRadius: 3, ), BoxShadow( - color: Color(0xffc190ff), - offset: Offset(-1, -1), - blurRadius: 3, - spreadRadius: 2, + color: Color(0xfff4ffff), + offset: Offset(-1.5, -1.5), + blurRadius: 4, + spreadRadius: 1, ), ], ), @@ -41,7 +42,7 @@ class _ListViewSessionsState extends State { title: Text( c[index].name, style: TextStyle( - color: Colors.white, + color: Colors.black87, ), ), subtitle: Row( @@ -52,14 +53,14 @@ class _ListViewSessionsState extends State { child: Text( c[index].address, style: TextStyle( - color: Colors.white, + color: Colors.black87, ), ), ), Text( 'Min Age: ${c[index].minAgeLimit}', style: TextStyle( - color: Colors.white, + color: Colors.black87, ), ) ], @@ -76,7 +77,7 @@ class _ListViewSessionsState extends State { 'Available slots: ${c[index].availableCapacity}', style: TextStyle( fontSize: 15, - color: Colors.white, + color: Colors.black87, ), ), ), diff --git a/lib/classes_and_modules/reusable_functions.dart b/lib/classes_and_modules/reusable_functions.dart index bbad7c5..2a17d2a 100644 --- a/lib/classes_and_modules/reusable_functions.dart +++ b/lib/classes_and_modules/reusable_functions.dart @@ -11,30 +11,74 @@ Future showDialog(BuildContext context, String popUntilRoute) async { return Align( alignment: Alignment.bottomCenter, child: Container( - height: 250, + height: 200, + width: 300, child: Container( child: Column( + mainAxisAlignment: MainAxisAlignment.center, children: [ Text( 'No Centers available!', style: TextStyle( - fontSize: 25, - color: Colors.white, + fontSize: 20, + color: Colors.black54, ), ), - TextButton( - child: Text('Okay'), - onPressed: () { - Navigator.popUntil(context, ModalRoute.withName(popUntilRoute)); - }, + SizedBox(height: 10,), + Container( + height: 40, + decoration: BoxDecoration( + color: Color(0xffbde4f5), + borderRadius: BorderRadius.all(Radius.circular(15)), + boxShadow: [ + BoxShadow( + color: Color(0xff86a2ae), + offset: Offset(1.5, 1.5), + blurRadius: 3, + spreadRadius: 3, + ), + BoxShadow( + color: Color(0xfff4ffff), + offset: Offset(-1.5, -1.5), + blurRadius: 4, + spreadRadius: 1, + ), + ], + ), + child: TextButton( + child: Text( + 'Okay', + style: TextStyle( + color: Colors.black87, + fontSize: 20, + ), + ), + onPressed: () { + Navigator.popUntil(context, ModalRoute.withName(popUntilRoute)); + }, + ), ), ], ), ), margin: EdgeInsets.only(bottom: 50, left: 12, right: 12), decoration: BoxDecoration( - color: Color(0xffa87de8), + color: Color(0xffbde4f5), borderRadius: BorderRadius.circular(40), + boxShadow: [ + BoxShadow( + color: Color(0xff86a2ae), + offset: Offset(1.5, 1.5), + blurRadius: 3, + spreadRadius: 3, + ), + BoxShadow( + color: Color(0xfff4ffff), + offset: Offset(-1.5, -1.5), + blurRadius: 4, + spreadRadius: 1, + ), + ], ), ), ); diff --git a/lib/main.dart b/lib/main.dart index 370d9ed..d595108 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -9,14 +9,26 @@ void main() runApp(MaterialApp( theme: ThemeData( fontFamily: 'RobotoSlab', - scaffoldBackgroundColor: Color(0xffa87de8), + scaffoldBackgroundColor: Color(0xffbde4f5), + primaryTextTheme: TextTheme( + headline6: TextStyle( + color: Colors.black87, + ) + ), appBarTheme: AppBarTheme( - color: Color(0xffa87de8), + color: Color(0xffbde4f5), + iconTheme: IconThemeData( + color: Colors.black87, + ), + titleTextStyle: TextStyle( + color: Colors.black87, + ), elevation: 0, ), buttonTheme: ButtonThemeData( - buttonColor: Color(0xffa87de8), + buttonColor: Color(0xffbde4f5), ), + dividerColor: Colors.transparent, ), routes: { '/': (context) => HomeScreen(), @@ -33,7 +45,9 @@ class HomeScreen extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('Vaccine Slot Checker'), + title: Text( + 'Vaccine Slot Checker', + ), ), body: Center( child: Column( @@ -42,18 +56,19 @@ class HomeScreen extends StatelessWidget { Container( width: (MediaQuery.of(context).size.width)/1.5, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(12)), + color: Color(0xffbde4f5), + borderRadius: BorderRadius.all(Radius.circular(15)), boxShadow: [ BoxShadow( - color: Color(0xff8f6ac5), - offset: Offset(1, 1), - blurRadius: 2, - spreadRadius: 3, + color: Color(0xff86a2ae), + offset: Offset(1.5, 1.5), + blurRadius: 3, + spreadRadius: 4, ), BoxShadow( - color: Color(0xffc190ff), - offset: Offset(-1, -1), - blurRadius: 3, + color: Color(0xfff4ffff), + offset: Offset(-2, -2), + blurRadius: 4, spreadRadius: 2, ), ] @@ -62,7 +77,7 @@ class HomeScreen extends StatelessWidget { child: Text( "Search By PIN", style: TextStyle( - color: Colors.white, + color: Colors.black87, fontSize: 25, ), ), @@ -75,27 +90,28 @@ class HomeScreen extends StatelessWidget { Container( width: (MediaQuery.of(context).size.width)/1.5, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(12)), - boxShadow: [ - BoxShadow( - color: Color(0xff8f6ac5), - offset: Offset(1, 1), - blurRadius: 2, - spreadRadius: 3, - ), - BoxShadow( - color: Color(0xffc190ff), - offset: Offset(-1, -1), - blurRadius: 3, - spreadRadius: 2, - ), - ], + color: Color(0xffbde4f5), + borderRadius: BorderRadius.all(Radius.circular(15)), + boxShadow: [ + BoxShadow( + color: Color(0xff86a2ae), + offset: Offset(1.5, 1.5), + blurRadius: 3, + spreadRadius: 4, + ), + BoxShadow( + color: Color(0xfff4ffff), + offset: Offset(-2, -2), + blurRadius: 4, + spreadRadius: 2, + ), + ], ), child: TextButton( child: Text( "Search By District", style: TextStyle( - color: Colors.white, + color: Colors.black87, fontSize: 25, ), ), diff --git a/lib/pages/searchByDistrict.dart b/lib/pages/searchByDistrict.dart index 21d2a5a..aa313a0 100644 --- a/lib/pages/searchByDistrict.dart +++ b/lib/pages/searchByDistrict.dart @@ -98,24 +98,25 @@ class _SearchByDistrictState extends State { Container( width: MediaQuery.of(context).size.width/1.4, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(8)), + color: Color(0xffbde4f5), + borderRadius: BorderRadius.all(Radius.circular(15)), boxShadow: [ BoxShadow( - color: Color(0xff8f6ac5), - offset: Offset(1, 1), - blurRadius: 2, - spreadRadius: 3, + color: Color(0xff86a2ae), + offset: Offset(1.5, 1.5), + blurRadius: 3, + spreadRadius: 4, ), BoxShadow( - color: Color(0xffc190ff), - offset: Offset(-1, -1), - blurRadius: 3, + color: Color(0xfff4ffff), + offset: Offset(-2, -2), + blurRadius: 4, spreadRadius: 2, ), ], ), child: DropdownButton( - dropdownColor: Color(0xffa87de8), + dropdownColor: Color(0xffbde4f5), underline: Container(), icon: Icon(Icons.arrow_downward_rounded, color: Colors.blue,), hint: Container( @@ -140,7 +141,7 @@ class _SearchByDistrictState extends State { child: Text( stateName, style: TextStyle( - color: Colors.white, + color: Colors.black87, ), ), ), @@ -166,24 +167,25 @@ class _SearchByDistrictState extends State { Container( width: MediaQuery.of(context).size.width/1.4, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(8)), + color: Color(0xffbde4f5), + borderRadius: BorderRadius.all(Radius.circular(15)), boxShadow: [ BoxShadow( - color: Color(0xff8f6ac5), - offset: Offset(1, 1), - blurRadius: 2, - spreadRadius: 3, + color: Color(0xff86a2ae), + offset: Offset(1.5, 1.5), + blurRadius: 3, + spreadRadius: 4, ), BoxShadow( - color: Color(0xffc190ff), - offset: Offset(-1, -1), - blurRadius: 3, + color: Color(0xfff4ffff), + offset: Offset(-2, -2), + blurRadius: 4, spreadRadius: 2, ), ], ), child: DropdownButton( - dropdownColor: Color(0xffa87de8), + dropdownColor: Color(0xffbde4f5), underline: Container(), icon: Icon(Icons.arrow_downward_rounded, color: Colors.blue,), hint: Container( @@ -205,7 +207,7 @@ class _SearchByDistrictState extends State { child: Text( districtName, style: TextStyle( - color: Colors.white, + color: Colors.black87, ), ), ), @@ -222,18 +224,19 @@ class _SearchByDistrictState extends State { Container( height: 40, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(10)), + color: Color(0xffbde4f5), + borderRadius: BorderRadius.all(Radius.circular(15)), boxShadow: [ BoxShadow( - color: Color(0xff8f6ac5), - offset: Offset(1, 1), - blurRadius: 2, - spreadRadius: 3, + color: Color(0xff86a2ae), + offset: Offset(1.5, 1.5), + blurRadius: 3, + spreadRadius: 4, ), BoxShadow( - color: Color(0xffc190ff), - offset: Offset(-1, -1), - blurRadius: 3, + color: Color(0xfff4ffff), + offset: Offset(-2, -2), + blurRadius: 4, spreadRadius: 2, ), ], @@ -243,7 +246,7 @@ class _SearchByDistrictState extends State { 'Search', style: TextStyle( fontSize: 20, - color: Colors.white, + color: Colors.black87, ), ), onPressed: () { diff --git a/lib/pages/searchByPin.dart b/lib/pages/searchByPin.dart index cbce52f..559530e 100644 --- a/lib/pages/searchByPin.dart +++ b/lib/pages/searchByPin.dart @@ -26,18 +26,19 @@ class _SearchByPinState extends State { Container( width: MediaQuery.of(context).size.width/1.5, decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(8)), + color: Color(0xffbde4f5), + borderRadius: BorderRadius.all(Radius.circular(15)), boxShadow: [ BoxShadow( - color: Color(0xff8f6ac5), - offset: Offset(1, 1), - blurRadius: 2, - spreadRadius: 3, + color: Color(0xff86a2ae), + offset: Offset(1.5, 1.5), + blurRadius: 3, + spreadRadius: 4, ), BoxShadow( - color: Color(0xffc190ff), - offset: Offset(-1, -1), - blurRadius: 3, + color: Color(0xfff4ffff), + offset: Offset(-2, -2), + blurRadius: 4, spreadRadius: 2, ), ], @@ -48,11 +49,11 @@ class _SearchByPinState extends State { border: InputBorder.none, hintText: 'Enter your pincode', hintStyle: TextStyle( - color: Colors.white70, + color: Colors.black54, ), ), style: TextStyle( - color: Colors.white, + color: Colors.black87, ), validator: (value) { if(value.length < 6 || value.length > 6 || value == null || value.isEmpty) { @@ -82,18 +83,19 @@ class _SearchByPinState extends State { // button to search Container( decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(8)), + color: Color(0xffbde4f5), + borderRadius: BorderRadius.all(Radius.circular(15)), boxShadow: [ BoxShadow( - color: Color(0xff8f6ac5), - offset: Offset(1, 1), - blurRadius: 2, - spreadRadius: 3, + color: Color(0xff86a2ae), + offset: Offset(1.5, 1.5), + blurRadius: 3, + spreadRadius: 4, ), BoxShadow( - color: Color(0xffc190ff), - offset: Offset(-1, -1), - blurRadius: 3, + color: Color(0xfff4ffff), + offset: Offset(-2, -2), + blurRadius: 4, spreadRadius: 2, ), ], @@ -103,7 +105,7 @@ class _SearchByPinState extends State { 'Search', style: TextStyle( fontSize: 17, - color: Colors.white, + color: Colors.black87, ), ), onPressed: () {