diff --git a/assets/icons/MDS-Public-TW-Button.svg b/assets/icons/MDS-Public-TW-Button.svg
new file mode 100644
index 0000000..e8f85f6
--- /dev/null
+++ b/assets/icons/MDS-Public-TW-Button.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/calendar-tick 2.svg b/assets/icons/calendar-tick 2.svg
new file mode 100644
index 0000000..032df26
--- /dev/null
+++ b/assets/icons/calendar-tick 2.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/icons/calendar-tick.svg b/assets/icons/calendar-tick.svg
new file mode 100644
index 0000000..1a40cd0
--- /dev/null
+++ b/assets/icons/calendar-tick.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/icons/clock.svg b/assets/icons/clock.svg
new file mode 100644
index 0000000..baf3724
--- /dev/null
+++ b/assets/icons/clock.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/dislike.svg b/assets/icons/dislike.svg
new file mode 100644
index 0000000..9296e56
--- /dev/null
+++ b/assets/icons/dislike.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/favorite.svg b/assets/icons/favorite.svg
new file mode 100644
index 0000000..9d38161
--- /dev/null
+++ b/assets/icons/favorite.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/game 2.svg b/assets/icons/game 2.svg
new file mode 100644
index 0000000..083e3ee
--- /dev/null
+++ b/assets/icons/game 2.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/icons/game.svg b/assets/icons/game.svg
new file mode 100644
index 0000000..135a362
--- /dev/null
+++ b/assets/icons/game.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/icons/like.svg b/assets/icons/like.svg
new file mode 100644
index 0000000..8fa0663
--- /dev/null
+++ b/assets/icons/like.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/nearby.svg b/assets/icons/nearby.svg
new file mode 100644
index 0000000..430b2d7
--- /dev/null
+++ b/assets/icons/nearby.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/icons/nearby2.svg b/assets/icons/nearby2.svg
new file mode 100644
index 0000000..e9a9fa2
--- /dev/null
+++ b/assets/icons/nearby2.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/icons/profile 2.svg b/assets/icons/profile 2.svg
new file mode 100644
index 0000000..24fa30e
--- /dev/null
+++ b/assets/icons/profile 2.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/profile.svg b/assets/icons/profile.svg
new file mode 100644
index 0000000..2b6b434
--- /dev/null
+++ b/assets/icons/profile.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/receipt-discount 2.svg b/assets/icons/receipt-discount 2.svg
new file mode 100644
index 0000000..a7e8180
--- /dev/null
+++ b/assets/icons/receipt-discount 2.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/icons/receipt-discount.svg b/assets/icons/receipt-discount.svg
new file mode 100644
index 0000000..b83165f
--- /dev/null
+++ b/assets/icons/receipt-discount.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/icons/routing-2.svg b/assets/icons/routing-2.svg
new file mode 100644
index 0000000..8199083
--- /dev/null
+++ b/assets/icons/routing-2.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/icons/star fill.svg b/assets/icons/star fill.svg
new file mode 100644
index 0000000..7ec9167
--- /dev/null
+++ b/assets/icons/star fill.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/star half.svg b/assets/icons/star half.svg
new file mode 100644
index 0000000..86f760e
--- /dev/null
+++ b/assets/icons/star half.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/tick.svg b/assets/icons/tick.svg
new file mode 100644
index 0000000..41550c0
--- /dev/null
+++ b/assets/icons/tick.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/images/wp1929534-fast-food-wallpapers 1.png b/assets/images/wp1929534-fast-food-wallpapers 1.png
new file mode 100644
index 0000000..bb51853
Binary files /dev/null and b/assets/images/wp1929534-fast-food-wallpapers 1.png differ
diff --git a/lib/data/model/workingHours.dart b/lib/data/model/workingHours.dart
new file mode 100644
index 0000000..c85a4de
--- /dev/null
+++ b/lib/data/model/workingHours.dart
@@ -0,0 +1,49 @@
+class WorkingHours {
+ final String day;
+ final List shifts;
+
+ WorkingHours({
+ required this.day,
+ required this.shifts,
+ });
+
+ factory WorkingHours.fromJson(Map json) {
+ return WorkingHours(
+ day: json['day'],
+ shifts: (json['shifts'] as List)
+ .map((shift) => Shift.fromJson(shift))
+ .toList(),
+ );
+ }
+
+ Map toJson() {
+ return {
+ 'day': day,
+ 'shifts': shifts.map((shift) => shift.toJson()).toList(),
+ };
+ }
+}
+
+class Shift {
+ final String openAt;
+ final String closeAt;
+
+ Shift({
+ required this.openAt,
+ required this.closeAt,
+ });
+
+ factory Shift.fromJson(Map json) {
+ return Shift(
+ openAt: json['open_at'],
+ closeAt: json['close_at'],
+ );
+ }
+
+ Map toJson() {
+ return {
+ 'open_at': openAt,
+ 'close_at': closeAt,
+ };
+ }
+}
diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart
index a3338aa..dc393c6 100644
--- a/lib/gen/assets.gen.dart
+++ b/lib/gen/assets.gen.dart
@@ -21,6 +21,10 @@ class $AssetsIconsGen {
/// File path: assets/icons/Line 4.svg
SvgGenImage get line4 => const SvgGenImage('assets/icons/Line 4.svg');
+ /// File path: assets/icons/MDS-Public-TW-Button.svg
+ SvgGenImage get mDSPublicTWButton =>
+ const SvgGenImage('assets/icons/MDS-Public-TW-Button.svg');
+
/// File path: assets/icons/MDS-Public-TW-Tag.svg
SvgGenImage get mDSPublicTWTag =>
const SvgGenImage('assets/icons/MDS-Public-TW-Tag.svg');
@@ -55,6 +59,14 @@ class $AssetsIconsGen {
/// File path: assets/icons/back.svg
SvgGenImage get back => const SvgGenImage('assets/icons/back.svg');
+ /// File path: assets/icons/calendar-tick 2.svg
+ SvgGenImage get calendarTick2 =>
+ const SvgGenImage('assets/icons/calendar-tick 2.svg');
+
+ /// File path: assets/icons/calendar-tick.svg
+ SvgGenImage get calendarTick =>
+ const SvgGenImage('assets/icons/calendar-tick.svg');
+
/// File path: assets/icons/card-pos.svg
SvgGenImage get cardPos => const SvgGenImage('assets/icons/card-pos.svg');
@@ -64,9 +76,15 @@ class $AssetsIconsGen {
/// File path: assets/icons/clander.svg
SvgGenImage get clander => const SvgGenImage('assets/icons/clander.svg');
+ /// File path: assets/icons/clock.svg
+ SvgGenImage get clock => const SvgGenImage('assets/icons/clock.svg');
+
/// File path: assets/icons/coin.svg
SvgGenImage get coin => const SvgGenImage('assets/icons/coin.svg');
+ /// File path: assets/icons/dislike.svg
+ SvgGenImage get dislike => const SvgGenImage('assets/icons/dislike.svg');
+
/// File path: assets/icons/down.svg
SvgGenImage get down => const SvgGenImage('assets/icons/down.svg');
@@ -74,10 +92,19 @@ class $AssetsIconsGen {
SvgGenImage get elementEqual =>
const SvgGenImage('assets/icons/element-equal.svg');
+ /// File path: assets/icons/favorite.svg
+ SvgGenImage get favorite => const SvgGenImage('assets/icons/favorite.svg');
+
/// File path: assets/icons/fluent-color_location-ripple-16.svg
SvgGenImage get fluentColorLocationRipple16 =>
const SvgGenImage('assets/icons/fluent-color_location-ripple-16.svg');
+ /// File path: assets/icons/game 2.svg
+ SvgGenImage get game2 => const SvgGenImage('assets/icons/game 2.svg');
+
+ /// File path: assets/icons/game.svg
+ SvgGenImage get game => const SvgGenImage('assets/icons/game.svg');
+
/// File path: assets/icons/ic_round-local-offer.svg
SvgGenImage get icRoundLocalOffer =>
const SvgGenImage('assets/icons/ic_round-local-offer.svg');
@@ -85,6 +112,9 @@ class $AssetsIconsGen {
/// File path: assets/icons/infoPic.svg
SvgGenImage get infoPic => const SvgGenImage('assets/icons/infoPic.svg');
+ /// File path: assets/icons/like.svg
+ SvgGenImage get like => const SvgGenImage('assets/icons/like.svg');
+
/// File path: assets/icons/list.svg
SvgGenImage get list => const SvgGenImage('assets/icons/list.svg');
@@ -126,12 +156,32 @@ class $AssetsIconsGen {
SvgGenImage get materialSymbolsLocationWork =>
const SvgGenImage('assets/icons/material-symbols_location-work.svg');
+ /// File path: assets/icons/nearby.svg
+ SvgGenImage get nearby => const SvgGenImage('assets/icons/nearby.svg');
+
+ /// File path: assets/icons/nearby2.svg
+ SvgGenImage get nearby2 => const SvgGenImage('assets/icons/nearby2.svg');
+
/// File path: assets/icons/next.svg
SvgGenImage get next => const SvgGenImage('assets/icons/next.svg');
/// File path: assets/icons/ph_cheese.svg
SvgGenImage get phCheese => const SvgGenImage('assets/icons/ph_cheese.svg');
+ /// File path: assets/icons/profile 2.svg
+ SvgGenImage get profile2 => const SvgGenImage('assets/icons/profile 2.svg');
+
+ /// File path: assets/icons/profile.svg
+ SvgGenImage get profile => const SvgGenImage('assets/icons/profile.svg');
+
+ /// File path: assets/icons/receipt-discount 2.svg
+ SvgGenImage get receiptDiscount2 =>
+ const SvgGenImage('assets/icons/receipt-discount 2.svg');
+
+ /// File path: assets/icons/receipt-discount.svg
+ SvgGenImage get receiptDiscount =>
+ const SvgGenImage('assets/icons/receipt-discount.svg');
+
/// File path: assets/icons/recenter.svg
SvgGenImage get recenter => const SvgGenImage('assets/icons/recenter.svg');
@@ -139,6 +189,9 @@ class $AssetsIconsGen {
SvgGenImage get riSearch2Line =>
const SvgGenImage('assets/icons/ri_search-2-line.svg');
+ /// File path: assets/icons/routing-2.svg
+ SvgGenImage get routing2 => const SvgGenImage('assets/icons/routing-2.svg');
+
/// File path: assets/icons/routing.svg
SvgGenImage get routing => const SvgGenImage('assets/icons/routing.svg');
@@ -162,9 +215,18 @@ class $AssetsIconsGen {
/// File path: assets/icons/sort.svg
SvgGenImage get sort => const SvgGenImage('assets/icons/sort.svg');
+ /// File path: assets/icons/star fill.svg
+ SvgGenImage get starFill => const SvgGenImage('assets/icons/star fill.svg');
+
+ /// File path: assets/icons/star half.svg
+ SvgGenImage get starHalf => const SvgGenImage('assets/icons/star half.svg');
+
/// File path: assets/icons/star.svg
SvgGenImage get star => const SvgGenImage('assets/icons/star.svg');
+ /// File path: assets/icons/tick.svg
+ SvgGenImage get tick => const SvgGenImage('assets/icons/tick.svg');
+
/// File path: assets/icons/timer-pause.svg
SvgGenImage get timerPause =>
const SvgGenImage('assets/icons/timer-pause.svg');
@@ -180,6 +242,7 @@ class $AssetsIconsGen {
List get values => [
line1,
line4,
+ mDSPublicTWButton,
mDSPublicTWTag,
nextButton,
rectangleOff,
@@ -190,15 +253,23 @@ class $AssetsIconsGen {
arrowDown,
arrowLeft,
back,
+ calendarTick2,
+ calendarTick,
cardPos,
category2,
clander,
+ clock,
coin,
+ dislike,
down,
elementEqual,
+ favorite,
fluentColorLocationRipple16,
+ game2,
+ game,
icRoundLocalOffer,
infoPic,
+ like,
list,
location,
mapSelected,
@@ -210,10 +281,17 @@ class $AssetsIconsGen {
materialSymbolsLocationOn,
materialSymbolsLocationOnn,
materialSymbolsLocationWork,
+ nearby,
+ nearby2,
next,
phCheese,
+ profile2,
+ profile,
+ receiptDiscount2,
+ receiptDiscount,
recenter,
riSearch2Line,
+ routing2,
routing,
selectedList,
shoppingCart,
@@ -221,7 +299,10 @@ class $AssetsIconsGen {
slide3,
slides1,
sort,
+ starFill,
+ starHalf,
star,
+ tick,
timerPause,
timerStart,
timer,
@@ -265,6 +346,10 @@ class $AssetsImagesGen {
/// File path: assets/images/userinfo.svg
SvgGenImage get userinfo => const SvgGenImage('assets/images/userinfo.svg');
+ /// File path: assets/images/wp1929534-fast-food-wallpapers 1.png
+ AssetGenImage get wp1929534FastFoodWallpapers1 =>
+ const AssetGenImage('assets/images/wp1929534-fast-food-wallpapers 1.png');
+
/// List of all assets
List get values => [
frame,
@@ -277,6 +362,7 @@ class $AssetsImagesGen {
topDealsAndStores,
usa,
userinfo,
+ wp1929534FastFoodWallpapers1,
];
}
diff --git a/lib/main.dart b/lib/main.dart
index d99099c..a900be3 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -32,6 +32,11 @@ class MyApp extends StatelessWidget {
dialogTheme: DialogTheme(
backgroundColor: Colors.white,
),
+ dropdownMenuTheme: DropdownMenuThemeData(
+ menuStyle: MenuStyle(
+ backgroundColor: MaterialStatePropertyAll(Colors.white),
+ ),
+ ),
inputDecorationTheme: const InputDecorationTheme(
labelStyle: TextStyle(color: Colors.black),
hintStyle: TextStyle(color: Colors.grey),
diff --git a/lib/res/colors.dart b/lib/res/colors.dart
index 6e20551..f9ac123 100644
--- a/lib/res/colors.dart
+++ b/lib/res/colors.dart
@@ -13,4 +13,8 @@ class LightAppColors{
static const confirmPopup = Color.fromARGB(255, 23, 107,173);
static const nearbyPopup = Color.fromARGB(255, 233, 245,254);
static const nearbyPopuphint = Color.fromARGB(255, 112, 112, 110);
+ static const productDetailDivider = Color.fromARGB(255, 112, 112, 110);
+ static const fillOrder = Color.fromARGB(255, 200, 230, 201);
+ static const fillOrderText = Color.fromARGB(255, 32, 74, 34);
+ static const allReviewOpener = Color.fromARGB(255, 183, 28, 28);
}
\ No newline at end of file
diff --git a/lib/screens/auth/cubit/auth_cubit.dart b/lib/screens/auth/cubit/auth_cubit.dart
index 4a87173..9194249 100644
--- a/lib/screens/auth/cubit/auth_cubit.dart
+++ b/lib/screens/auth/cubit/auth_cubit.dart
@@ -1,6 +1,4 @@
import 'package:bloc/bloc.dart';
-import 'package:dio/dio.dart';
-import 'package:meta/meta.dart';
part 'auth_state.dart';
@@ -10,40 +8,20 @@ class AuthCubit extends Cubit {
String _timeStamp = "";
String _timeDue = "";
- final Dio _dio = Dio(BaseOptions(
- connectTimeout: const Duration(seconds: 30),
- receiveTimeout: const Duration(seconds: 30),
- ));
-
String get timeStamp => _timeStamp;
String get timeDue => _timeDue;
Future sendOTP(String phoneNumber) async {
emit(AuthLoading());
- try {
- final response = await _dio.post(
- 'https://api-gateway.liara.run/auth/otp/generate',
- data: {'userId': phoneNumber},
- );
- print(response.toString());
-
- if (response.statusCode == 200 || response.statusCode == 201) {
- if (response.data['success'] == true) {
- _timeStamp = response.data['timestamp'].toString();
- _timeDue = response.data['due'].toString();
- emit(AuthSuccess(phoneNumber: phoneNumber));
- print(response.data.toString());
- } else {
- emit(AuthError('Failed to send OTP'));
- }
- } else {
- emit(AuthError('Server error: \${response.statusCode}'));
- }
- } on DioException catch (e) {
- emit(AuthError('Connection error: \${e.message}'));
- } catch (e) {
- emit(AuthError('Unexpected error occurred'));
- }
+
+ // Simulate API delay
+ await Future.delayed(const Duration(seconds: 1));
+
+ // Mock data for development
+ _timeStamp = DateTime.now().millisecondsSinceEpoch.toString();
+ _timeDue = DateTime.now().add(const Duration(minutes: 2)).millisecondsSinceEpoch.toString();
+
+ emit(AuthSuccess(phoneNumber: phoneNumber));
}
void verifyOTP(String otpCode) {}
diff --git a/lib/screens/auth/onboarding.dart b/lib/screens/auth/onboarding.dart
index b5d4694..062e2f7 100644
--- a/lib/screens/auth/onboarding.dart
+++ b/lib/screens/auth/onboarding.dart
@@ -85,7 +85,7 @@ class _OnboardingScreenState extends State {
),
),
Padding(
- padding: EdgeInsets.fromLTRB(width / 15, 0, width / 15, width/30),
+ padding: EdgeInsets.fromLTRB(width / 15, 0, width / 15, width / 30),
child: Text(
'"Join the app to discover exclusive discounts and special offers in specific areas around you for a smarter shopping experience!"',
style: TextStyle(fontWeight: FontWeight.w500, color: LightAppColors.hint, fontSize: 15),
@@ -98,8 +98,7 @@ class _OnboardingScreenState extends State {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AnimatedSwitcher(
- duration: Duration(milliseconds: 300),
- transitionBuilder: (child, animation) => FadeTransition(opacity: animation, child: child),
+ duration: Duration(milliseconds: 200),
child: SvgPicture.asset(
slides[currentIndex],
key: ValueKey(slides[currentIndex]),
diff --git a/lib/screens/auth/userInfo.dart b/lib/screens/auth/userInfo.dart
index 4c296c9..dbb32d2 100644
--- a/lib/screens/auth/userInfo.dart
+++ b/lib/screens/auth/userInfo.dart
@@ -3,7 +3,8 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:lba/extension/screenSize.dart';
import 'package:lba/gen/assets.gen.dart';
import 'package:lba/res/colors.dart';
-import 'package:lba/screens/nearby/nearby.dart';
+import 'package:lba/screens/mains/navigation/navigation.dart';
+import 'package:lba/screens/mains/nearby/mainNearby/nearby.dart';
import 'package:lba/widgets/button.dart';
import 'package:lba/widgets/datePicker.dart';
@@ -37,18 +38,21 @@ class _UserInfoState extends State {
],
),
Padding(
- padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 24),
+ padding: const EdgeInsets.symmetric(
+ horizontal: 0,
+ vertical: 24,
+ ),
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 0),
child: SvgPicture.asset(
Assets.images.userinfo.path,
- height: height /2.9,
+ height: height / 2.9,
),
),
),
),
- SizedBox(height: height/20),
+ SizedBox(height: height / 20),
const Padding(
padding: EdgeInsets.fromLTRB(25, 0, 25, 20),
child: Text(
@@ -66,13 +70,16 @@ class _UserInfoState extends State {
counterText: '',
hintText: "Enter here...",
hintStyle: TextStyle(
- fontWeight: FontWeight.normal, color: Colors.grey),
+ fontWeight: FontWeight.normal,
+ color: Colors.grey,
+ ),
filled: true,
fillColor: Color.fromARGB(255, 250, 250, 250),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(12)),
- borderSide:
- BorderSide(color: Color.fromARGB(255, 14, 63, 102)),
+ borderSide: BorderSide(
+ color: Color.fromARGB(255, 14, 63, 102),
+ ),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(12)),
@@ -95,66 +102,98 @@ class _UserInfoState extends State {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 25),
child: Wrap(
- spacing: 5,
+ spacing: 3,
+ alignment: WrapAlignment.start,
+ runSpacing: 2,
+ runAlignment: WrapAlignment.start,
children: [
- Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- const Text("Prefer not to say",
+ Directionality(
+ textDirection: TextDirection.rtl,
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Radio(
+ value: "Prefer not to say",
+ groupValue: selectedGender,
+ activeColor: Colors.blue,
+ visualDensity: VisualDensity.compact,
+ materialTapTargetSize:
+ MaterialTapTargetSize.shrinkWrap,
+ onChanged: (value) {
+ setState(() {
+ selectedGender = value!;
+ });
+ },
+ ),
+ const Text(
+ "Prefer not to say",
style: TextStyle(
- color: Color.fromARGB(255, 112, 112, 110))),
- Radio(
- value: "Prefer not to say",
- groupValue: selectedGender,
- activeColor: Colors.blue,
- onChanged: (value) {
- setState(() {
- selectedGender = value!;
- });
- },
- ),
- ],
+ color: Color.fromARGB(255, 112, 112, 110),
+ ),
+ ),
+ ],
+ ),
),
- Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- const Text("Male",
+ SizedBox(width: 5,),
+ Directionality(
+ textDirection: TextDirection.rtl,
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Radio(
+ value: "Male",
+ groupValue: selectedGender,
+ activeColor: Colors.blue,
+ visualDensity: VisualDensity.compact,
+ materialTapTargetSize:
+ MaterialTapTargetSize.shrinkWrap,
+ onChanged: (value) {
+ setState(() {
+ selectedGender = value!;
+ });
+ },
+ ),
+ const Text(
+ "Male",
style: TextStyle(
- color: Color.fromARGB(255, 112, 112, 110))),
- Radio(
- value: "Male",
- groupValue: selectedGender,
- activeColor: Colors.blue,
- onChanged: (value) {
- setState(() {
- selectedGender = value!;
- });
- },
- ),
- ],
+ color: Color.fromARGB(255, 112, 112, 110),
+ ),
+ ),
+ ],
+ ),
),
- Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- const Text("Female",
+ SizedBox(width: 5,),
+ Directionality(
+ textDirection: TextDirection.rtl,
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Radio(
+ value: "Female",
+ groupValue: selectedGender,
+ activeColor: Colors.blue,
+ visualDensity: VisualDensity.compact,
+ materialTapTargetSize:
+ MaterialTapTargetSize.shrinkWrap,
+ onChanged: (value) {
+ setState(() {
+ selectedGender = value!;
+ });
+ },
+ ),
+ const Text(
+ "Female",
style: TextStyle(
- color: Color.fromARGB(255, 112, 112, 110))),
- Radio(
- value: "Female",
- groupValue: selectedGender,
- activeColor: Colors.blue,
- onChanged: (value) {
- setState(() {
- selectedGender = value!;
- });
- },
- ),
- ],
+ color: Color.fromARGB(255, 112, 112, 110),
+ ),
+ ),
+ ],
+ ),
),
],
),
),
- SizedBox(height: height/12),
+ SizedBox(height: height / 8),
// const Padding(
// padding: EdgeInsets.fromLTRB(25, 0, 25, 15),
// child: Text(
@@ -225,16 +264,19 @@ class _UserInfoState extends State {
// const SizedBox(height: 30),
Center(
child: SizedBox(
- width: width*0.9,
+ width: width * 0.9,
child: Button(
text: "Submit",
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
- MaterialPageRoute(builder: (context) => const Nearby()),
+ MaterialPageRoute(
+ builder: (context) => const MainScreen(),
+ ),
(route) => false,
);
- }, color: const Color.fromARGB(255, 30, 137, 221),
+ },
+ color: const Color.fromARGB(255, 30, 137, 221),
),
),
),
@@ -242,7 +284,7 @@ class _UserInfoState extends State {
onTap: () {
Navigator.pushAndRemoveUntil(
context,
- MaterialPageRoute(builder: (context) => const Nearby()),
+ MaterialPageRoute(builder: (context) => const MainScreen()),
(route) => false,
);
},
@@ -253,18 +295,19 @@ class _UserInfoState extends State {
child: Text(
"Skip",
style: TextStyle(
- color: LightAppColors.primary,
- fontWeight: FontWeight.bold,
- fontSize: 16),
+ color: LightAppColors.primary,
+ fontWeight: FontWeight.bold,
+ fontSize: 16,
+ ),
),
),
),
),
- )
+ ),
],
),
),
),
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/screens/mains/discover/discover.dart b/lib/screens/mains/discover/discover.dart
new file mode 100644
index 0000000..8ccf133
--- /dev/null
+++ b/lib/screens/mains/discover/discover.dart
@@ -0,0 +1,10 @@
+import 'package:flutter/material.dart';
+
+class Discover extends StatelessWidget {
+ const Discover({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const Placeholder();
+ }
+}
\ No newline at end of file
diff --git a/lib/screens/mains/hunt/hunt.dart b/lib/screens/mains/hunt/hunt.dart
new file mode 100644
index 0000000..b126df1
--- /dev/null
+++ b/lib/screens/mains/hunt/hunt.dart
@@ -0,0 +1,10 @@
+import 'package:flutter/material.dart';
+
+class Hunt extends StatelessWidget {
+ const Hunt({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const Placeholder();
+ }
+}
\ No newline at end of file
diff --git a/lib/screens/mains/navigation/navigation.dart b/lib/screens/mains/navigation/navigation.dart
new file mode 100644
index 0000000..eb12e0a
--- /dev/null
+++ b/lib/screens/mains/navigation/navigation.dart
@@ -0,0 +1,151 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:lba/gen/assets.gen.dart';
+import 'package:lba/res/colors.dart';
+import 'package:lba/screens/mains/discover/discover.dart';
+import 'package:lba/screens/mains/hunt/hunt.dart';
+import 'package:lba/screens/mains/nearby/mainNearby/nearby.dart';
+import 'package:lba/screens/mains/planner/planner.dart';
+import 'package:lba/screens/mains/profile/profile.dart';
+
+class MainScreen extends StatefulWidget {
+ const MainScreen({super.key});
+
+ @override
+ State createState() => _MainScreenState();
+}
+
+class _MainScreenState extends State {
+ int _currentIndex = 0;
+
+ final List _screens = [
+ Nearby(),
+ Discover(),
+ Hunt(),
+ Planner(),
+ Profile(),
+ ];
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ extendBody: true,
+ body: AnimatedSwitcher(
+ duration: const Duration(milliseconds: 300),
+ child: _screens[_currentIndex],
+ ),
+ bottomNavigationBar: CustomBottomNavigationBar(
+ onTap: (int index) {
+ setState(() {
+ _currentIndex = index;
+ });
+ },
+ currentIndex: _currentIndex,
+ ),
+ );
+ }
+}
+
+class CustomBottomNavigationBar extends StatefulWidget {
+ final Function(int) onTap;
+ final int currentIndex;
+
+ const CustomBottomNavigationBar({
+ super.key,
+ required this.onTap,
+ required this.currentIndex,
+ });
+
+ @override
+ State createState() => _CustomBottomNavigationBarState();
+}
+
+class _CustomBottomNavigationBarState extends State
+ with SingleTickerProviderStateMixin {
+ final List<_NavItem> items = [
+ _NavItem('Nearby', Assets.icons.nearby.path, Assets.icons.nearby2.path),
+ _NavItem('Discover', Assets.icons.receiptDiscount.path, Assets.icons.receiptDiscount2.path),
+ _NavItem('Hunt', Assets.icons.game.path, Assets.icons.game2.path),
+ _NavItem('Planner', Assets.icons.calendarTick.path, Assets.icons.calendarTick2.path),
+ _NavItem('Profile', Assets.icons.profile.path, Assets.icons.profile2.path),
+ ];
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
+ child: Container(
+ height: 70,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(12),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withOpacity(0.15),
+ blurRadius: 20,
+ offset: const Offset(0, 10),
+ ),
+ ],
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: List.generate(items.length, (index) {
+ final item = items[index];
+ final bool isSelected = index == widget.currentIndex;
+ return GestureDetector(
+ onTap: () => widget.onTap(index),
+ child: AnimatedContainer(
+ duration: const Duration(milliseconds: 300),
+ curve: Curves.easeOutQuint,
+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
+ decoration: BoxDecoration(
+ color: isSelected ? const Color(0xFFE3F2FD) : Colors.transparent,
+ borderRadius: BorderRadius.circular(15),
+ ),
+ child: Row(
+ children: [
+ AnimatedSwitcher(
+ duration: const Duration(milliseconds: 300),
+ child: SvgPicture.asset(
+ isSelected ? item.selectedIconPath : item.iconPath,
+ key: ValueKey(isSelected),
+ width: 24,
+ height: 24,
+ ),
+ ),
+ AnimatedSize(
+ duration: const Duration(milliseconds: 300),
+ curve: Curves.easeOut,
+ child: isSelected
+ ? Row(
+ children: [
+ const SizedBox(width: 8),
+ Text(
+ item.label,
+ style: const TextStyle(
+ color: LightAppColors.primary,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ],
+ )
+ : const SizedBox(),
+ ),
+ ],
+ ),
+ ),
+ );
+ }),
+ ),
+ ),
+ );
+ }
+}
+
+class _NavItem {
+ final String label;
+ final String iconPath;
+ final String selectedIconPath;
+
+ _NavItem(this.label, this.iconPath, this.selectedIconPath);
+}
diff --git a/lib/screens/nearby/bestNearby.dart b/lib/screens/mains/nearby/bestNearby.dart
similarity index 90%
rename from lib/screens/nearby/bestNearby.dart
rename to lib/screens/mains/nearby/bestNearby.dart
index fe3681b..2e1a98e 100644
--- a/lib/screens/nearby/bestNearby.dart
+++ b/lib/screens/mains/nearby/bestNearby.dart
@@ -46,21 +46,7 @@ class NearbyItems extends StatelessWidget {
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Row(
- children: [
- Text(
- detailsType==0?"Highest Discount Areas":detailsType==1?"Highest Discount Areas":detailsType==2?"Best Deal, Don't Miss":"",
- style: TextStyle(fontSize: 15),
- ),
- const SizedBox(width: 8),
- const Expanded(
- child: Divider(color: Colors.grey, thickness: 2),
- ),
- ],
- ),
- ),
+ DividerTitle(detailsType: detailsType),
SizedBox(
height: detailsType==0?180:detailsType==1?240:detailsType==2?240:200,
child: ListView.builder(
@@ -184,3 +170,31 @@ class NearbyItems extends StatelessWidget {
);
}
}
+
+class DividerTitle extends StatelessWidget {
+ const DividerTitle({
+ super.key,
+ required this.detailsType,
+ });
+
+ final int detailsType;
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Row(
+ children: [
+ Text(
+ detailsType==0?"Highest Discount Areas":detailsType==1?"Highest Discount Areas":detailsType==2?"Best Deal, Don't Miss":"",
+ style: TextStyle(fontSize: 15),
+ ),
+ const SizedBox(width: 8),
+ const Expanded(
+ child: Divider(color: Colors.grey, thickness: 2),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/screens/mains/nearby/mainNearby/listScreen.dart b/lib/screens/mains/nearby/mainNearby/listScreen.dart
new file mode 100644
index 0000000..dcfee9d
--- /dev/null
+++ b/lib/screens/mains/nearby/mainNearby/listScreen.dart
@@ -0,0 +1,270 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:lba/extension/screenSize.dart';
+import 'package:lba/gen/assets.gen.dart';
+import 'package:lba/widgets/orderType.dart';
+import 'package:lba/widgets/remainingTime.dart';
+
+class ListScreen extends StatefulWidget {
+ final bool delivery;
+ final bool pickup;
+ int initialTimerStatus;
+ final String expiryTimeString;
+ final VoidCallback? ontap;
+
+ ListScreen({
+ super.key,
+ required this.delivery,
+ required this.pickup,
+ this.initialTimerStatus=3,
+ required this.expiryTimeString,
+ this.ontap,
+ });
+
+ @override
+ State createState() => _ListScreenState();
+}
+
+class _ListScreenState extends State {
+ late RemainingTime _timer;
+ late ValueNotifier _timerStatus;
+
+ @override
+ void initState() {
+ super.initState();
+ _timer = RemainingTime();
+ _timerStatus = ValueNotifier(widget.initialTimerStatus);
+ _timer.initializeFromExpiry(expiryTimeString: widget.expiryTimeString);
+
+ _timer.remainingSeconds.addListener(() {
+ if (_timer.remainingSeconds.value <= 0) {
+ _timerStatus.value = 3;
+ } else if (_timer.remainingSeconds.value < 18000) {
+ _timerStatus.value = 1;
+ } else if (_timer.remainingSeconds.value > 18000) {
+ _timerStatus.value = 2;
+ }
+ });
+ }
+
+ @override
+ void dispose() {
+ _timer.dispose();
+ _timerStatus.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final width = context.screenWidth;
+ final height = context.screenHeight;
+ return
+ GestureDetector(
+ onTap: widget.ontap,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 16),
+ child: Stack(
+ children: [
+ Container(
+ margin: const EdgeInsets.only(top: 60),
+ padding: const EdgeInsets.only(top: 80),
+ decoration: BoxDecoration(
+ color: const Color.fromARGB(255, 242, 242, 241),
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Padding(
+ padding: EdgeInsets.fromLTRB(12, 0, width/50, 15),
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ children: [
+ Row(
+ children: [
+ SvgPicture.asset(Assets.icons.phCheese.path),
+ const SizedBox(width: 5),
+ const Text(
+ "Amul Cheese Slices",
+ style: TextStyle(fontWeight: FontWeight.bold),
+ ),
+ ],
+ ),
+ const SizedBox(height: 10),
+ Row(
+ children: [
+ SvgPicture.asset(
+ Assets.icons.location.path,
+ color: const Color.fromARGB(255, 157, 157, 155),
+ width: 14,
+ ),
+ const SizedBox(width: 5),
+ const Text("Sharjah (750m away)",style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w500
+ ),),
+ ],
+ ),
+ const SizedBox(height: 10),
+ Row(
+ children: [
+ SvgPicture.asset(
+ Assets.icons.coin.path,
+ width: 14,
+ ),
+ const SizedBox(width: 5),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: const [
+ Text(
+ "18.15 AED",
+ style: TextStyle(
+ color: Color.fromARGB(255, 157, 157, 155),
+ fontSize: 10,
+ decoration: TextDecoration.lineThrough,
+ ),
+ ),
+ SizedBox(height: 0),
+ Row(
+ children: [
+ Text("15.84 AED",style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w500
+ ),),
+ SizedBox(width: 4),
+ Text(
+ "(13% off)",
+ style: TextStyle(
+ color: Color.fromARGB(255, 76, 175, 80),
+ fontSize: 10,
+ fontWeight: FontWeight.w500
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ Padding(
+ padding: EdgeInsets.fromLTRB(0, 35, widget.delivery == false || widget.pickup == false ? width/5 : width/60, 0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.end,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ SvgPicture.asset(
+ Assets.icons.star.path,
+ width: 14,
+ ),
+ const SizedBox(width: 2),
+ const Text(
+ "4.8",
+ style: TextStyle(
+ color: Color.fromARGB(255, 112, 112, 110),
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 10),
+ Row(
+ children: [
+ if (widget.delivery)
+ OrderType(
+ icon: Assets.icons.cardPos.path,
+ typename: "Delivery",
+ fill: false,
+ ),
+ if (widget.delivery) const SizedBox(width: 5),
+ if (widget.pickup)
+ OrderType(
+ icon: Assets.icons.shoppingCart.path,
+ typename: "Pickup",
+ fill: false,
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ClipRRect(
+ borderRadius: const BorderRadius.only(
+ topRight: Radius.circular(10),
+ topLeft: Radius.circular(10),
+ ),
+ child: Image.asset(
+ Assets.images.media.path,
+ width: double.infinity,
+ height: 130,
+ fit: BoxFit.cover,
+ ),
+ ),
+ Positioned(
+ top: 10,
+ left: 10,
+ child: ValueListenableBuilder(
+ valueListenable: _timerStatus,
+ builder: (context, timerStatus, child) {
+ return Container(
+ padding: const EdgeInsets.symmetric(horizontal: 6),
+ height: 20,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(6),
+ color: timerStatus == 1
+ ? const Color.fromARGB(255, 255, 193, 7)
+ : timerStatus == 2
+ ? const Color.fromARGB(255, 76, 175, 80)
+ : timerStatus == 3
+ ? const Color.fromARGB(255, 244, 67, 54)
+ : const Color.fromARGB(255, 244, 67, 54),
+ ),
+ child: Row(
+ children: [
+ SvgPicture.asset(
+ timerStatus == 1
+ ? Assets.icons.timer.path
+ : timerStatus == 2
+ ? Assets.icons.timerStart.path
+ : Assets.icons.timerPause.path,
+ width: 12,
+ height: 12,
+ ),
+ const SizedBox(width: 5),
+ ValueListenableBuilder(
+ valueListenable: _timer.remainingSeconds,
+ builder: (context, seconds, child) {
+ return Text(
+ timerStatus==3? "Unavailable":"${_timer.formatTime()} left",
+ style: const TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ fontWeight: FontWeight.w400,
+ ),
+ );
+ },
+ ),
+ ],
+ ),
+ );
+ },
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/screens/nearby/map.dart b/lib/screens/mains/nearby/mainNearby/map.dart
similarity index 63%
rename from lib/screens/nearby/map.dart
rename to lib/screens/mains/nearby/mainNearby/map.dart
index 2ab4685..20b48c9 100644
--- a/lib/screens/nearby/map.dart
+++ b/lib/screens/mains/nearby/mainNearby/map.dart
@@ -3,7 +3,8 @@ import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart';
import 'package:lba/gen/assets.gen.dart';
import 'package:lba/res/colors.dart';
-import 'package:lba/screens/nearby/bestNearby.dart';
+import 'package:lba/screens/mains/nearby/bestNearby.dart';
+import 'package:lba/screens/product/productdetail.dart';
import 'package:location/location.dart';
import 'package:flutter_svg/flutter_svg.dart';
@@ -87,7 +88,6 @@ class _CustomMapState extends State
_initializeMarkers();
_checkLocationServices();
- // Initialize AnimationController
_animationController = AnimationController(
duration: const Duration(milliseconds: 500),
vsync: this,
@@ -206,7 +206,6 @@ class _CustomMapState extends State
right: 0,
child: Column(
children: [
- // Recenter Button
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
@@ -248,162 +247,98 @@ class _CustomMapState extends State
],
),
),
- // Marker Details
if (_selectedMarkerIndex == null)
Container(
- height: 190,
+ height: 245,
width: double.infinity,
- padding: const EdgeInsets.only(bottom: 25,left: 8),
+ padding: const EdgeInsets.only(bottom: 90,left: 0),
child: Center(
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: _manualMarkers.length,
itemBuilder: (context, index) {
final marker = _manualMarkers[index];
- return Container(
- margin: const EdgeInsets.symmetric(horizontal: 5),
- padding: const EdgeInsets.all(8.0),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: LightAppColors.nearbyPopup,
- border: Border.all(color: Colors.white, width: 2.0),
- ),
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Center(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- children: [
- Container(
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(11),
- ),
- child: Image.asset(Assets.images.image.path),
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- marker.name,
- style: TextStyle(color: Colors.black),
- ),
- SizedBox(height: 5),
- Text(
- "${marker.place} ${marker.distance}",
- style: TextStyle(
- color: LightAppColors.nearbyPopuphint,
- ),
- ),
- SizedBox(height: 5),
- Text(
- marker.description,
- style: TextStyle(
- color: LightAppColors.nearbyPopuphint,
- fontSize: 10,
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- SizedBox(height: 10),
- Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: MainAxisAlignment.start,
- children: [
- SvgPicture.asset(
- Assets.icons.mDSPublicTWTag.path,
- ),
- SizedBox(width: 10),
- Text(
- "(15%) 43 - 36.55 AED ",
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- ],
- ),
- ],
- ),
- ),
- ),
+ return GestureDetector(
+ onTap: () {
+ Navigator.of(context).push(MaterialPageRoute(builder: (context) => Productdetail(),));
+ },
+ child: CustomCard(marker: marker),
);
},
),
),
)
else
- Container(
- margin: const EdgeInsets.symmetric(horizontal: 5),
- padding: const EdgeInsets.all(8.0).copyWith(bottom: 15),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(12),
- color: LightAppColors.nearbyPopup,
- border: Border.all(color: Colors.white, width: 2.0),
- ),
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Center(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- children: [
- Container(
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(11),
+ Padding(
+ padding: const EdgeInsets.only(bottom: 90,right: 8,left: 8,),
+ child: Container(
+ margin: const EdgeInsets.symmetric(horizontal: 5),
+ padding: const EdgeInsets.all(8.0).copyWith(bottom: 15),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(12),
+ color: LightAppColors.nearbyPopup,
+ border: Border.all(color: Colors.white, width: 4.0),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Center(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(11),
+ ),
+ child: Image.asset(Assets.images.image.path),
),
- child: Image.asset(Assets.images.image.path),
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- _manualMarkers[_selectedMarkerIndex!].name,
- style: TextStyle(color: Colors.black),
- ),
- SizedBox(height: 5),
- Text(
- "${_manualMarkers[_selectedMarkerIndex!].place} ${_manualMarkers[_selectedMarkerIndex!].distance}",
- style: TextStyle(
- color: LightAppColors.nearbyPopuphint,
+ Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ _manualMarkers[_selectedMarkerIndex!].name,
+ style: TextStyle(color: Colors.black),
),
- ),
- SizedBox(height: 5),
- Text(
- _manualMarkers[_selectedMarkerIndex!]
- .description,
- style: TextStyle(
- color: LightAppColors.nearbyPopuphint,
- fontSize: 10,
+ SizedBox(height: 5),
+ Text(
+ "${_manualMarkers[_selectedMarkerIndex!].place} ${_manualMarkers[_selectedMarkerIndex!].distance}",
+ style: TextStyle(
+ color: LightAppColors.nearbyPopuphint,
+ ),
),
- ),
- ],
+ SizedBox(height: 5),
+ Text(
+ _manualMarkers[_selectedMarkerIndex!]
+ .description,
+ style: TextStyle(
+ color: LightAppColors.nearbyPopuphint,
+ fontSize: 10,
+ ),
+ ),
+ ],
+ ),
),
- ),
- ],
- ),
- SizedBox(height: 10),
- Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: MainAxisAlignment.start,
- children: [
- SvgPicture.asset(Assets.icons.mDSPublicTWTag.path),
- SizedBox(width: 10),
- Text(
- "(15%) 43 - 36.55 AED ",
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- ],
- ),
- ],
+ ],
+ ),
+ SizedBox(height: 10),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ SvgPicture.asset(Assets.icons.mDSPublicTWTag.path),
+ SizedBox(width: 10),
+ Text(
+ "(15%) 43 - 36.55 AED ",
+ style: TextStyle(fontWeight: FontWeight.bold),
+ ),
+ ],
+ ),
+ ],
+ ),
),
),
),
@@ -455,7 +390,94 @@ class _CustomMapState extends State
}
}
-// Helper class for animating LatLng
+class CustomCard extends StatelessWidget {
+ const CustomCard({
+ super.key,
+ required this.marker,
+ });
+
+ final MarkerData marker;
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.only(left: 8),
+ child: Container(
+ margin: const EdgeInsets.symmetric(horizontal: 5),
+ padding: const EdgeInsets.all(8.0),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(12),
+ color: LightAppColors.nearbyPopup,
+ border: Border.all(color: Colors.white, width: 4.0),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Center(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(11),
+ ),
+ child: Image.asset(Assets.images.image.path),
+ ),
+ Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ marker.name,
+ style: TextStyle(color: Colors.black),
+ ),
+ SizedBox(height: 5),
+ Text(
+ "${marker.place} ${marker.distance}",
+ style: TextStyle(
+ color: LightAppColors.nearbyPopuphint,
+ ),
+ ),
+ SizedBox(height: 5),
+ Text(
+ marker.description,
+ style: TextStyle(
+ color: LightAppColors.nearbyPopuphint,
+ fontSize: 10,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ SizedBox(height: 10),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ SvgPicture.asset(
+ Assets.icons.mDSPublicTWTag.path,
+ ),
+ SizedBox(width: 10),
+ Text(
+ "(15%) 43 - 36.55 AED ",
+ style: TextStyle(fontWeight: FontWeight.bold),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
+
class LatLngTween extends Tween {
LatLngTween({required LatLng begin, required LatLng end})
: super(begin: begin, end: end);
diff --git a/lib/screens/nearby/nearby.dart b/lib/screens/mains/nearby/mainNearby/nearby.dart
similarity index 65%
rename from lib/screens/nearby/nearby.dart
rename to lib/screens/mains/nearby/mainNearby/nearby.dart
index a4f2f0e..d564ef6 100644
--- a/lib/screens/nearby/nearby.dart
+++ b/lib/screens/mains/nearby/mainNearby/nearby.dart
@@ -1,8 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:lba/gen/assets.gen.dart';
-import 'package:lba/screens/nearby/listScreen.dart';
-import 'package:lba/screens/nearby/map.dart';
+import 'package:lba/screens/mains/nearby/mainNearby/listScreen.dart';
+import 'package:lba/screens/mains/nearby/mainNearby/map.dart';
+import 'package:lba/screens/product/productdetail.dart';
import 'package:lba/widgets/customBottomSheet.dart';
import 'package:lba/widgets/gpsPopup.dart';
@@ -36,7 +37,6 @@ class _NearbyState extends State {
@override
Widget build(BuildContext context) {
-
return Scaffold(
appBar: AppBar(
toolbarHeight: 70,
@@ -114,8 +114,7 @@ class _NearbyState extends State {
),
backgroundColor: Colors.white,
),
- body:
- Column(
+ body: Column(
children: [
_buildToggleButtons(),
Container(
@@ -124,9 +123,7 @@ class _NearbyState extends State {
color: const Color.fromARGB(255, 14, 63, 102),
),
Expanded(
- child: selectedIndex == 1
- ? _buildListContent()
- : CustomMap(),
+ child: selectedIndex == 1 ? _buildListContent() : CustomMap(),
),
// ElevatedButton(
// onPressed: () => showGPSDialog(context),
@@ -180,33 +177,39 @@ class _NearbyState extends State {
Positioned(
left: 0,
child: _buildToggleButton(
- color: selectedIndex == 1
- ? const Color.fromARGB(255, 10, 69, 117)
- : const Color.fromARGB(100, 177, 177, 177),
+ color:
+ selectedIndex == 1
+ ? const Color.fromARGB(255, 10, 69, 117)
+ : const Color.fromARGB(100, 177, 177, 177),
icon: Assets.icons.elementEqual.path,
- iconColor: selectedIndex == 1
- ? const Color.fromARGB(255, 234, 245, 254)
- : const Color.fromARGB(255, 157, 157, 155),
+ iconColor:
+ selectedIndex == 1
+ ? const Color.fromARGB(255, 234, 245, 254)
+ : const Color.fromARGB(255, 157, 157, 155),
text: 'list',
isSelected: selectedIndex == 1,
onTap: () => setState(() => selectedIndex = 1),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(12),
bottomLeft: Radius.circular(12),
- topRight: selectedIndex==1? Radius.circular(12):Radius.zero,
- bottomRight: selectedIndex==1? Radius.circular(12):Radius.zero,
+ topRight:
+ selectedIndex == 1 ? Radius.circular(12) : Radius.zero,
+ bottomRight:
+ selectedIndex == 1 ? Radius.circular(12) : Radius.zero,
),
),
),
Positioned(
right: 0,
child: _buildToggleButton(
- color: selectedIndex == 0
- ? const Color.fromARGB(255, 10, 69, 117)
- : const Color.fromARGB(100, 177, 177, 177),
- iconColor: selectedIndex == 0
- ? const Color.fromARGB(255, 234, 245, 254)
- : const Color.fromARGB(255, 157, 157, 155),
+ color:
+ selectedIndex == 0
+ ? const Color.fromARGB(255, 10, 69, 117)
+ : const Color.fromARGB(100, 177, 177, 177),
+ iconColor:
+ selectedIndex == 0
+ ? const Color.fromARGB(255, 234, 245, 254)
+ : const Color.fromARGB(255, 157, 157, 155),
icon: Assets.icons.mapSelected.path,
text: 'map',
isSelected: selectedIndex == 0,
@@ -214,8 +217,10 @@ class _NearbyState extends State {
borderRadius: BorderRadius.only(
topRight: Radius.circular(12),
bottomRight: Radius.circular(12),
- bottomLeft: selectedIndex==0? Radius.circular(12):Radius.zero,
- topLeft: selectedIndex==0? Radius.circular(12):Radius.zero,
+ bottomLeft:
+ selectedIndex == 0 ? Radius.circular(12) : Radius.zero,
+ topLeft:
+ selectedIndex == 0 ? Radius.circular(12) : Radius.zero,
),
),
),
@@ -245,6 +250,8 @@ class _NearbyState extends State {
child: SvgPicture.asset(Assets.icons.arrowDown.path),
),
elevation: 16,
+ dropdownColor:
+ Colors.white,
style: const TextStyle(
color: Color.fromARGB(255, 33, 150, 243),
fontWeight: FontWeight.w500,
@@ -255,12 +262,13 @@ class _NearbyState extends State {
selectedOption = newValue!;
});
},
- items: options.map>((String value) {
- return DropdownMenuItem(
- value: value,
- child: Text(value),
- );
- }).toList(),
+ items:
+ options.map>((String value) {
+ return DropdownMenuItem(
+ value: value,
+ child: Text(value),
+ );
+ }).toList(),
),
],
),
@@ -268,7 +276,12 @@ class _NearbyState extends State {
ListScreen(
delivery: true,
pickup: false,
- expiryTimeString: "2025-05-17T13:20:49.623619357Z",
+ expiryTimeString: "2025-05-19T13:30:49.623619357Z",
+ ontap: () {
+ Navigator.of(context).push(
+ MaterialPageRoute(builder: (context) => Productdetail()),
+ );
+ },
),
ListScreen(
delivery: false,
@@ -280,6 +293,7 @@ class _NearbyState extends State {
pickup: true,
expiryTimeString: "2025-05-12T13:20:37.435249520Z",
),
+ const SizedBox(height: 90),
],
),
),
@@ -287,76 +301,77 @@ class _NearbyState extends State {
}
Widget _buildToggleButton({
- required String text,
- required bool isSelected,
- required VoidCallback onTap,
- required BorderRadius borderRadius,
- required Color color,
- required String icon,
- required Color iconColor,
-}) {
- return GestureDetector(
- onTap: onTap,
- child: Stack(
- children: [
- Container(
- width: 170,
- height: 50,
- decoration: BoxDecoration(
- borderRadius: borderRadius,
- color: isSelected
- ? const Color.fromARGB(255, 14, 63, 102)
- : const Color.fromARGB(255, 234, 234, 233),
- boxShadow: isSelected
- ? [
- BoxShadow(
- color: Colors.black.withOpacity(0.2),
- spreadRadius: 1,
- blurRadius: 4,
- offset: const Offset(0, 2),
+ required String text,
+ required bool isSelected,
+ required VoidCallback onTap,
+ required BorderRadius borderRadius,
+ required Color color,
+ required String icon,
+ required Color iconColor,
+ }) {
+ return GestureDetector(
+ onTap: onTap,
+ child: Stack(
+ children: [
+ Container(
+ width: 170,
+ height: 50,
+ decoration: BoxDecoration(
+ borderRadius: borderRadius,
+ color:
+ isSelected
+ ? const Color.fromARGB(255, 14, 63, 102)
+ : const Color.fromARGB(255, 234, 234, 233),
+ boxShadow:
+ isSelected
+ ? [
+ BoxShadow(
+ color: Colors.black.withOpacity(0.2),
+ spreadRadius: 1,
+ blurRadius: 4,
+ offset: const Offset(0, 2),
+ ),
+ ]
+ : null,
+ ),
+ alignment: Alignment.center,
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ width: 30,
+ height: 30,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(10),
+ color: color,
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(1.0),
+ child: Center(
+ child: SvgPicture.asset(icon, color: iconColor),
),
- ]
- : null,
- ),
- alignment: Alignment.center,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Container(
- width: 30,
- height: 30,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(10),
- color: color,
+ ),
),
- child: Padding(
- padding: const EdgeInsets.all(1.0),
- child: Center(child: SvgPicture.asset(icon, color: iconColor)),
+ const SizedBox(width: 10),
+ Text(
+ text,
+ style: TextStyle(
+ color: isSelected ? Colors.white : Colors.black87,
+ fontWeight: FontWeight.bold,
+ ),
),
- ),
- const SizedBox(width: 10),
- Text(
- text,
- style: TextStyle(
- color: isSelected ? Colors.white : Colors.black87,
- fontWeight: FontWeight.bold,
- ),
- ),
- ],
- ),
- ),
- if (isSelected)
- Positioned(
- bottom: 0,
- left: 0,
- right: 0,
- child: SvgPicture.asset(
- Assets.icons.shape.path,
- height: 4,
+ ],
),
),
- ],
- ),
- );
+ if (isSelected)
+ Positioned(
+ bottom: 0,
+ left: 0,
+ right: 0,
+ child: SvgPicture.asset(Assets.icons.shape.path, height: 4),
+ ),
+ ],
+ ),
+ );
+ }
}
-}
\ No newline at end of file
diff --git a/lib/screens/mains/planner/planner.dart b/lib/screens/mains/planner/planner.dart
new file mode 100644
index 0000000..c4de6ed
--- /dev/null
+++ b/lib/screens/mains/planner/planner.dart
@@ -0,0 +1,10 @@
+import 'package:flutter/material.dart';
+
+class Planner extends StatelessWidget {
+ const Planner({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const Placeholder();
+ }
+}
\ No newline at end of file
diff --git a/lib/screens/mains/profile/profile.dart b/lib/screens/mains/profile/profile.dart
new file mode 100644
index 0000000..21872e4
--- /dev/null
+++ b/lib/screens/mains/profile/profile.dart
@@ -0,0 +1,10 @@
+import 'package:flutter/material.dart';
+
+class Profile extends StatelessWidget {
+ const Profile({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return const Placeholder();
+ }
+}
\ No newline at end of file
diff --git a/lib/screens/nearby/listScreen.dart b/lib/screens/nearby/listScreen.dart
deleted file mode 100644
index f107ab3..0000000
--- a/lib/screens/nearby/listScreen.dart
+++ /dev/null
@@ -1,263 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_svg/flutter_svg.dart';
-import 'package:lba/extension/screenSize.dart';
-import 'package:lba/gen/assets.gen.dart';
-import 'package:lba/widgets/orderType.dart';
-import 'package:lba/widgets/remainingTime.dart';
-
-class ListScreen extends StatefulWidget {
- final bool delivery;
- final bool pickup;
- int initialTimerStatus;
- final String expiryTimeString;
-
- ListScreen({
- super.key,
- required this.delivery,
- required this.pickup,
- this.initialTimerStatus=3,
- required this.expiryTimeString,
- });
-
- @override
- State createState() => _ListScreenState();
-}
-
-class _ListScreenState extends State {
- late RemainingTime _timer;
- late ValueNotifier _timerStatus;
-
- @override
- void initState() {
- super.initState();
- _timer = RemainingTime();
- _timerStatus = ValueNotifier(widget.initialTimerStatus);
- _timer.initializeFromExpiry(expiryTimeString: widget.expiryTimeString);
-
- _timer.remainingSeconds.addListener(() {
- if (_timer.remainingSeconds.value <= 0) {
- _timerStatus.value = 3;
- } else if (_timer.remainingSeconds.value < 18000) {
- _timerStatus.value = 1;
- } else if (_timer.remainingSeconds.value > 18000) {
- _timerStatus.value = 2;
- }
- });
- }
-
- @override
- void dispose() {
- _timer.dispose();
- _timerStatus.dispose();
- super.dispose();
- }
-
- @override
- Widget build(BuildContext context) {
- final width = context.screenWidth;
- final height = context.screenHeight;
- return
- Padding(
- padding: const EdgeInsets.only(bottom: 16),
- child: Stack(
- children: [
- Container(
- margin: const EdgeInsets.only(top: 60),
- padding: const EdgeInsets.only(top: 80),
- decoration: BoxDecoration(
- color: const Color.fromARGB(255, 242, 242, 241),
- borderRadius: BorderRadius.circular(10),
- ),
- child: Padding(
- padding: EdgeInsets.fromLTRB(12, 0, width/50, 15),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: MainAxisAlignment.start,
- children: [
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- Row(
- children: [
- SvgPicture.asset(Assets.icons.phCheese.path),
- const SizedBox(width: 5),
- const Text(
- "Amul Cheese Slices",
- style: TextStyle(fontWeight: FontWeight.bold),
- ),
- ],
- ),
- const SizedBox(height: 10),
- Row(
- children: [
- SvgPicture.asset(
- Assets.icons.location.path,
- color: const Color.fromARGB(255, 157, 157, 155),
- width: 14,
- ),
- const SizedBox(width: 5),
- const Text("Sharjah (750m away)",style: TextStyle(
- fontSize: 12,
- fontWeight: FontWeight.w500
- ),),
- ],
- ),
- const SizedBox(height: 10),
- Row(
- children: [
- SvgPicture.asset(
- Assets.icons.coin.path,
- width: 14,
- ),
- const SizedBox(width: 5),
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: const [
- Text(
- "18.15 AED",
- style: TextStyle(
- color: Color.fromARGB(255, 157, 157, 155),
- fontSize: 10,
- decoration: TextDecoration.lineThrough,
- ),
- ),
- SizedBox(height: 0),
- Row(
- children: [
- Text("15.84 AED",style: TextStyle(
- fontSize: 12,
- fontWeight: FontWeight.w500
- ),),
- SizedBox(width: 4),
- Text(
- "(13% off)",
- style: TextStyle(
- color: Color.fromARGB(255, 76, 175, 80),
- fontSize: 10,
- fontWeight: FontWeight.w500
- ),
- ),
- ],
- ),
- ],
- ),
- ],
- ),
- ],
- ),
- ),
- Padding(
- padding: EdgeInsets.fromLTRB(0, 35, widget.delivery == false || widget.pickup == false ? width/5 : width/60, 0),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.end,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- SvgPicture.asset(
- Assets.icons.star.path,
- width: 14,
- ),
- const SizedBox(width: 2),
- const Text(
- "4.8",
- style: TextStyle(
- color: Color.fromARGB(255, 112, 112, 110),
- ),
- ),
- ],
- ),
- const SizedBox(height: 10),
- Row(
- children: [
- if (widget.delivery)
- OrderType(
- icon: Assets.icons.cardPos.path,
- typename: "Delivery",
- ),
- if (widget.delivery) const SizedBox(width: 5),
- if (widget.pickup)
- OrderType(
- icon: Assets.icons.shoppingCart.path,
- typename: "Pickup",
- ),
- ],
- ),
- ],
- ),
- ),
- ],
- ),
- ),
- ),
- ClipRRect(
- borderRadius: const BorderRadius.only(
- topRight: Radius.circular(10),
- topLeft: Radius.circular(10),
- ),
- child: Image.asset(
- Assets.images.media.path,
- width: double.infinity,
- height: 130,
- fit: BoxFit.cover,
- ),
- ),
- Positioned(
- top: 10,
- left: 10,
- child: ValueListenableBuilder(
- valueListenable: _timerStatus,
- builder: (context, timerStatus, child) {
- return Container(
- padding: const EdgeInsets.symmetric(horizontal: 6),
- height: 20,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(6),
- color: timerStatus == 1
- ? const Color.fromARGB(255, 255, 193, 7)
- : timerStatus == 2
- ? const Color.fromARGB(255, 76, 175, 80)
- : timerStatus == 3
- ? const Color.fromARGB(255, 244, 67, 54)
- : const Color.fromARGB(255, 244, 67, 54),
- ),
- child: Row(
- children: [
- SvgPicture.asset(
- timerStatus == 1
- ? Assets.icons.timer.path
- : timerStatus == 2
- ? Assets.icons.timerStart.path
- : Assets.icons.timerPause.path,
- width: 12,
- height: 12,
- ),
- const SizedBox(width: 5),
- ValueListenableBuilder(
- valueListenable: _timer.remainingSeconds,
- builder: (context, seconds, child) {
- return Text(
- timerStatus==3? "Unavailable":"${_timer.formatTime()} left",
- style: const TextStyle(
- color: Colors.white,
- fontSize: 12,
- fontWeight: FontWeight.w400,
- ),
- );
- },
- ),
- ],
- ),
- );
- },
- ),
- ),
- ],
- ),
- );
- }
-}
\ No newline at end of file
diff --git a/lib/screens/product/item.dart b/lib/screens/product/item.dart
new file mode 100644
index 0000000..f8c8e32
--- /dev/null
+++ b/lib/screens/product/item.dart
@@ -0,0 +1,221 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:lba/gen/assets.gen.dart';
+import 'package:lba/res/colors.dart';
+import 'package:lba/widgets/buildWarpedInfo.dart';
+import 'package:lba/widgets/orderType.dart';
+import 'package:lba/widgets/rate.dart';
+import 'package:lba/widgets/reviews.dart';
+
+class Item extends StatefulWidget {
+ String title;
+ String brand;
+ String dimensions;
+ String colour;
+ String material;
+ String description;
+
+ Item({
+ super.key,
+ required this.title,
+ required this.brand,
+ required this.dimensions,
+ required this.colour,
+ required this.material,
+ required this.description,
+ });
+
+ @override
+ State- createState() => _ItemState();
+}
+
+class _ItemState extends State
- with TickerProviderStateMixin {
+ bool showAllReviews = false;
+ final GlobalKey _listKey = GlobalKey();
+
+ final List