Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made the search bar usable now. #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .vs/slnx.sqlite
Binary file not shown.
Binary file modified .vs/weather-alert-app/v16/.suo
Binary file not shown.
Binary file modified .vs/weather-alert-app/v16/Browse.VC.db
Binary file not shown.
3 changes: 2 additions & 1 deletion lib/src/screens/alert_rescue.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.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 AlertRescue extends StatelessWidget {
Expand All @@ -18,6 +18,7 @@ class AlertRescue extends StatelessWidget {
child: Scaffold(
body: Column(
children: [
SearchBar(),
Center(
child: Container(
child: Column(
Expand Down
263 changes: 111 additions & 152 deletions lib/src/screens/forecast_screen.dart

Large diffs are not rendered by default.

112 changes: 58 additions & 54 deletions lib/src/screens/weather_info_screen.dart

Large diffs are not rendered by default.

16 changes: 6 additions & 10 deletions lib/src/widgets/search_bar.dart
Original file line number Diff line number Diff line change
@@ -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<Search_bar> {
class _SearchBarState extends State<SearchBar> {
@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,
Expand Down
10 changes: 5 additions & 5 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down