اريد اضافة شاشة splash تظهر قبل هذة لثواني محددة واريد ان تضيف فيها مكان لعرض logo…
- User
اريد اضافة شاشة splash تظهر قبل هذة لثواني محددة واريد ان تضيف فيها مكان لعرض logo الشركة import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:shared_preferences/shared_preferences.dart';
// إضافة الخطوط هنا const tajawalFont = 'Tajawal';
class ThousandsSeparatorInputFormatter extends TextInputFormatter { @override TextEditingValue formatEditUpdate( TextEditingValue oldValue, TextEditingValue newValue, ) { String onlyDigits = newValue.text.replaceAll(RegExp(r'[^0-9]'), ''); if (onlyDigits.isEmpty) return newValue.copyWith(text: '');
final buffer = StringBuffer(); int len = onlyDigits.length; for (int i = 0; i < len; i++) { buffer.write(onlyDigits[i]); int posFromRight = len - i - 1; if (posFromRight % 3 == 0 && i != len - 1) buffer.write(','); } return TextEditingValue( text: buffer.toString(), selection: TextSelection.collapsed(offset: buffer.length), );} }
class SplashScreen extends StatefulWidget { const SplashScreen({super.key});
@override State createState() => _SplashScreenState(); }
class _SplashScreenState extends State with TickerProviderStateMixin { bool _isLoading = true; bool _hasSavedBalance = false;
int _currentBalance = 0; int _additionalBalance = 0; int _totalBalance = 0;
late TextEditingController _balanceController; late TextEditingController _additionalBalanceController;
bool _showAdditionalBalanceField = false;
late AnimationController _animationController; late Animation _logoScaleAnimation; late Animation _contentSlideAnimation; late Animation _fadeAnimation;
@override void initState() { super.initState(); _balanceController = TextEditingController(); _additionalBalanceController = TextEditingController();
_balanceController.addListener(_checkBalanceForAdditionalField); _animationController = AnimationController( vsync: this, duration: const Duration(milliseconds: 1000), ); _logoScaleAnimation = Tween<double>(begin: 0.8, end: 1).animate( CurvedAnimation(parent: _animationController, curve: Curves.easeOutBack), ); _contentSlideAnimation = Tween<Offset>( begin: const Offset(0, 30), end: Offset.zero, ).animate( CurvedAnimation(parent: _animationController, curve: Curves.easeOutQuart), ); _fadeAnimation = Tween<double>(begin: 0, end: 1).animate( CurvedAnimation(parent: _animationController, curve: Curves.easeInOut), ); _animationController.forward(); _loadBalance();}
@override void dispose() { _balanceController.removeListener(_checkBalanceForAdditionalField); _balanceController.dispose(); _additionalBalanceController.dispose(); _animationController.dispose(); super.dispose(); }
Future _loadBalance() async { final prefs = await SharedPreferences.getInstance(); final savedData = prefs.getString('balance_data');
- Assistant
- User
اعطيني الكود بالكامل لاقوم باستخدامة مباشرة
- Assistant
- User
لماذا لم تظهر شاشة ال splash
- Assistant
- User
قم بتحسين هذا الوصف A modern, professional, and detailed vector logo on a white background features a central, realistically rendered light blue SIM card with a precisely notched top-right corner and highly detailed gold contact points, encircled by a dynamic clockwise arrangement of four arrowheads with subtle gradient effects, suggesting automation. The top-left arrowhead transitions from light blue to a slightly darker shade, the top-right arrowhead displays a vibrant orange with a soft inner glow, the bottom-right arrowhead is a deep blue with a polished sheen and points to a dark blue, subtly textured circular icon containing a crisp white dollar sign with a slight drop shadow, and the bottom-left arrowhead is also a deep blue with a similar polished effect. To the left of the SIM card and arrows is a stylized graphic element composed of three meticulously layered, inward-angled trapezoids with smooth color gradients: the outermost transitions from a bright to a medium orange, the middle displays a medium to a darker orange, and the innermost is a light blue with six sharply defined horizontal lines extending left towards a sleek, pointed white shape at the bottom center, featuring subtle light refractions; the top two lines are a soft white with a faint glow, the next two are a slightly darker light blue with a subtle inner shadow, and the bottom two are a rich dark blue with a hint of reflection. The lighting across all elements is carefully designed to create depth and dimension, incorporating soft highlights and shadows for a contemporary feel. The aspect ratio remains 1:1, emphasizing the central design.
- Assistant
شعار فيكتوري حديث واحترافي يتميز بتفاصيل دقيقة على خلفية بيضاء، يتوسطه بطاقة SIM باللون الأزرق الفاتح مع زاوية علوية يمينية مشطوفة بشكل متقن ونقاط اتصال ذهبية غاية في الدقة والوضوح. تحيط بالبطاقة أربعة سهام مرتبة بترتيب دائري باتجاه عقارب الساعة، تحمل تدرجات لونية ناعمة تعكس مفهوم الأتمتة الديناميكي: السهم العلوي الأيسر يبدأ من أزرق فاتح ويمتد إلى درجة أزرق أغمق قليلاً، السهم العلوي الأيمن يظهر بلون برتقالي زاهي مع توهج داخلي ناعم، السهم السفلي الأيمن أزرق غامق مع لمعة مصقولة ويتجه نحو أيقونة دائرية بلون أزرق داكن تحمل علامة دولار بيضاء واضحة مع ظل ناعم، أما السهم السفلي الأيسر فهو أزرق غامق بدرجة متقاربة ولمعة مماثلة. إلى يسار البطاقة والسهام، يوجد عنصر رسومي مبتكر يتألف من ثلاثة شبه منحرفات متراكبة ومائلة للداخل، مزجت بتدرجات ألوان سلسة: الخارجي بين البرتقالي الساطع والمتوسط، والوسيط من البرتقالي المتوسط إلى الداكن، والداخلي أزرق فاتح مع ستة خطوط أفقية حادة تمتد يساراً نحو شكل أبيض أنيق مدبب في الأسفل، يعكس تلاعباً خفيفاً بالضوء؛ الخطان العلويان بلون أبيض ناعم مع توهج خفيف، والوسطان أزرق فاتح مع ظل داخلي رقيق، والأسفلان أزرق داكن مع لمسة عاكسة. تم توزيع الإضاءة بعناية على كافة العناصر لإبراز عمق وُبعد التصميم، مع ظلال وتظليلات ناعمة تمنح إحساساً عصرياً متكامل الأبعاد، فيما يحافظ الشعار على نسبة عرض إلى ارتفاع 1:1 تبرز مركزية التصميم وجماليته.
- User
اجعلة بالغة الانجليزية
- Assistant
A modern, professional, and highly detailed vector logo set against a white background features a central light blue SIM card rendered with realistic precision, including a neatly notched top-right corner and finely detailed gold contact points. Surrounding the SIM card are four dynamically arranged arrowheads rotating clockwise, each displaying subtle gradient effects that convey a sense of automation: the top-left arrow transitions from light to slightly darker blue, the top-right arrow shines with vibrant orange and a soft inner glow, the bottom-right arrow presents a deep polished blue pointing toward a dark blue circular icon containing a crisp white dollar sign with a gentle drop shadow, and the bottom-left arrow mirrors the deep polished blue hue. To the left of the SIM card and arrows lies a stylized graphic composed of three meticulously layered trapezoids angled inward, featuring smooth color gradients— the outermost shifting from bright to medium orange, the middle from medium to dark orange, and the innermost a light blue accented by six sharply defined horizontal lines extending leftward toward a sleek, pointed white shape at the bottom center with subtle light refractions; the top two lines glow softly in white, the next two are a slightly darker light blue with subtle inner shadows, and the bottom two are a rich dark blue with reflective highlights. The carefully crafted lighting across all elements creates depth and dimension through soft highlights and shadows, delivering a contemporary and dimensional aesthetic. Maintaining a perfect 1:1 aspect ratio, the design emphasizes the logo’s central focus and visual harmony.