Skip to content

Commit

Permalink
Merge pull request #1 from AbdulrahmanAbusnena/dev2
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulrahmanAbusnena authored Aug 13, 2024
2 parents 9287125 + 189b1e1 commit 4bbdf90
Show file tree
Hide file tree
Showing 10 changed files with 404 additions and 235 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release




Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/tokyo.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:
2 changes: 1 addition & 1 deletion lib/Components/card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class _ReCardsState extends State<ReCards> {
height: 250, // Match image height to card height
width: 190, // Match image width to card width
fit: BoxFit.cover,
),
),
),
Positioned(
// Position text on top of the image
Expand Down
58 changes: 58 additions & 0 deletions lib/Components/cards2.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

class Cards extends StatefulWidget {
final String image;
final String locationName;
const Cards({super.key, required this.locationName, required this.image});

@override
State<Cards> createState() => _CardsState();
}

class _CardsState extends State<Cards> {
@override
Widget build(BuildContext context) {
return Container(
height: 250,
width: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(54.0),
// Round corners for the card
),
child: Stack(
// Use Stack to overlay elements
children: [
ClipRRect(
// Rounded image clip
borderRadius: BorderRadius.circular(20),
child: Image.asset(
widget.image,
height: 250, // Match image height to card height
width: 190, // Match image width to card width
fit: BoxFit.cover,
),
),
Positioned(
// Position text on top of the image
bottom: 10.0, // Adjust vertical position from bottom
left: 10.0, // Adjust horizontal position from left
child: Container(
// Container for text styling

padding: const EdgeInsets.all(8.0),
child: Text(
widget.locationName,
style: GoogleFonts.montserrat(
fontSize: 20,
fontWeight: FontWeight.w800,
color: Colors.white, // Text color for visibility
),
),
),
),
],
),
);
}
}
64 changes: 64 additions & 0 deletions lib/Components/search_homepage.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

class SearchHomepage extends StatefulWidget {
const SearchHomepage({super.key});

@override
State<SearchHomepage> createState() => _SearchHomepageState();
}

class _SearchHomepageState extends State<SearchHomepage> {
@override
Widget build(BuildContext context) {
return Padding(
//padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 15),
padding: const EdgeInsets.all(25),
child: Container(
margin: const EdgeInsets.only(
top: 15,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
boxShadow: const [
BoxShadow(
color: Color(0xff4b4b4b),
// blurRadius: 10,
spreadRadius: 0.0,
),
],
),
child: TextField(
decoration: InputDecoration(
hintText: 'Enter your desired location or serivce',
hintStyle: GoogleFonts.montserrat(
fontSize: 15,
fontWeight: FontWeight.w700,
),
prefixIcon: const Icon(Icons.search_rounded, size: 35),
filled: true,
fillColor: Colors.white,
hoverColor: Colors.black,
border: InputBorder.none,
contentPadding: const EdgeInsets.symmetric(
vertical: 15,
horizontal: 20,
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(30),
),
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
width: 2,
// fotni
color: Color(0xff000000),
),
borderRadius: BorderRadius.circular(30),
),
),
),
),
);
}
}
Loading

0 comments on commit 4bbdf90

Please sign in to comment.