BASE: Update Icons & Name Of The App.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/rental_review_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
@@ -28,11 +28,19 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
backgroundColor: AppThemeData.primary300,
|
||||
leading: GestureDetector(
|
||||
onTap: () => Get.back(),
|
||||
child: Icon(Icons.arrow_back_ios, color: isDark ? Colors.white : Colors.black),
|
||||
child: Icon(
|
||||
Icons.arrow_back_ios,
|
||||
color: isDark ? Colors.white : Colors.black,
|
||||
),
|
||||
),
|
||||
title: Text(
|
||||
controller.ratingModel.value != null ? "Update Review".tr() : "Add Review".tr(),
|
||||
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 16),
|
||||
controller.ratingModel.value != null
|
||||
? "Update Review".tr()
|
||||
: "Add Review".tr(),
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white : Colors.black,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
body: Obx(
|
||||
@@ -44,11 +52,21 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20, right: 20, top: 50, bottom: 20),
|
||||
padding: const EdgeInsets.only(
|
||||
left: 20,
|
||||
right: 20,
|
||||
top: 50,
|
||||
bottom: 20,
|
||||
),
|
||||
child: Card(
|
||||
elevation: 2,
|
||||
color: isDark ? AppThemeData.greyDark50 : AppThemeData.grey50,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark50
|
||||
: AppThemeData.grey50,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 65),
|
||||
@@ -56,11 +74,18 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
children: [
|
||||
// Driver Name
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
padding: const EdgeInsets.only(
|
||||
top: 8.0,
|
||||
),
|
||||
child: Text(
|
||||
controller.order.value!.driver?.fullName() ?? "",
|
||||
controller.order.value!.driver
|
||||
?.fullName() ??
|
||||
"",
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white : Colors.black87,
|
||||
color:
|
||||
isDark
|
||||
? Colors.white
|
||||
: Colors.black87,
|
||||
fontFamily: AppThemeData.medium,
|
||||
fontSize: 18,
|
||||
),
|
||||
@@ -68,12 +93,21 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
),
|
||||
// Car info
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
controller.driverUser.value?.carNumber?.toUpperCase() ?? '',
|
||||
controller
|
||||
.driverUser
|
||||
.value
|
||||
?.carNumber
|
||||
?.toUpperCase() ??
|
||||
'',
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white : Colors.black87,
|
||||
color:
|
||||
isDark
|
||||
? Colors.white
|
||||
: Colors.black87,
|
||||
fontFamily: AppThemeData.medium,
|
||||
),
|
||||
),
|
||||
@@ -81,14 +115,22 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
Text(
|
||||
"${controller.driverUser.value?.carName} ${controller.driverUser.value?.carMakes}",
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white : Colors.black38,
|
||||
color:
|
||||
isDark
|
||||
? Colors.white
|
||||
: Colors.black38,
|
||||
fontFamily: AppThemeData.medium,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
const Padding(padding: EdgeInsets.symmetric(vertical: 12), child: Divider(color: Colors.grey)),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 12,
|
||||
),
|
||||
child: Divider(color: Colors.grey),
|
||||
),
|
||||
|
||||
// Title
|
||||
Padding(
|
||||
@@ -97,7 +139,10 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
'How is your trip?'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: isDark ? Colors.white : Colors.black,
|
||||
color:
|
||||
isDark
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 2,
|
||||
),
|
||||
@@ -106,10 +151,16 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
'Your feedback will help us improve \n driving experience better'.tr(),
|
||||
'Your feedback will help us improve \n driving experience better'
|
||||
.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white : Colors.black.withOpacity(0.60),
|
||||
color:
|
||||
isDark
|
||||
? Colors.white
|
||||
: Colors.black.withOpacity(
|
||||
0.60,
|
||||
),
|
||||
letterSpacing: 0.8,
|
||||
),
|
||||
),
|
||||
@@ -122,7 +173,12 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
'Rate for'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? Colors.white : Colors.black.withOpacity(0.60),
|
||||
color:
|
||||
isDark
|
||||
? Colors.white
|
||||
: Colors.black.withOpacity(
|
||||
0.60,
|
||||
),
|
||||
letterSpacing: 0.8,
|
||||
),
|
||||
),
|
||||
@@ -130,10 +186,15 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
controller.order.value!.driver?.fullName() ?? "",
|
||||
controller.order.value!.driver
|
||||
?.fullName() ??
|
||||
"",
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: isDark ? Colors.white : Colors.black,
|
||||
color:
|
||||
isDark
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 2,
|
||||
),
|
||||
@@ -142,14 +203,25 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 10),
|
||||
child: RatingBar.builder(
|
||||
initialRating: controller.ratings.value,
|
||||
initialRating:
|
||||
controller.ratings.value,
|
||||
minRating: 1,
|
||||
direction: Axis.horizontal,
|
||||
allowHalfRating: true,
|
||||
itemCount: 5,
|
||||
itemBuilder: (context, _) => const Icon(Icons.star, color: Colors.amber),
|
||||
unratedColor: isDark ? AppThemeData.greyDark400 : AppThemeData.grey400,
|
||||
onRatingUpdate: (rating) => controller.ratings.value = rating,
|
||||
itemBuilder:
|
||||
(context, _) => const Icon(
|
||||
Icons.star,
|
||||
color: Colors.amber,
|
||||
),
|
||||
unratedColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey400,
|
||||
onRatingUpdate:
|
||||
(rating) =>
|
||||
controller.ratings.value =
|
||||
rating,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -167,9 +239,16 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: RoundedButtonFill(
|
||||
title: controller.ratingModel.value != null ? "Update Review" : "Add Review",
|
||||
title:
|
||||
controller.ratingModel.value !=
|
||||
null
|
||||
? "Update Review"
|
||||
: "Add Review",
|
||||
color: AppThemeData.primary300,
|
||||
textColor: isDark ? Colors.white : Colors.black,
|
||||
textColor:
|
||||
isDark
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
onPress: controller.submitReview,
|
||||
),
|
||||
),
|
||||
@@ -185,12 +264,24 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(60),
|
||||
color: Colors.white,
|
||||
boxShadow: [BoxShadow(color: Colors.grey.withOpacity(0.15), blurRadius: 8, spreadRadius: 6)],
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.15),
|
||||
blurRadius: 8,
|
||||
spreadRadius: 6,
|
||||
),
|
||||
],
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(60),
|
||||
child: NetworkImageWidget(
|
||||
imageUrl: controller.order.value?.driver?.profilePictureURL ?? '',
|
||||
imageUrl:
|
||||
controller
|
||||
.order
|
||||
.value
|
||||
?.driver
|
||||
?.profilePictureURL ??
|
||||
'',
|
||||
fit: BoxFit.cover,
|
||||
height: 110,
|
||||
width: 110,
|
||||
|
||||
Reference in New Issue
Block a user