Update codebase
This commit is contained in:
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/colors.dart';
|
||||
import '../../../controller/gamification/challenges_controller.dart';
|
||||
import '../widgets/ui/siro_ui.dart';
|
||||
import '../widgets/ui/tripz_ui.dart';
|
||||
|
||||
class ChallengesPage extends StatelessWidget {
|
||||
ChallengesPage({super.key});
|
||||
@@ -13,7 +13,7 @@ class ChallengesPage extends StatelessWidget {
|
||||
return Scaffold(
|
||||
body: GetBuilder<ChallengesController>(builder: (cc) {
|
||||
if (cc.isLoading) {
|
||||
return const SiroLoading();
|
||||
return const TripzLoading();
|
||||
}
|
||||
return CustomScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
@@ -42,7 +42,7 @@ class ChallengesPage extends StatelessWidget {
|
||||
background: Stack(fit: StackFit.expand, children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: SiroUi.brandGradient(context))),
|
||||
gradient: TripzUi.brandGradient(context))),
|
||||
PositionedDirectional(
|
||||
end: -30,
|
||||
top: -10,
|
||||
@@ -81,20 +81,20 @@ class ChallengesPage extends StatelessWidget {
|
||||
|
||||
Widget _sectionHeader(
|
||||
BuildContext context, String title, int done, int total) {
|
||||
return SiroSectionTitle(
|
||||
return TripzSectionTitle(
|
||||
title,
|
||||
trailing: SiroTag('$done/$total', color: SiroUi.interactive(context)),
|
||||
trailing: TripzTag('$done/$total', color: TripzUi.interactive(context)),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _challengeCard(
|
||||
BuildContext context, Challenge c, ChallengesController cc) {
|
||||
final isAr = Get.locale?.languageCode == 'ar';
|
||||
return SiroCard(
|
||||
return TripzCard(
|
||||
accent: c.isCompleted ? c.color : null,
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Row(children: [
|
||||
SiroIconBadge(c.icon, color: c.color, size: 22),
|
||||
TripzIconBadge(c.icon, color: c.color, size: 22),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -112,7 +112,7 @@ class ChallengesPage extends StatelessWidget {
|
||||
?.copyWith(fontSize: 11)),
|
||||
])),
|
||||
const SizedBox(width: 8),
|
||||
SiroTag('+${c.reward}',
|
||||
TripzTag('+${c.reward}',
|
||||
color: AppColor.yellowColor, icon: Icons.star_rounded),
|
||||
]),
|
||||
const SizedBox(height: 14),
|
||||
@@ -132,7 +132,7 @@ class ChallengesPage extends StatelessWidget {
|
||||
Container(
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
color: SiroUi.border(context),
|
||||
color: TripzUi.border(context),
|
||||
borderRadius: BorderRadius.circular(4))),
|
||||
LayoutBuilder(
|
||||
builder: (ctx, cons) => AnimatedContainer(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:siro_driver/constant/currency.dart';
|
||||
import 'package:tripz_driver/constant/currency.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/colors.dart';
|
||||
import '../../../controller/gamification/leaderboard_controller.dart';
|
||||
import '../widgets/ui/siro_ui.dart';
|
||||
import '../widgets/ui/tripz_ui.dart';
|
||||
|
||||
class LeaderboardPage extends StatelessWidget {
|
||||
LeaderboardPage({super.key});
|
||||
@@ -14,10 +14,10 @@ class LeaderboardPage extends StatelessWidget {
|
||||
return Scaffold(
|
||||
body: GetBuilder<LeaderboardController>(builder: (lc) {
|
||||
if (lc.isLoading) {
|
||||
return const SiroLoading();
|
||||
return const TripzLoading();
|
||||
}
|
||||
if (lc.currentLeaderboard.isEmpty) {
|
||||
return SiroEmptyState(
|
||||
return TripzEmptyState(
|
||||
icon: Icons.leaderboard_rounded,
|
||||
title: 'Leaderboard'.tr,
|
||||
message: 'No data yet'.tr,
|
||||
@@ -43,10 +43,10 @@ class LeaderboardPage extends StatelessWidget {
|
||||
fontSize: 17)),
|
||||
background: Stack(fit: StackFit.expand, children: [
|
||||
// كان التدرّج نيفي ← أحمر قانٍ، وهو لون لا يوجد في
|
||||
// هوية سيرو ويقرأه المستخدم إشارةَ خطر لا إنجاز.
|
||||
// هوية تريبز ويقرأه المستخدم إشارةَ خطر لا إنجاز.
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: SiroUi.brandGradient(context))),
|
||||
gradient: TripzUi.brandGradient(context))),
|
||||
PositionedDirectional(
|
||||
end: -40,
|
||||
top: -20,
|
||||
@@ -69,7 +69,7 @@ class LeaderboardPage extends StatelessWidget {
|
||||
margin: const EdgeInsets.fromLTRB(16, 14, 16, 0),
|
||||
padding: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: SiroUi.border(context).withValues(alpha: 0.5),
|
||||
color: TripzUi.border(context).withValues(alpha: 0.5),
|
||||
borderRadius: BorderRadius.circular(14)),
|
||||
child: Row(children: [
|
||||
_tab(context, 'Trips'.tr, Icons.local_taxi_rounded, 0, lc),
|
||||
@@ -130,7 +130,7 @@ class LeaderboardPage extends StatelessWidget {
|
||||
Widget _tab(BuildContext context, String label, IconData icon, int idx,
|
||||
LeaderboardController lc) {
|
||||
final selected = lc.selectedTab == idx;
|
||||
final accent = SiroUi.interactive(context);
|
||||
final accent = TripzUi.interactive(context);
|
||||
return Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () => lc.changeTab(idx),
|
||||
@@ -138,14 +138,14 @@ class LeaderboardPage extends StatelessWidget {
|
||||
duration: const Duration(milliseconds: 200),
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: selected ? SiroUi.surface(context) : Colors.transparent,
|
||||
color: selected ? TripzUi.surface(context) : Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: selected
|
||||
? Border.all(color: accent.withValues(alpha: 0.35))
|
||||
: null),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Icon(icon,
|
||||
size: 16, color: selected ? accent : SiroUi.subtle(context)),
|
||||
size: 16, color: selected ? accent : TripzUi.subtle(context)),
|
||||
const SizedBox(width: 6),
|
||||
Flexible(
|
||||
child: Text(label,
|
||||
@@ -153,7 +153,7 @@ class LeaderboardPage extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: selected ? accent : SiroUi.subtle(context))),
|
||||
color: selected ? accent : TripzUi.subtle(context))),
|
||||
),
|
||||
]),
|
||||
),
|
||||
@@ -161,15 +161,15 @@ class LeaderboardPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildRow(BuildContext context, LeaderboardEntry e, bool isEarnings) {
|
||||
final accent = SiroUi.interactive(context);
|
||||
final accent = TripzUi.interactive(context);
|
||||
final rankColor = e.rank == 1
|
||||
? AppColor.gold
|
||||
: e.rank == 2
|
||||
? const Color(0xFFC0C0C0)
|
||||
: e.rank == 3
|
||||
? AppColor.bronze
|
||||
: SiroUi.subtle(context);
|
||||
return SiroCard(
|
||||
: TripzUi.subtle(context);
|
||||
return TripzCard(
|
||||
margin: const EdgeInsets.only(bottom: 8),
|
||||
padding: const EdgeInsets.all(12),
|
||||
accent: e.isCurrentUser ? accent : null,
|
||||
@@ -214,7 +214,7 @@ class LeaderboardPage extends StatelessWidget {
|
||||
),
|
||||
if (e.isCurrentUser) ...[
|
||||
const SizedBox(width: 6),
|
||||
SiroTag('You'.tr, color: accent),
|
||||
TripzTag('You'.tr, color: accent),
|
||||
],
|
||||
]),
|
||||
])),
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:share_plus/share_plus.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../../../constant/finance_design_system.dart';
|
||||
import '../../../controller/gamification/referral_controller.dart';
|
||||
import 'package:siro_driver/views/widgets/error_snakbar.dart';
|
||||
import 'package:tripz_driver/views/widgets/error_snakbar.dart';
|
||||
|
||||
class ReferralCenterPage extends StatelessWidget {
|
||||
ReferralCenterPage({super.key});
|
||||
|
||||
Reference in New Issue
Block a user