From bbf13d827255494a14519bedbe4e2d5112750334 Mon Sep 17 00:00:00 2001 From: shivanigupta12 Date: Sat, 22 Jan 2022 21:52:01 +0530 Subject: [PATCH] search bar usable now --- .vs/slnx.sqlite | Bin 98304 -> 98304 bytes .vs/weather-alert-app/v16/.suo | Bin 15360 -> 22016 bytes .vs/weather-alert-app/v16/Browse.VC.db | Bin 253952 -> 253952 bytes lib/src/screens/alert_rescue.dart | 3 +- lib/src/screens/forecast_screen.dart | 203 ++++++++++++----------- lib/src/screens/weather_info_screen.dart | 112 +++++++------ lib/src/widgets/search_bar.dart | 16 +- pubspec.lock | 10 +- 8 files changed, 179 insertions(+), 165 deletions(-) diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index efaa37a800243fb39c35950d33309bc43aea7dde..6ba80db1c4875fad15f10fb61205f72e2fb478a2 100644 GIT binary patch delta 4763 zcmZ`-Yj6}*7QWNdeS5m6AHpzsPG%C45JJr40SJN^l8}VNfLRex1cuH`XVNe)yL*y= zk6}EZs$Sx zlkPs>ch5cN+;h%7ll}YQ{{8S|xl6t$(CLz&+_f|0YPDVr75SQ5np#_%TAN#2D_fga zEnmKB+0u#gq1R>C$%&_$`YLnXJbW0OV9J2}jhqso{IUEl^Qe4AIwL(J*2_a|1^k_N zxA!qG4Trs3ygkep%scXCS(dWwD1VN-(i36dl78^sD>cDpX+Ss+7fG5l?)_eVjX4f4 zz=+%@{3I`fXP8yugW_>73dc`-Pn{9#Xm=se6?}8tDE@Kaf6&}iSt7jwo68q9b)n(tfb0K#-HL5D+u&QgR zp>$+KQ%95On3@R36x{?TgYGtJIGt3DsIIE1+3<-4?gq+G6+Jo}8B}z<=I#pj8lp2& zP>L60^sZ9(a%w28t5L-;Bf06&@gjE8dMCmU>aU9Zd+B5P4nc4EwsIh7^Y%Qu0DK|=&nEx6cifZ5a;$&YATxq z2W_>;FLU_jtg=T9XHs!+XPJ8iwPn-Rw7$p4C{cA&LCc`Sfy}QcwKB3mk19Dr^FiJdEsf{*J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B2HPV^I{)|TH!AfIg41!@KjxXEasg*tHi<{9 diff --git a/.vs/weather-alert-app/v16/Browse.VC.db b/.vs/weather-alert-app/v16/Browse.VC.db index 543a550d7576960aaf79ddff482439331c72a149..38b6d27b4f5a7fbb52848a3567b6986a4d96c842 100644 GIT binary patch delta 498 zcmZoTz~69yf5S~V3I5j%V&cV#X{qrg`SJM$sd;IMImM|$!jnJB2{Q^!W|e==D7g8p z{9=ApVIgKs#^n5z)cDMj)ZF6u>Zn7&)2(+5#Bc0+_Z1Fta4EG4fAk;Geo#u%MeiJCl)> zlcmu&VXMU^XRDZiAb2V1Ks|g)q^rEiK+kq delta 245 zcmZoTz~69yf5T0=i5tY2gm@=^loMv;nanExoRM?$TlvNOs=PwXnvBW$DXH<9C8@c^ z@yU55JOa$BjKzs*sqrQG@%aU*d7P8C>W6SH;jiHL;FsdRv{_MsgP%!( onModelReady: (model) => model.getWeatherData(), builder: (ctx, model, child) => SafeArea( - child: Scaffold( + child: Scaffold( body: SingleChildScrollView( child: Container( child: Column( children: [ - SizedBox(height: 90), + // SizedBox(height: 90), + SearchBar(), Container( height: 30, width: width, - child: Center( + child: Center( child: Text("No alert now", style: TextStyle( color: Colors.green, fontWeight: FontWeight.w500, - fontSize: width/17, + fontSize: width / 17, ))), ), Container( @@ -39,7 +40,8 @@ class ForecastScreen extends StatelessWidget { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12.0), ), - child: Center(child: Text("December 29 - January 10")), + child: + Center(child: Text("December 29 - January 10")), elevation: 43, ), ), @@ -72,7 +74,8 @@ class ForecastScreen extends StatelessWidget { fontSize: width / 27.5, )), const SizedBox(height: 20), - Icon(Icons.wb_sunny, color: Colors.yellow[500]), + Icon(Icons.wb_sunny, + color: Colors.yellow[500]), const SizedBox(height: 20), Text('23', style: TextStyle( @@ -119,7 +122,8 @@ class ForecastScreen extends StatelessWidget { fontSize: width / 27.5, )), const SizedBox(height: 20), - Icon(Icons.wb_sunny, color: Colors.yellow[500]), + Icon(Icons.wb_sunny, + color: Colors.yellow[500]), const SizedBox(height: 20), Text('23', style: TextStyle( @@ -166,7 +170,8 @@ class ForecastScreen extends StatelessWidget { fontSize: width / 27.5, )), const SizedBox(height: 20), - Icon(Icons.wb_sunny, color: Colors.yellow[500]), + Icon(Icons.wb_sunny, + color: Colors.yellow[500]), const SizedBox(height: 20), Text('23', style: TextStyle( @@ -213,7 +218,8 @@ class ForecastScreen extends StatelessWidget { fontSize: width / 27.5, )), const SizedBox(height: 20), - Icon(Icons.wb_sunny, color: Colors.yellow[500]), + Icon(Icons.wb_sunny, + color: Colors.yellow[500]), const SizedBox(height: 20), Text('23', style: TextStyle( @@ -240,98 +246,105 @@ class ForecastScreen extends StatelessWidget { ), Container( width: width / 1.1, - child: Column( - children: [ - Container( - height: 105, - width: width / 1.1, - child: Card( - color: const Color.fromRGBO(255, 255, 255, 1), - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - topLeft: Radius.circular(11), - topRight: Radius.circular(11))), - child: Column( + child: Column(children: [ + Container( + height: 105, + width: width / 1.1, + child: Card( + color: const Color.fromRGBO(255, 255, 255, 1), + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(11), + topRight: Radius.circular(11))), + child: Column( + children: [ + Row( children: [ - Row( - children: [ - SizedBox(width: width / 44), - Text( - "Day", - style: TextStyle( - color: Color.fromRGBO(0, 0, 0, 1), - fontWeight: FontWeight.w400, - fontSize: width / 22, - ), - ), - SizedBox(width: width / 4.4), - Icon(Icons.wb_sunny, color: Colors.yellow), - SizedBox(width: width / 4.4), - Text("19"), - SizedBox(width: width / 22), - Icon(Icons.arrow_upward, color: Colors.black54), - ], - ), - Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: const [ - Text("Sunny,High"), - Text("......................."), - Text("............"), - ], + SizedBox(width: width / 44), + Text( + "Day", + style: TextStyle( + color: Color.fromRGBO(0, 0, 0, 1), + fontWeight: FontWeight.w400, + fontSize: width / 22, ), - ) + ), + SizedBox(width: width / 4.4), + Icon(Icons.wb_sunny, + color: Colors.yellow), + SizedBox(width: width / 4.4), + Text("19"), + SizedBox(width: width / 22), + Icon(Icons.arrow_upward, + color: Colors.black54), ], - )), - ), - Container( - height: 105, - width: width / 1.1, - child: Card( - color: Color.fromRGBO(55, 86, 116, 1), - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.only( - bottomLeft: Radius.circular(11), - bottomRight: Radius.circular(11))), - child: Column( + ), + Container( + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: const [ + Text("Sunny,High"), + Text("......................."), + Text("............"), + ], + ), + ) + ], + )), + ), + Container( + height: 105, + width: width / 1.1, + child: Card( + color: Color.fromRGBO(55, 86, 116, 1), + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(11), + bottomRight: Radius.circular(11))), + child: Column( + children: [ + Row( children: [ - Row( - children: [ - SizedBox(width: width / 44), - Text( - "Night", - style: TextStyle( - color: Color.fromRGBO(255, 255, 255, 1), - fontWeight: FontWeight.w400, - fontSize: width / 22, - ), - ), - SizedBox(width: width / 4.4), - Icon(Icons.wb_cloudy_outlined, - color: Colors.yellow[500]), - SizedBox(width: width / 4.4), - Text("19"), - SizedBox(width: width / 22), - Icon(Icons.arrow_downward_sharp, - color: Colors.black54), - ], - ), - Container( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: const [ - Text("Sunny,High"), - Text("......................."), - Text("............"), - ], + SizedBox(width: width / 44), + Text( + "Night", + style: TextStyle( + color: Color.fromRGBO( + 255, 255, 255, 1), + fontWeight: FontWeight.w400, + fontSize: width / 22, ), - ) + ), + SizedBox(width: width / 4.4), + Icon(Icons.wb_cloudy_outlined, + color: Colors.yellow[500]), + SizedBox(width: width / 4.4), + Text("19"), + SizedBox(width: width / 22), + Icon(Icons.arrow_downward_sharp, + color: Colors.black54), ], - )), - ),]), + ), + Container( + child: Column( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: const [ + Text("Sunny,High"), + Text("......................."), + Text("............"), + ], + ), + ) + ], + )), + ), + ]), ), ], ), diff --git a/lib/src/screens/weather_info_screen.dart b/lib/src/screens/weather_info_screen.dart index 0266bcc..ef13ed8 100644 --- a/lib/src/screens/weather_info_screen.dart +++ b/lib/src/screens/weather_info_screen.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:weather_alert_app/provider/getit.dart'; import 'package:weather_alert_app/config/app_config.dart' as config; import 'package:weather_alert_app/provider/base_view.dart'; +import 'package:weather_alert_app/src/widgets/search_bar.dart'; import 'package:weather_alert_app/views/weatherinfo_viewmodel.dart'; class WeatherInfoScreen extends StatelessWidget { @@ -13,48 +14,49 @@ class WeatherInfoScreen extends StatelessWidget { double width = MediaQuery.of(context).size.width; return BaseView( builder: (ctx, model, child) => SafeArea( - child : Scaffold( + child: Scaffold( body: SingleChildScrollView( child: Container( width: width, - decoration: const BoxDecoration( - - ), + decoration: const BoxDecoration(), child: Column( - crossAxisAlignment :CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox(height: 90), + // SizedBox(height: 90), + SearchBar(), Container( height: 223, - width: width/1, + width: width / 1, child: Card( color: Color.fromRGBO(255, 255, 255, 1), child: Column( children: [ Row( - children: [ + children: [ SizedBox( - width: width/8, + width: width / 8, ), Text( "29-Dec-2021", style: TextStyle( fontWeight: FontWeight.w400, - fontSize: width/20, - color: Color.fromRGBO(101, 98, 98, 1)), + fontSize: width / 20, + color: + Color.fromRGBO(101, 98, 98, 1)), ), SizedBox( - width: width/4, + width: width / 4, ), Text( "9:02 PM", style: TextStyle( fontWeight: FontWeight.w400, - fontSize: width/20, - color: Color.fromRGBO(101, 98, 98, 1)), + fontSize: width / 20, + color: + Color.fromRGBO(101, 98, 98, 1)), ), SizedBox( - width: width/8.3, + width: width / 8.3, ), ], ), @@ -62,7 +64,7 @@ class WeatherInfoScreen extends StatelessWidget { children: [ Container( height: 98, - width: width/7.5, + width: width / 7.5, child: Icon(Icons.wb_cloudy, color: Colors.blue)), Column( @@ -73,7 +75,7 @@ class WeatherInfoScreen extends StatelessWidget { Text( "12 C", style: TextStyle( - fontSize: width/11.8, + fontSize: width / 11.8, fontWeight: FontWeight.w400, color: Color.fromRGBO(0, 0, 0, 1), ), @@ -81,23 +83,24 @@ class WeatherInfoScreen extends StatelessWidget { Text( "Thunderstorm", style: TextStyle( - fontSize: width/22, + fontSize: width / 22, fontWeight: FontWeight.w400, - color: Color.fromRGBO(20, 48, 90, 1), + color: + Color.fromRGBO(20, 48, 90, 1), ), ), SizedBox( height: 10, ), Row( - children: [ + children: [ Text( "19 C", style: TextStyle( - fontSize: width/22, + fontSize: width / 22, fontWeight: FontWeight.w400, - color: - Color.fromRGBO(20, 48, 90, 1), + color: Color.fromRGBO( + 20, 48, 90, 1), ), ), Icon(Icons.arrow_upward_sharp, @@ -108,14 +111,14 @@ class WeatherInfoScreen extends StatelessWidget { height: 10, ), Row( - children: [ + children: [ Text( "9 C", style: TextStyle( - fontSize: width/22, + fontSize: width / 22, fontWeight: FontWeight.w400, - color: - Color.fromRGBO(20, 48, 90, 1), + color: Color.fromRGBO( + 20, 48, 90, 1), ), ), Icon(Icons.arrow_downward_sharp, @@ -125,19 +128,20 @@ class WeatherInfoScreen extends StatelessWidget { ], ), SizedBox( - width: width/11, + width: width / 11, ), SizedBox( - width: width/40, + width: width / 40, height: 180.0, child: DecoratedBox( decoration: BoxDecoration( - color: Color.fromRGBO(196, 196, 196, 1), + color: + Color.fromRGBO(196, 196, 196, 1), ), ), ), SizedBox( - width: width/22, + width: width / 22, ), Column( children: const [ @@ -149,7 +153,7 @@ class WeatherInfoScreen extends StatelessWidget { ], ), SizedBox( - width:width/22, + width: width / 22, ), Column( children: const [ @@ -172,12 +176,12 @@ class WeatherInfoScreen extends StatelessWidget { ), Container( height: 30, - child: Center( + child: Center( child: Text("No alert now", style: TextStyle( color: Colors.green, fontWeight: FontWeight.w500, - fontSize: width/16.9, + fontSize: width / 16.9, ))), ), SizedBox( @@ -185,7 +189,7 @@ class WeatherInfoScreen extends StatelessWidget { ), Container( height: 127, - width: width/1, + width: width / 1, child: Card( color: Color.fromRGBO(255, 255, 255, 1), shape: const RoundedRectangleBorder( @@ -197,7 +201,7 @@ class WeatherInfoScreen extends StatelessWidget { child: Row( children: [ SizedBox( - width: width/22, + width: width / 22, ), Column( children: const [ @@ -212,7 +216,7 @@ class WeatherInfoScreen extends StatelessWidget { ], ), SizedBox( - width: width/2.2, + width: width / 2.2, ), Column( children: const [ @@ -236,7 +240,7 @@ class WeatherInfoScreen extends StatelessWidget { ), Container( height: 187, - width: width/1, + width: width / 1, child: Card( color: Color.fromRGBO(255, 255, 255, 1), shape: const RoundedRectangleBorder( @@ -253,14 +257,14 @@ class WeatherInfoScreen extends StatelessWidget { Row( children: [ SizedBox( - width: width/29.3, + width: width / 29.3, ), Icon( Icons.wb_cloudy_rounded, color: Colors.cyanAccent, ), SizedBox( - width: width/29.3, + width: width / 29.3, ), Column( children: [ @@ -270,7 +274,7 @@ class WeatherInfoScreen extends StatelessWidget { Text("AQI", style: TextStyle( fontWeight: FontWeight.w500, - fontSize: width/22, + fontSize: width / 22, )), SizedBox( height: 15, @@ -278,28 +282,28 @@ class WeatherInfoScreen extends StatelessWidget { Text("70 | LOW", style: TextStyle( fontWeight: FontWeight.w400, - fontSize: width/29.3, + fontSize: width / 29.3, )), ], ), SizedBox( - width: width/3, + width: width / 3, ), const Icon( Icons.wb_cloudy_rounded, color: Colors.cyanAccent, ), Column( - children: [ + children: [ Text("Pressure", style: TextStyle( fontWeight: FontWeight.w500, - fontSize: width/22, + fontSize: width / 22, )), Text("1015 mbar", style: TextStyle( fontWeight: FontWeight.w400, - fontSize: width/22, + fontSize: width / 22, )), ], ), @@ -311,44 +315,44 @@ class WeatherInfoScreen extends StatelessWidget { Row( children: [ SizedBox( - width: width/29.3, + width: width / 29.3, ), Icon(Icons.wb_cloudy), Column( children: [ SizedBox( - width: width/29.3, + width: width / 29.3, ), Text("Chance of Rain", style: TextStyle( fontWeight: FontWeight.w500, - fontSize: width/22, + fontSize: width / 22, )), Text("1 %", style: TextStyle( fontWeight: FontWeight.w400, - fontSize: width/22, + fontSize: width / 22, )), ], ), SizedBox( - width: width/5, + width: width / 5, ), Icon( Icons.wb_sunny_rounded, color: Colors.yellow, ), Column( - children: [ + children: [ Text("UV Index", style: TextStyle( fontWeight: FontWeight.w500, - fontSize: width/22, + fontSize: width / 22, )), Text("1", style: TextStyle( fontWeight: FontWeight.w400, - fontSize:width/22, + fontSize: width / 22, )), ], ), diff --git a/lib/src/widgets/search_bar.dart b/lib/src/widgets/search_bar.dart index f14e2bd..297ede2 100644 --- a/lib/src/widgets/search_bar.dart +++ b/lib/src/widgets/search_bar.dart @@ -1,24 +1,20 @@ import 'package:flutter/material.dart'; -void main() => runApp(MaterialApp( - home: Search_bar(), - )); - -class Search_bar extends StatefulWidget { - const Search_bar({Key? key}) : super(key: key); +class SearchBar extends StatefulWidget { + const SearchBar({Key? key}) : super(key: key); @override - _Search_barState createState() => _Search_barState(); + _SearchBarState createState() => _SearchBarState(); } -class _Search_barState extends State { +class _SearchBarState extends State { @override Widget build(BuildContext context) { Size size = MediaQuery.of(context).size; double height = MediaQuery.of(context).size.height; return SafeArea( - child: Scaffold( - body: Padding( + child: Container( + child: Padding( padding: const EdgeInsets.fromLTRB(15, 20, 15, 10), child: Container( height: height / 15, diff --git a/pubspec.lock b/pubspec.lock index f5e00d8..0990091 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -14,7 +14,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -35,7 +35,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: @@ -157,7 +157,7 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" meta: dependency: transitive description: @@ -260,7 +260,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.2" + version: "0.4.3" typed_data: dependency: transitive description: @@ -274,7 +274,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" weather: dependency: "direct main" description: