Skip to content
This repository has been archived by the owner on Oct 8, 2022. It is now read-only.

Commit

Permalink
code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
tustoz committed Jan 20, 2022
1 parent 54d04a9 commit 06cfa65
Show file tree
Hide file tree
Showing 41 changed files with 963 additions and 709 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added assets/images/grand.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/grand.png
Binary file not shown.
Binary file removed assets/images/luxuary-cover.png
Binary file not shown.
Binary file added assets/images/luxuary.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/luxuary.png
Binary file not shown.
93 changes: 53 additions & 40 deletions lib/constant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,56 @@ Color kAccentColor = Colors.white54;
Color kShadeColor = const Color(0xff3f3f3f);
Color kBottomBarColor = const Color(0xff121212);

// nunito regular 12
TextStyle nunitoRegular12 =
TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: kTextColor);

// nunito regular 14
// nunito black 14
// roboto regular 14
TextStyle nunito14 =
TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: kTextColor);

TextStyle nunito16 =
TextStyle(fontSize: 18, fontWeight: FontWeight.w400, color: kTextColor);

// nunito regular 17
TextStyle nunitoRegular17 =
TextStyle(fontSize: 17, fontWeight: FontWeight.w400, color: kTextColor);

// nunito semibold 8
// nunito bold 8
TextStyle nunito8 =
TextStyle(fontSize: 8, fontWeight: FontWeight.w600, color: kTextColor);

// nunito semibold 10
// nunito bold 10
TextStyle nunito10 =
TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: kTextColor);

// nunito bold 18
// roboto regular 18
// roboto black 18
TextStyle nunito18 =
TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: kTextColor);

// nunito bold 23
TextStyle nunito23 =
TextStyle(fontSize: 23, fontWeight: FontWeight.bold, color: kTextColor);

// nunito bold 26
TextStyle nunito26 =
TextStyle(fontSize: 26, fontWeight: FontWeight.bold, color: kTextColor);
TextStyle nunitoRegular12 = TextStyle(
fontSize: 12,
fontWeight: FontWeight.w400,
color: kTextColor,
);

TextStyle nunito14 = TextStyle(
fontSize: 14,
fontWeight: FontWeight.w400,
color: kTextColor,
);

TextStyle nunito16 = TextStyle(
fontSize: 18,
fontWeight: FontWeight.w400,
color: kTextColor,
);

TextStyle nunitoRegular17 = TextStyle(
fontSize: 17,
fontWeight: FontWeight.w400,
color: kTextColor,
);

TextStyle nunito8 = TextStyle(
fontSize: 8,
fontWeight: FontWeight.w600,
color: kTextColor,
);

TextStyle nunito10 = TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,
color: kTextColor,
);

TextStyle nunito18 = TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: kTextColor,
);

TextStyle nunito23 = TextStyle(
fontSize: 23,
fontWeight: FontWeight.bold,
color: kTextColor,
);

TextStyle nunito26 = TextStyle(
fontSize: 26,
fontWeight: FontWeight.bold,
color: kTextColor,
);
40 changes: 40 additions & 0 deletions lib/dummy.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
List<String> chip = ["Hotels", "Flats", "Resorts", "Apartment"];

List<Object> popular = [
{
"imageUrl": "assets/images/luxuary.jpg",
"name": "Luxuary Palace",
"price": "\$400",
"rating": "5.0 (54)"
},
{
"imageUrl": "assets/images/grand.jpg",
"name": "Hotel Grand",
"price": "\$300",
"rating": "4.8 (154)"
}
];

List<String> nearby = [
"assets/images/nearby1.png",
"assets/images/nearby2.png",
"assets/images/nearby3.png",
"assets/images/nearby4.png",
"assets/images/nearby5.png",
"assets/images/nearby6.png"
];

List<String> facilities = [
"assets/icons/wifi.svg",
"assets/icons/weightlift.svg",
"assets/icons/drink.svg",
"assets/icons/park.svg",
"assets/icons/pool.svg"
];

List<String> review = [
"assets/images/review1.png",
"assets/images/review2.png",
"assets/images/review3.png",
"assets/images/review4.png"
];
14 changes: 0 additions & 14 deletions lib/json/chip.json

This file was deleted.

17 changes: 0 additions & 17 deletions lib/json/facilities.json

This file was deleted.

20 changes: 0 additions & 20 deletions lib/json/nearby.json

This file was deleted.

14 changes: 0 additions & 14 deletions lib/json/popular.json

This file was deleted.

14 changes: 0 additions & 14 deletions lib/json/review.json

This file was deleted.

15 changes: 13 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,21 @@ import 'package:hotel_booking/constant.dart';
import 'package:hotel_booking/widgets/bottom_bar.dart';

void main() {
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
SystemChrome.setPreferredOrientations(
[
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
],
);

SystemChrome.setSystemUIOverlayStyle(
const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.dark,
statusBarBrightness: Brightness.dark));
statusBarBrightness: Brightness.dark,
),
);

runApp(const HotelBooking());
}

Expand Down
Loading

0 comments on commit 06cfa65

Please sign in to comment.