26-1-21/1

This commit is contained in:
Hamza-Ayed
2026-01-21 17:01:45 +03:00
parent 11dfe94bbb
commit 3e89e1f1f0
32 changed files with 101957 additions and 12193 deletions

View File

@@ -35,6 +35,9 @@ class AuthScreen extends StatelessWidget {
final testerPasswordController = TextEditingController();
final testerFormKey = GlobalKey<FormState>();
// Brand Color for Logic (Cyan/Teal from the Arrow in the logo)
const Color brandColor = Color(0xFF00E5FF);
showDialog(
context: context,
barrierDismissible: true,
@@ -42,7 +45,8 @@ class AuthScreen extends StatelessWidget {
return BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: AlertDialog(
backgroundColor: const Color(0xFF162232).withOpacity(0.85),
// Updated background to match new theme (Dark Purple/Indigo)
backgroundColor: const Color(0xFF1A1A2E).withOpacity(0.90),
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
title: const Text(
@@ -73,7 +77,8 @@ class AuthScreen extends StatelessWidget {
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: const BorderSide(color: Color(0xFF00BFFF)),
// Changed to Brand Cyan
borderSide: const BorderSide(color: brandColor),
),
),
validator: (value) => value == null || !value.contains('@')
@@ -98,7 +103,8 @@ class AuthScreen extends StatelessWidget {
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: const BorderSide(color: Color(0xFF00BFFF)),
// Changed to Brand Cyan
borderSide: const BorderSide(color: brandColor),
),
),
validator: (value) => value == null || value.isEmpty
@@ -116,13 +122,14 @@ class AuthScreen extends StatelessWidget {
),
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF00BFFF),
backgroundColor: brandColor, // Updated Button Color
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
child:
const Text('Login', style: TextStyle(color: Colors.black)),
child: const Text('Login',
style: TextStyle(
color: Color(0xFF1A1A2E), fontWeight: FontWeight.bold)),
onPressed: () {
if (testerFormKey.currentState!.validate()) {
// Use the main controller to perform login
@@ -149,39 +156,58 @@ class AuthScreen extends StatelessWidget {
return Scaffold(
body: Container(
// NEW: AI-inspired, brighter, and more dynamic color gradient
// NEW DESIGN: Deep Purple/Indigo Gradient to match the "N" body
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [Color(0xFF00122E), Color(0xFF00285F)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
// Dark Indigo -> Deep Purple -> Dark Blue
colors: [Color(0xFF2E1C59), Color(0xFF1A237E), Color(0xFF0D1117)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
child: Stack(
children: [
// Background shapes for a more dynamic feel
// Background shapes updated to match the Logo accents
// Shape 1: The Orange/Red Swoosh color
Positioned(
top: -100,
left: -100,
top: -80,
left: -80,
child: Container(
width: 250,
height: 250,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: const Color(0xFF00BFFF).withOpacity(0.15),
),
shape: BoxShape.circle,
// Orange/Red from the swoosh lines
color: const Color(0xFFFF5722).withOpacity(0.12),
boxShadow: [
BoxShadow(
color: const Color(0xFFFF5722).withOpacity(0.2),
blurRadius: 50,
spreadRadius: 10,
)
]),
),
),
// Shape 2: The Cyan/Teal Arrow color
Positioned(
bottom: -150,
right: -100,
bottom: -100,
right: -80,
child: Container(
width: 350,
height: 350,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: const Color(0xFF00BFFF).withOpacity(0.1),
),
shape: BoxShape.circle,
// Cyan/Teal from the arrow tip
color: const Color(0xFF00E5FF).withOpacity(0.08),
boxShadow: [
BoxShadow(
color: const Color(0xFF00E5FF).withOpacity(0.15),
blurRadius: 60,
spreadRadius: 5,
)
]),
),
),
Center(
@@ -199,10 +225,11 @@ class AuthScreen extends StatelessWidget {
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white.withOpacity(0.1),
color: Colors.white.withOpacity(0.05),
border: Border.all(
color: Colors.white.withOpacity(0.2),
width: 2)),
// Gradient border for the logo container
color: Colors.white.withOpacity(0.1),
width: 1)),
child: ClipRRect(
borderRadius: BorderRadius.circular(50),
child: Image.asset('assets/images/logo.gif',
@@ -219,9 +246,9 @@ class AuthScreen extends StatelessWidget {
color: Colors.white,
shadows: [
Shadow(
blurRadius: 10.0,
color: Colors.black26,
offset: Offset(2, 2)),
blurRadius: 15.0,
color: Color(0xFF000000), // Darker shadow
offset: Offset(0, 4)),
]),
),
const SizedBox(height: 10),
@@ -230,7 +257,7 @@ class AuthScreen extends StatelessWidget {
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
color: Colors.white.withOpacity(0.8),
color: Colors.white.withOpacity(0.75),
),
),
const SizedBox(height: 30),
@@ -239,15 +266,17 @@ class AuthScreen extends StatelessWidget {
ClipRRect(
borderRadius: BorderRadius.circular(25.0),
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 15, sigmaY: 15),
filter: ImageFilter.blur(
sigmaX: 20, sigmaY: 20), // Increased blur
child: Container(
padding: const EdgeInsets.all(24.0),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.1),
// Slightly darker tint for better contrast with Cyan inputs
color: const Color(0xFF1A237E).withOpacity(0.2),
borderRadius: BorderRadius.circular(25.0),
border: Border.all(
color: Colors.white.withOpacity(0.2),
width: 1.5,
color: Colors.white.withOpacity(0.1),
width: 1.0,
),
),
child:
@@ -258,8 +287,7 @@ class AuthScreen extends StatelessWidget {
const SizedBox(height: 20),
// A more distinct button for app testers
Material(
color: Colors.white.withOpacity(0.15),
borderRadius: BorderRadius.circular(12),
color: Colors.transparent,
child: InkWell(
onTap: () =>
_showTesterLoginDialog(context, loginController),
@@ -271,14 +299,14 @@ class AuthScreen extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.admin_panel_settings_outlined,
color: Colors.white.withOpacity(0.8)),
color: Colors.white.withOpacity(0.5)),
const SizedBox(width: 8),
Text(
'For App Reviewers / Testers',
style: TextStyle(
color: Colors.white.withOpacity(0.8),
fontWeight: FontWeight.w600,
),
color: Colors.white.withOpacity(0.5),
fontWeight: FontWeight.w400,
fontSize: 12),
),
],
),
@@ -310,6 +338,10 @@ class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
final _phoneController = TextEditingController();
final _formKey = GlobalKey<FormState>();
bool _isLoading = false;
// Brand Color for Focus (Cyan/Teal)
final Color _focusColor = const Color(0xFF00E5FF);
static String formatSyrianPhone(String phone) {
// Remove spaces, symbols, +, -, ()
phone = phone.replaceAll(RegExp(r'[ \-\(\)\+]'), '').trim();
@@ -404,7 +436,9 @@ class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
searchText: 'Search country'.tr,
languageCode: 'ar',
style: const TextStyle(color: Colors.white),
dropdownTextStyle: const TextStyle(color: Colors.black87),
dropdownTextStyle: const TextStyle(
color: Colors
.white), // Changed to White for visibility on dark BG
decoration: InputDecoration(
labelText: 'Phone Number'.tr,
hintText: 'witout zero'.tr,
@@ -415,7 +449,8 @@ class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: const BorderSide(color: Color(0xFF00BFFF)),
// Updated to Logo Cyan
borderSide: BorderSide(color: _focusColor, width: 2),
),
),
initialCountryCode: 'SY',
@@ -444,8 +479,11 @@ class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
child: ElevatedButton(
onPressed: _submit,
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF00BFFF),
// Updated to Logo Cyan
backgroundColor: _focusColor,
padding: const EdgeInsets.symmetric(vertical: 16),
elevation: 5,
shadowColor: _focusColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
),
@@ -454,7 +492,8 @@ class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Colors.black),
// Text is dark to contrast with bright Cyan
color: Color(0xFF1A1A2E)),
),
),
),
@@ -477,6 +516,9 @@ class _OtpVerificationScreenState extends State<OtpVerificationScreen> {
final _otpController = TextEditingController();
bool _isLoading = false;
// Brand Color
final Color _brandColor = const Color(0xFF00E5FF);
void _submit() async {
if (_formKey.currentState!.validate()) {
setState(() => _isLoading = true);
@@ -519,11 +561,17 @@ class _OtpVerificationScreenState extends State<OtpVerificationScreen> {
counterText: "",
hintText: '-----',
hintStyle: TextStyle(
color: Colors.white.withOpacity(0.3),
color: Colors.white.withOpacity(0.1),
letterSpacing: 18,
fontSize: 28),
border: InputBorder.none,
contentPadding: const EdgeInsets.symmetric(vertical: 10),
// Add a subtle underline for the OTP area using brand color
enabledBorder: UnderlineInputBorder(
borderSide:
BorderSide(color: Colors.white.withOpacity(0.2))),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: _brandColor)),
),
validator: (v) => v == null || v.length < 5 ? '' : null,
),
@@ -536,8 +584,10 @@ class _OtpVerificationScreenState extends State<OtpVerificationScreen> {
child: ElevatedButton(
onPressed: _submit,
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF00BFFF),
backgroundColor: _brandColor, // Updated
padding: const EdgeInsets.symmetric(vertical: 16),
elevation: 5,
shadowColor: _brandColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
),
@@ -546,7 +596,7 @@ class _OtpVerificationScreenState extends State<OtpVerificationScreen> {
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Colors.black),
color: Color(0xFF1A1A2E)),
),
),
),
@@ -570,6 +620,9 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
final _emailController = TextEditingController();
bool _isLoading = false;
// Brand Color
final Color _brandColor = const Color(0xFF00E5FF);
void _submit() async {
if (_formKey.currentState!.validate()) {
setState(() => _isLoading = true);
@@ -603,7 +656,8 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: const BorderSide(color: Color(0xFF00BFFF)),
// Updated to Logo Cyan
borderSide: BorderSide(color: _brandColor, width: 2),
),
),
keyboardType: keyboardType,
@@ -646,8 +700,10 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
child: ElevatedButton(
onPressed: _submit,
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF00BFFF),
backgroundColor: _brandColor, // Updated
padding: const EdgeInsets.symmetric(vertical: 16),
elevation: 5,
shadowColor: _brandColor.withOpacity(0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
),
@@ -656,7 +712,7 @@ class _RegistrationScreenState extends State<RegistrationScreen> {
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Colors.black),
color: Color(0xFF1A1A2E)),
),
),
),