12312321
unknown
plain_text
17 days ago
30 kB
2
Indexable
Container( width: size.width, height: size.height, decoration: BoxDecoration( color: Theme.of(context).primaryColor, image: const DecorationImage( alignment: Alignment.topCenter, image: AssetImage(AppImages.map), ), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ SizedBox(height: size.height * 0.135), ], ), ), Positioned( top: size.height * 0.06, left: size.width * 0.03, right: size.width * 0.03, child: Row( children: [ NavigationIconWidget( icon: InkWell( onTap: () { if (context.read<HomeBloc>().userData != null) { Navigator.pushNamed( context, AccountPage.routeName, arguments: AccountPageArguments( userData: context .read<HomeBloc>() .userData!, ), ).then((value) { if (!context.mounted) return; context .read<HomeBloc>() .add(GetDirectionEvent()); if (value != null) { context .read<HomeBloc>() .userData = value as UserDetail; context .read<HomeBloc>() .add(UpdateEvent()); } }); } }, child: Icon( Icons.menu_rounded, size: 22, color: Theme.of(context).primaryColorDark, ), ), isShadowWidget: true, ), ], ), ), // Positioned( // top: size.height * 0.125, // left: size.width * 0.03, // right: size.width * 0.03, // // bottom: size.height * 0.3, // child: Padding( // padding: const EdgeInsets.symmetric( // horizontal: 0, // ), // child: AnimatedContainer( // transformAlignment: Alignment.centerRight, // duration: const Duration(milliseconds: 100), // width: size.width * 1, // height: size.height * 0.06, // decoration: BoxDecoration( // color: Theme.of(context) // .scaffoldBackgroundColor, // borderRadius: BorderRadius.circular(10), // border: Border.all( // color: Theme.of(context) // .disabledColor // .withOpacity(0.2), // ), // ), // child: Padding( // padding: const EdgeInsets.symmetric( // horizontal: 5, vertical: 5), // child: Row( // children: [ // Container( // width: size.width * 0.075, // height: size.width * 0.075, // alignment: Alignment.center, // child: Icon( // Icons.search, // size: 20, // color: Theme.of(context) // .primaryColorDark, // ), // ), // Expanded( // // Place Expanded inside Row to prevent overflow here // child: MyText( // text: AppLocalizations.of(context)! // .tripLookup, // textStyle: Theme.of(context) // .textTheme // .bodySmall! // .copyWith( // color: Theme.of(context) // .primaryColorDark, // fontSize: 15), // ), // ), // if (context // .read<HomeBloc>() // .userData != // null && // (context // .read<HomeBloc>() // .userData! // .showRideWithoutDestination == // "1") && // (context // .read<HomeBloc>() // .userData! // .enableModulesForApplications == // 'taxi' || // context // .read<HomeBloc>() // .userData! // .enableModulesForApplications == // 'both')) // InkWell( // onTap: () { // context.read<HomeBloc>().add( // RideWithoutDestinationEvent()); // }, // child: Container( // height: size.width * 0.07, // width: size.width * 0.15, // alignment: Alignment.center, // child: CustomButton( // textSize: 12, // buttonName: // AppLocalizations.of( // context)! // .search, // buttonColor: Theme.of(context) // .primaryColor, // onTap: () {}), // ), // ), // ], // ), // ), // ), // ), // ), Positioned( top: size.height * 0.2, bottom: 0, left: 0, right: 0, child: Container( decoration: BoxDecoration( color: Theme.of(context).scaffoldBackgroundColor, borderRadius: const BorderRadius.only( topLeft: Radius.circular(15), topRight: Radius.circular(15), ), ), child: Column( children: [ SizedBox(height: size.height * 0.02), Padding( padding: const EdgeInsets.symmetric( horizontal: 10), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ MyText( text: '${AppLocalizations.of(context)!.welcome}, ' '${(context.read<AccBloc>().userData?.name.isNotEmpty ?? false) ? context.read<AccBloc>().userData!.name : userType == "tour_guide" ? AppLocalizations.of(context)!.tourGuide : AppLocalizations.of(context)!.tourist}', textStyle: Theme.of(context) .textTheme .bodyLarge! .copyWith( color: Theme.of(context) .primaryColorDark, fontSize: 16, ), ), Container( padding: const EdgeInsets.symmetric( horizontal: 10, vertical: 4), decoration: BoxDecoration( color: Theme.of(context) .primaryColor .withOpacity(0.1), borderRadius: BorderRadius.circular(15), ), child: Row( mainAxisSize: MainAxisSize.min, children: [ if (context .read<AccBloc>() .userData ?.rating != null) ...[ MyText( text: '${context.read<AccBloc>().userData?.rating} ', textStyle: Theme.of(context) .textTheme .labelMedium, ), const Icon( Icons.star_rounded, color: Colors.amber, size: 12, ), SizedBox( width: size.width * 0.01), CustomVerticalDivider( height: size.height * 0.01, color: Theme.of(context) .primaryColor .withOpacity(0.2), ), ], MyText( text: ' ${context.read<AccBloc>().userData?.completedRideCount ?? 0} ', textStyle: Theme.of(context) .textTheme .labelMedium, ), const Icon( Icons .check_circle_rounded, color: AppColors.green, size: 12, ), ], ), ), ], ), SizedBox(height: size.height * 0.01), ], ), ), Padding( padding: const EdgeInsets.symmetric( horizontal: 10, vertical: 20), child: InkWell( onTap: () { Navigator.pushNamed(context, TripLookUpPage.routeName); }, child: AnimatedContainer( transformAlignment: Alignment.centerRight, duration: const Duration(milliseconds: 100), width: size.width * 1, height: size.height * 0.06, decoration: BoxDecoration( color: AppColors.inputColor, borderRadius: BorderRadius.circular(10), border: Border.all( color: AppColors.inputColor, ), ), child: Padding( padding: const EdgeInsets.symmetric( horizontal: 5, vertical: 5), child: Row( children: [ Container( width: size.width * 0.075, height: size.width * 0.075, alignment: Alignment.center, child: Icon( Icons.search, size: 20, color: Theme.of(context) .primaryColorDark, ), ), Expanded( // Place Expanded inside Row to prevent overflow here child: MyText( text: AppLocalizations.of( context)! .tripLookup, textStyle: Theme.of(context) .textTheme .bodySmall! .copyWith( color: Theme.of( context) .primaryColorDark, fontSize: 15), ), ), ], ), ), ), ), ), Padding( padding: const EdgeInsets.symmetric( horizontal: 10, ), child: BookDestination(cont: context), ), SizedBox(height: size.height * 0.03), VehicleTypeWidget( size: size, ), if (context .read<HomeBloc>() .isMultipleRide) ...[ Padding( padding: const EdgeInsets.only( top: 15, left: 10, right: 10), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ MyText( text: AppLocalizations.of( context)! .onGoingRides, textStyle: Theme.of(context) .textTheme .bodyMedium! .copyWith( fontWeight: FontWeight.bold, color: Theme.of(context) .primaryColorDark)), if (context .read<HomeBloc>() .isMultipleRide) ...[ if (context .read<HomeBloc>() .onGoingRideList .length > 3) InkWell( onTap: () { context.read<HomeBloc>().add( NavigateToOnGoingRidesPageEvent()); }, child: Row( children: [ // SizedBox( // width: size.width * 0.5), MyText( text: AppLocalizations .of(context)! .viewAll, textStyle: Theme.of( context) .textTheme .bodyMedium! .copyWith( fontWeight: FontWeight .bold, color: Theme.of( context) .primaryColor, decoration: TextDecoration .underline, decorationColor: Theme.of( context) .primaryColor)), Icon( Icons .arrow_forward_ios_rounded, size: 14, color: Theme.of(context) .primaryColor, ), ], ), ), ], ], ), ), SizedBox(height: size.width * 0.01), HomeOnGoingRidesWidget(cont: context), ], // Recent search places if (context .read<HomeBloc>() .recentSearchPlaces .isNotEmpty) ...[ SizedBox(height: size.width * 0.01), Padding( padding: const EdgeInsets.symmetric( horizontal: 10), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ MyText( text: AppLocalizations.of(context)! .recentSearchHistory, textStyle: Theme.of(context) .textTheme .bodyMedium! .copyWith( fontWeight: FontWeight.bold, color: Theme.of(context) .primaryColorDark, ), ), RecentSearchPlacesWidget( cont: context), ], ), ) ], if (context.read<HomeBloc>().userData != null && context .read<HomeBloc>() .userData! .bannerImage .data .isNotEmpty) ...[ SizedBox(height: size.width * 0.01), BannerWidget(cont: context), ], ], ), ), ),
Editor is loading...
Leave a Comment