0% found this document useful (0 votes)
4 views40 pages

UI Code

The document contains Flutter code for two screens: a splash screen and a task input screen. The splash screen features animations for a logo and text, while the task input screen allows users to enter tasks and view AI-generated priority predictions. Each screen is implemented in separate Dart files with defined UI elements and functionalities.

Uploaded by

Ahsan Khan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views40 pages

UI Code

The document contains Flutter code for two screens: a splash screen and a task input screen. The splash screen features animations for a logo and text, while the task input screen allows users to enter tasks and view AI-generated priority predictions. Each screen is implemented in separate Dart files with defined UI elements and functionalities.

Uploaded by

Ahsan Khan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Yahan hai har screen ka alag alag Flutter code — same UI, 6 separate files:

📱 Screen 1 — splash_screen.dart
import 'package:flutter/[Link]';

class SplashScreen extends StatefulWidget {


const SplashScreen({[Link]});

@override
State<SplashScreen> createState() => _SplashScreenState();
}

class _SplashScreenState extends State<SplashScreen>


with TickerProviderStateMixin {
late AnimationController _logoCtrl;
late AnimationController _textCtrl;
late Animation<double> _logoScale;
late Animation<double> _logoRotate;
late Animation<double> _textOpacity;
late Animation<Offset> _textSlide;

@override
void initState() {
[Link]();

_logoCtrl = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 800),
);
_textCtrl = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 600),
);

_logoScale = Tween<double>(begin: 0, end: 1).animate(


CurvedAnimation(parent: _logoCtrl, curve: [Link]),
);
_logoRotate = Tween<double>(begin: -0.5, end: 0).animate(
CurvedAnimation(parent: _logoCtrl, curve: [Link]),
);
_textOpacity = Tween<double>(begin: 0, end: 1).animate(
CurvedAnimation(parent: _textCtrl, curve: [Link]),
);
_textSlide = Tween<Offset>(
begin: const Offset(0, 0.4),
end: [Link],
).animate(CurvedAnimation(parent: _textCtrl, curve: [Link]));

_logoCtrl.forward();
[Link](const Duration(milliseconds: 500), () {
_textCtrl.forward();
});

// Navigate to TaskInput after 2.8 seconds


[Link](const Duration(milliseconds: 2800), () {
if (mounted) {
[Link](context).pushReplacementNamed('/home');
}
});
}

@override
void dispose() {
_logoCtrl.dispose();
_textCtrl.dispose();
[Link]();
}

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);
const accentColor = Color(0xFF3B82F6);
const bgColor = Color(0xFFF8F7FC);

return Scaffold(
backgroundColor: bgColor,
body: Stack(
children: [
// Background Orb 1
Positioned(
top: [Link](context).[Link] * 0.18,
left: -70,
child: Container(
width: 280,
height: 280,
decoration: BoxDecoration(
shape: [Link],
color: [Link](0.12),
),
),
),
// Background Orb 2
Positioned(
bottom: [Link](context).[Link] * 0.18,
right: -50,
child: Container(
width: 220,
height: 220,
decoration: BoxDecoration(
shape: [Link],
color: [Link](0.12),
),
),
),
// Center Content
Center(
child: Column(
mainAxisAlignment: [Link],
children: [
// Logo
AnimatedBuilder(
animation: _logoCtrl,
builder: (_, child) => [Link](
angle: _logoRotate.value,
child: [Link](
scale: _logoScale.value,
child: child,
),
),
child: Container(
width: 112,
height: 112,
decoration: BoxDecoration(
borderRadius: [Link](28),
gradient: const LinearGradient(
colors: [primaryColor, accentColor],
begin: [Link],
end: [Link],
),
boxShadow: [
BoxShadow(
color: [Link](0.35),
blurRadius: 30,
offset: const Offset(0, 12),
),
],
),
child: const Center(
child: Text(
'P+',
style: TextStyle(
color: [Link],
fontSize: 42,
fontWeight: [Link],
),
),
),
),
),
const SizedBox(height: 32),
// App Name
FadeTransition(
opacity: _textOpacity,
child: SlideTransition(
position: _textSlide,
child: ShaderMask(
shaderCallback: (bounds) => const LinearGradient(
colors: [primaryColor, accentColor],
).createShader(bounds),
child: const Text(
'PriorityPlus',
style: TextStyle(
fontSize: 36,
fontWeight: [Link],
color: [Link],
letterSpacing: -0.5,
),
),
),
),
),
const SizedBox(height: 8),
// Subtitle
FadeTransition(
opacity: _textOpacity,
child: const Text(
'AI TASK PRIORITY PREDICTOR',
style: TextStyle(
fontSize: 11,
letterSpacing: 2.5,
color: Colors.black38,
fontWeight: FontWeight.w500,
),
),
),
const SizedBox(height: 48),
// Animated Loading Dots
_LoadingDots(),
],
),
),
],
),
);
}
}

class _LoadingDots extends StatefulWidget {


@override
State<_LoadingDots> createState() => _LoadingDotsState();
}

class _LoadingDotsState extends State<_LoadingDots>


with TickerProviderStateMixin {
late List<AnimationController> _ctrls;
late List<Animation<double>> _anims;

@override
void initState() {
[Link]();
_ctrls = [Link](
3,
(i) => AnimationController(
vsync: this,
duration: const Duration(milliseconds: 800),
),
);
_anims = _ctrls
.map((c) => Tween<double>(begin: 0, end: -10).animate(
CurvedAnimation(parent: c, curve: [Link]),
))
.toList();

for (int i = 0; i < 3; i++) {


[Link](Duration(milliseconds: i * 200), () {
if (mounted) _ctrls[i].repeat(reverse: true);
});
}
}

@override
void dispose() {
for (var c in _ctrls) [Link]();
[Link]();
}

@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: [Link],
children: [Link](3, (i) {
return AnimatedBuilder(
animation: _anims[i],
builder: (_, __) => [Link](
offset: Offset(0, _anims[i].value),
child: Container(
width: 8,
height: 8,
margin: const [Link](horizontal: 4),
decoration: const BoxDecoration(
shape: [Link],
color: Color(0xFF7C3AED),
),
),
),
);
}),
);
}
}

📱 Screen 2 — task_input_screen.dart
import 'package:flutter/[Link]';

class TaskInputScreen extends StatefulWidget {


const TaskInputScreen({[Link]});

@override
State<TaskInputScreen> createState() => _TaskInputScreenState();
}

class _TaskInputScreenState extends State<TaskInputScreen> {


final TextEditingController _ctrl = TextEditingController();

final List<Map<String, dynamic>> _features = [


{
'icon': Icons.psychology_rounded,
'title': 'Smart Analysis',
'desc': 'AI understands context',
},
{
'icon': Icons.bolt_rounded,
'title': 'Instant Results',
'desc': 'Priority in seconds',
},
{
'icon': Icons.auto_awesome_rounded,
'title': 'Accurate',
'desc': 'ML-powered predictions',
},
];

void _predict() {
final task = _ctrl.[Link]();
if ([Link]) return;
[Link](context).pushNamed('/result', arguments: task);
}

@override
void dispose() {
_ctrl.dispose();
[Link]();
}

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);
const accentColor = Color(0xFF3B82F6);
const bgColor = Color(0xFFF8F7FC);
const cardColor = [Link];
const foreground = Color(0xFF14101F);
const muted = Colors.black38;

return Scaffold(
backgroundColor: bgColor,
body: SafeArea(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: [Link],
children: [
// ── Hero Section ──
Container(
width: [Link],
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [
Color(0x107C3AED),
[Link],
Color(0x103B82F6),
],
begin: [Link],
end: [Link],
),
),
padding: const [Link](20, 24, 20, 24),
child: Column(
crossAxisAlignment: [Link],
children: [
// Logo + Title Row
Row(
children: [
Container(
width: 44,
height: 44,
decoration: BoxDecoration(
borderRadius: [Link](12),
gradient: const LinearGradient(
colors: [primaryColor, accentColor],
),
boxShadow: [
BoxShadow(
color: [Link](0.3),
blurRadius: 12,
offset: const Offset(0, 4),
),
],
),
child: const Center(
child: Text(
'P+',
style: TextStyle(
color: [Link],
fontSize: 16,
fontWeight: [Link],
),
),
),
),
const SizedBox(width: 12),
Column(
crossAxisAlignment: [Link],
children: [
ShaderMask(
shaderCallback: (b) => const LinearGradient(
colors: [primaryColor, accentColor],
).createShader(b),
child: const Text(
'PriorityPlus',
style: TextStyle(
fontSize: 18,
fontWeight: [Link],
color: [Link],
),
),
),
const Text(
'AI PRIORITY PREDICTOR',
style: TextStyle(
fontSize: 9,
letterSpacing: 1.5,
color: muted,
),
),
],
),
],
),
const SizedBox(height: 28),
// Heading
const Text(
"What's on your",
style: TextStyle(
fontSize: 30,
fontWeight: [Link],
color: foreground,
height: 1.3,
),
),
ShaderMask(
shaderCallback: (b) => const LinearGradient(
colors: [primaryColor, accentColor],
).createShader(b),
child: const Text(
'mind today?',
style: TextStyle(
fontSize: 30,
fontWeight: [Link],
color: [Link],
),
),
),
const SizedBox(height: 10),
const Text(
'Enter your task and let AI predict its priority level instantly.',
style: TextStyle(
fontSize: 13,
color: muted,
height: 1.6,
),
),
],
),
),

// ── Input Card ──
Padding(
padding: const [Link](horizontal: 20),
child: Container(
decoration: BoxDecoration(
color: cardColor,
borderRadius: [Link](24),
boxShadow: [
BoxShadow(
color: [Link](0.07),
blurRadius: 24,
offset: const Offset(0, 8),
),
],
),
padding: const [Link](20),
child: Column(
crossAxisAlignment: [Link],
children: [
const Text(
'DESCRIBE YOUR TASK',
style: TextStyle(
fontSize: 10,
letterSpacing: 1.2,
fontWeight: FontWeight.w600,
color: muted,
),
),
const SizedBox(height: 10),
// TextField
Container(
decoration: BoxDecoration(
color: const Color(0xFFF1EEF9),
borderRadius: [Link](16),
),
child: TextField(
controller: _ctrl,
maxLines: 5,
style: const TextStyle(
fontSize: 13,
color: foreground,
),
decoration: const InputDecoration(
hintText:
'e.g. Complete the quarterly report for the client meeting
tomorrow...',
hintStyle: TextStyle(
color: muted,
fontSize: 13,
),
border: [Link],
contentPadding: [Link](16),
),
),
),
const SizedBox(height: 16),
// Predict Button
SizedBox(
width: [Link],
height: 56,
child: DecoratedBox(
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [primaryColor, accentColor],
),
borderRadius: [Link](16),
boxShadow: [
BoxShadow(
color: [Link](0.3),
blurRadius: 16,
offset: const Offset(0, 6),
),
],
),
child: ElevatedButton(
onPressed: _predict,
style: [Link](
backgroundColor: [Link],
shadowColor: [Link],
shape: RoundedRectangleBorder(
borderRadius: [Link](16),
),
),
child: const Row(
mainAxisAlignment: [Link],
children: [
Icon(Icons.auto_awesome_rounded,
color: [Link], size: 20),
SizedBox(width: 8),
Text(
'Predict Priority',
style: TextStyle(
color: [Link],
fontSize: 16,
fontWeight: [Link],
),
),
SizedBox(width: 8),
Icon(Icons.arrow_forward_rounded,
color: [Link], size: 18),
],
),
),
),
),
],
),
),
),

const SizedBox(height: 24),

// ── Feature Cards Row ──


Padding(
padding: const [Link](horizontal: 20),
child: Row(
children: [Link](_features.length, (i) {
final f = _features[i];
return Expanded(
child: Container(
margin: [Link](right: i < 2 ? 8 : 0),
decoration: BoxDecoration(
color: cardColor,
borderRadius: [Link](16),
border: [Link](
color: [Link](0.05),
),
),
padding: const [Link](12),
child: Column(
children: [
Container(
width: 40,
height: 40,
decoration: BoxDecoration(
color: [Link](0.1),
borderRadius: [Link](12),
),
child: Icon(
f['icon'] as IconData,
color: primaryColor,
size: 20,
),
),
const SizedBox(height: 8),
Text(
f['title']!,
textAlign: [Link],
style: const TextStyle(
fontSize: 10,
fontWeight: [Link],
color: foreground,
),
),
const SizedBox(height: 2),
Text(
f['desc']!,
textAlign: [Link],
style: const TextStyle(
fontSize: 9,
color: muted,
),
),
],
),
),
);
}),
),
),

const SizedBox(height: 90), // space for bottom nav


],
),
),
),
// ── Bottom Nav ──
bottomNavigationBar: _BottomNav(currentIndex: 0),
);
}
}

class _BottomNav extends StatelessWidget {


final int currentIndex;
const _BottomNav({required [Link]});

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);
const muted = Colors.black38;

return Container(
color: const Color(0xFFF8F7FC),
padding: const [Link](16, 0, 16, 16),
child: Container(
height: 64,
decoration: BoxDecoration(
color: [Link],
borderRadius: [Link](20),
border: [Link](color: [Link](0.05)),
boxShadow: [
BoxShadow(
color: [Link](0.07),
blurRadius: 20,
offset: const Offset(0, 4),
),
],
),
child: Row(
children: [
_NavItem(
icon: Icons.checklist_rounded,
label: 'Tasks',
isActive: currentIndex == 0,
onTap: () {},
),
_NavItem(
icon: Icons.settings_rounded,
label: 'Settings',
isActive: currentIndex == 1,
onTap: () => [Link](context).pushNamed('/settings'),
),
],
),
),
);
}
}

class _NavItem extends StatelessWidget {


final IconData icon;
final String label;
final bool isActive;
final VoidCallback onTap;

const _NavItem({
required [Link],
required [Link],
required [Link],
required [Link],
});

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);
const muted = Colors.black38;

return Expanded(
child: GestureDetector(
onTap: onTap,
behavior: [Link],
child: AnimatedContainer(
duration: const Duration(milliseconds: 200),
margin: const [Link](6),
decoration: BoxDecoration(
color: isActive
? [Link](0.1)
: [Link],
borderRadius: [Link](14),
),
child: Column(
mainAxisAlignment: [Link],
children: [
Icon(icon,
color: isActive ? primaryColor : muted, size: 22),
const SizedBox(height: 2),
Text(
label,
style: TextStyle(
fontSize: 11,
fontWeight:
isActive ? [Link] : [Link],
color: isActive ? primaryColor : muted,
),
),
],
),
),
),
);
}
}

📱 Screen 3 — result_screen.dart
import 'package:flutter/[Link]';

class ResultScreen extends StatefulWidget {


final String task;
const ResultScreen({[Link], required [Link]});

@override
State<ResultScreen> createState() => _ResultScreenState();
}

class _ResultScreenState extends State<ResultScreen> {


bool _loading = true;
Map<String, dynamic>? _result;

@override
void initState() {
[Link]();
_predict();
}

// 🔁 Replace this with your real AI API call


Future<void> _predict() async {
setState(() => _loading = true);
await [Link](const Duration(seconds: 2));
setState(() {
_result = {
'priority': 'High',
'reason':
'This task involves a deadline-sensitive deliverable with direct client impact.',
'urgency_score': 85,
'tips': [
'Break the task into smaller subtasks.',
'Use a 2-hour focused work block.',
'Start with the most critical section first.',
],
};
_loading = false;
});
}

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);
const accentColor = Color(0xFF3B82F6);
const bgColor = Color(0xFFF8F7FC);
const cardColor = [Link];
const foreground = Color(0xFF14101F);
const muted = Colors.black38;

return Scaffold(
backgroundColor: bgColor,
body: SafeArea(
child: SingleChildScrollView(
padding: const [Link](20, 24, 20, 24),
child: Column(
crossAxisAlignment: [Link],
children: [
// ── Header ──
Row(
children: [
GestureDetector(
onTap: () => [Link](context).pop(),
child: Container(
width: 40,
height: 40,
decoration: BoxDecoration(
color: cardColor,
borderRadius: [Link](12),
border: [Link](
color: [Link](0.06)),
),
child: const Icon(Icons.arrow_back_rounded,
color: foreground, size: 20),
),
),
const SizedBox(width: 12),
const Column(
crossAxisAlignment: [Link],
children: [
Text(
'Analysis Result',
style: TextStyle(
fontSize: 18,
fontWeight: [Link],
color: foreground,
),
),
Text(
'AI Priority Prediction',
style: TextStyle(fontSize: 11, color: muted),
),
],
),
],
),
const SizedBox(height: 24),

// ── Loading State ──
if (_loading)
Center(
child: Padding(
padding: const [Link](vertical: 80),
child: Column(
children: [
Container(
width: 80,
height: 80,
decoration: BoxDecoration(
borderRadius: [Link](24),
gradient: const LinearGradient(
colors: [primaryColor, accentColor],
),
boxShadow: [
BoxShadow(
color: [Link](0.4),
blurRadius: 24,
offset: const Offset(0, 8),
),
],
),
child: const Icon(Icons.auto_awesome_rounded,
color: [Link], size: 36),
),
const SizedBox(height: 20),
const Text(
'Analyzing your task...',
style: TextStyle(fontSize: 13, color: muted),
),
const SizedBox(height: 16),
const CircularProgressIndicator(
color: primaryColor,
strokeWidth: 2,
),
],
),
),
),
// ── Result State ──
if (!_loading && _result != null) ...[
// Priority Hero Card
_PriorityCard(result: _result!),
const SizedBox(height: 16),

// Task Card
_TaskCard(
task: [Link],
priority: _result!['priority'],
reason: _result!['reason'],
),
const SizedBox(height: 16),

// Tips Card
_TipsCard(tips: List<String>.from(_result!['tips'])),
const SizedBox(height: 20),

// Action Buttons
Row(
children: [
Expanded(
child: [Link](
onPressed: _predict,
icon: const Icon(Icons.refresh_rounded, size: 18),
label: const Text('Re-analyze'),
style: [Link](
foregroundColor: foreground,
side: BorderSide(
color: [Link](0.15)),
minimumSize: const Size(0, 50),
shape: RoundedRectangleBorder(
borderRadius: [Link](16),
),
),
),
),
const SizedBox(width: 12),
Expanded(
child: DecoratedBox(
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [primaryColor, accentColor],
),
borderRadius: [Link](16),
),
child: ElevatedButton(
onPressed: () => [Link](context).pop(),
style: [Link](
backgroundColor: [Link],
shadowColor: [Link],
minimumSize: const Size(0, 50),
shape: RoundedRectangleBorder(
borderRadius: [Link](16),
),
),
child: const Text(
'New Task',
style: TextStyle(
color: [Link],
fontWeight: [Link],
),
),
),
),
),
],
),
],
const SizedBox(height: 80),
],
),
),
),
bottomNavigationBar: _BottomNav(currentIndex: 0),
);
}
}

// ── Priority Hero Card ──


class _PriorityCard extends StatelessWidget {
final Map<String, dynamic> result;
const _PriorityCard({required [Link]});

@override
Widget build(BuildContext context) {
final priority = result['priority'] as String;
final urgency = (result['urgency_score'] as num).toDouble();

final Map<String, Color> pColors = {


'High': const Color(0xFFEF4444),
'Medium': const Color(0xFFF59E0B),
'Low': const Color(0xFF10B981),
};
final Map<String, List<Color>> pGradients = {
'High': [const Color(0xFFEF4444), const Color(0xFFEC4899)],
'Medium': [const Color(0xFFF59E0B), const Color(0xFFF97316)],
'Low': [const Color(0xFF10B981), const Color(0xFF22C55E)],
};
final Map<String, String> pEmoji = {
'High': '🔴',
'Medium': '🟡',
'Low': '🟢',
};

final color = pColors[priority] ?? const Color(0xFFF59E0B);


final gradient = pGradients[priority] ??
[const Color(0xFFF59E0B), const Color(0xFFF97316)];
final emoji = pEmoji[priority] ?? '🟡';

return Container(
width: [Link],
decoration: BoxDecoration(
color: [Link],
borderRadius: [Link](24),
boxShadow: [
BoxShadow(
color: [Link](0.12),
blurRadius: 20,
offset: const Offset(0, 6),
),
],
),
padding: const [Link](24),
child: Column(
children: [
Text(emoji, style: const TextStyle(fontSize: 48)),
const SizedBox(height: 8),
ShaderMask(
shaderCallback: (b) =>
LinearGradient(colors: gradient).createShader(b),
child: Text(
'$priority Priority',
style: const TextStyle(
fontSize: 28,
fontWeight: [Link],
color: [Link],
),
),
),
const SizedBox(height: 20),
Row(
mainAxisAlignment: [Link],
children: [
const Text('Urgency Score',
style: TextStyle(fontSize: 11, color: Colors.black38)),
Text(
'${result['urgency_score'].toInt()}/100',
style: const TextStyle(
fontSize: 11,
fontWeight: [Link],
color: Color(0xFF14101F),
),
),
],
),
const SizedBox(height: 8),
ClipRRect(
borderRadius: [Link](8),
child: TweenAnimationBuilder<double>(
tween: Tween(begin: 0, end: urgency / 100),
duration: const Duration(milliseconds: 1000),
curve: [Link],
builder: (_, val, __) => LinearProgressIndicator(
value: val,
minHeight: 10,
backgroundColor: [Link](0.07),
valueColor: AlwaysStoppedAnimation<Color>(color),
),
),
),
],
),
);
}
}

// ── Task Card ──
class _TaskCard extends StatelessWidget {
final String task, priority, reason;
const _TaskCard(
{required [Link], required [Link], required [Link]});

@override
Widget build(BuildContext context) {
final Map<String, Color> pColors = {
'High': const Color(0xFFEF4444),
'Medium': const Color(0xFFF59E0B),
'Low': const Color(0xFF10B981),
};
final color = pColors[priority] ?? const Color(0xFFF59E0B);

return Container(
decoration: BoxDecoration(
color: [Link](0.08),
borderRadius: [Link](20),
border: [Link](color: [Link](0.2)),
),
padding: const [Link](20),
child: Column(
crossAxisAlignment: [Link],
children: [
Row(
crossAxisAlignment: [Link],
children: [
Expanded(
child: Text(
task,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Color(0xFF14101F),
height: 1.5,
),
),
),
const SizedBox(width: 8),
Container(
padding:
const [Link](horizontal: 12, vertical: 4),
decoration: BoxDecoration(
color: [Link](0.1),
borderRadius: [Link](20),
border: [Link](color: [Link](0.3)),
),
child: Text(
priority,
style: TextStyle(
fontSize: 11,
fontWeight: [Link],
color: color,
),
),
),
],
),
const SizedBox(height: 10),
Row(
crossAxisAlignment: [Link],
children: [
const Icon(Icons.auto_awesome_rounded,
color: Color(0xFF7C3AED), size: 14),
const SizedBox(width: 6),
Expanded(
child: Text(
reason,
style: const TextStyle(
fontSize: 12,
color: Colors.black45,
height: 1.5,
),
),
),
],
),
],
),
);
}
}

// ── Tips Card ──
class _TipsCard extends StatelessWidget {
final List<String> tips;
const _TipsCard({required [Link]});

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);

return Container(
decoration: BoxDecoration(
color: [Link],
borderRadius: [Link](24),
),
padding: const [Link](20),
child: Column(
crossAxisAlignment: [Link],
children: [
const Row(
children: [
Icon(Icons.auto_awesome_rounded,
color: primaryColor, size: 16),
SizedBox(width: 8),
Text(
'AI Tips',
style: TextStyle(
fontSize: 14,
fontWeight: [Link],
color: Color(0xFF14101F),
),
),
],
),
const SizedBox(height: 12),
...[Link]([Link], (i) {
return Padding(
padding: const [Link](bottom: 10),
child: Row(
crossAxisAlignment: [Link],
children: [
Container(
width: 24,
height: 24,
decoration: BoxDecoration(
color: [Link](0.1),
borderRadius: [Link](8),
),
child: Center(
child: Text(
'${i + 1}',
style: const TextStyle(
fontSize: 11,
fontWeight: [Link],
color: primaryColor,
),
),
),
),
const SizedBox(width: 10),
Expanded(
child: Text(
tips[i],
style: const TextStyle(
fontSize: 12,
color: Colors.black45,
height: 1.5,
),
),
),
],
),
);
}),
],
),
);
}
}

// ── Bottom Nav ──
class _BottomNav extends StatelessWidget {
final int currentIndex;
const _BottomNav({required [Link]});

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);
const muted = Colors.black38;

return Container(
color: const Color(0xFFF8F7FC),
padding: const [Link](16, 0, 16, 16),
child: Container(
height: 64,
decoration: BoxDecoration(
color: [Link],
borderRadius: [Link](20),
border: [Link](color: [Link](0.05)),
boxShadow: [
BoxShadow(
color: [Link](0.07),
blurRadius: 20,
offset: const Offset(0, 4),
),
],
),
child: Row(
children: [
_Item(
icon: Icons.checklist_rounded,
label: 'Tasks',
isActive: currentIndex == 0,
onTap: () => [Link](context).pop(),
),
_Item(
icon: Icons.settings_rounded,
label: 'Settings',
isActive: currentIndex == 1,
onTap: () => [Link](context).pushNamed('/settings'),
),
],
),
),
);
}
}

class _Item extends StatelessWidget {


final IconData icon;
final String label;
final bool isActive;
final VoidCallback onTap;
const _Item(
{required [Link],
required [Link],
required [Link],
required [Link]});

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);
const muted = Colors.black38;
return Expanded(
child: GestureDetector(
onTap: onTap,
behavior: [Link],
child: AnimatedContainer(
duration: const Duration(milliseconds: 200),
margin: const [Link](6),
decoration: BoxDecoration(
color: isActive
? [Link](0.1)
: [Link],
borderRadius: [Link](14),
),
child: Column(
mainAxisAlignment: [Link],
children: [
Icon(icon,
color: isActive ? primaryColor : muted, size: 22),
const SizedBox(height: 2),
Text(label,
style: TextStyle(
fontSize: 11,
fontWeight:
isActive ? [Link] : [Link],
color: isActive ? primaryColor : muted,
)),
],
),
),
),
);
}
}

📱 Screen 4 — settings_screen.dart
import 'package:flutter/[Link]';

class SettingsScreen extends StatefulWidget {


const SettingsScreen({[Link]});

@override
State<SettingsScreen> createState() => _SettingsScreenState();
}

class _SettingsScreenState extends State<SettingsScreen> {


bool _darkMode = false;
int? _expandedFaq;

final List<Map<String, String>> _faqs = [


{
'q': 'How does AI predict priority?',
'a':
'PriorityPlus uses advanced AI to analyze your task, considering deadlines, urgency keywords,
complexity, and impact.',
},
{
'q': 'Can I re-analyze a task?',
'a':
"Yes! On the result screen, tap 'Re-analyze' to get a fresh prediction.",
},
{
'q': 'What do the priority levels mean?',
'a':
'High = immediate attention, Medium = should be done soon, Low = can be scheduled.',
},
{
'q': 'Is my data private?',
'a':
'Yes. Tasks are processed in real-time and not stored permanently.',
},
];

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);
const accentColor = Color(0xFF3B82F6);
const bgColor = Color(0xFFF8F7FC);
const cardColor = [Link];
const foreground = Color(0xFF14101F);
const muted = Colors.black38;

return Scaffold(
backgroundColor: bgColor,
body: SafeArea(
child: SingleChildScrollView(
padding: const [Link](20, 24, 20, 24),
child: Column(
crossAxisAlignment: [Link],
children: [
// ── Header ──
const Text(
'Settings',
style: TextStyle(
fontSize: 22,
fontWeight: [Link],
color: foreground,
),
),
const SizedBox(height: 4),
const Text(
'Customize your experience',
style: TextStyle(fontSize: 13, color: muted),
),
const SizedBox(height: 20),

// ── App Info Card ──


_card(
child: Row(
children: [
Container(
width: 56,
height: 56,
decoration: BoxDecoration(
borderRadius: [Link](14),
gradient: const LinearGradient(
colors: [primaryColor, accentColor]),
boxShadow: [
BoxShadow(
color: [Link](0.25),
blurRadius: 12,
offset: const Offset(0, 4),
),
],
),
child: const Center(
child: Text(
'P+',
style: TextStyle(
color: [Link],
fontWeight: [Link],
fontSize: 20,
),
),
),
),
const SizedBox(width: 16),
const Column(
crossAxisAlignment: [Link],
children: [
Text(
'PriorityPlus',
style: TextStyle(
fontSize: 16,
fontWeight: [Link],
color: foreground,
),
),
Text(
'AI Task Priority Predictor',
style: TextStyle(fontSize: 11, color: muted),
),
Text(
'Version 1.0.0',
style: TextStyle(
fontSize: 10, color: primaryColor),
),
],
),
],
),
),
const SizedBox(height: 16),

// ── Appearance Card ──
_card(
child: Column(
crossAxisAlignment: [Link],
children: [
const Text(
'APPEARANCE',
style: TextStyle(
fontSize: 10,
letterSpacing: 1.2,
fontWeight: FontWeight.w600,
color: muted,
),
),
const SizedBox(height: 16),
Row(
children: [
Container(
width: 40,
height: 40,
decoration: BoxDecoration(
color: [Link](0.1),
borderRadius: [Link](12),
),
child: Icon(
_darkMode
? Icons.nightlight_round
: Icons.wb_sunny_rounded,
color: primaryColor,
size: 20,
),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: [Link],
children: [
const Text(
'Dark Mode',
style: TextStyle(
fontSize: 14,
color: foreground,
fontWeight: FontWeight.w500,
),
),
Text(
_darkMode
? 'Dark theme active'
: 'Light theme active',
style: const TextStyle(
fontSize: 11, color: muted),
),
],
),
),
Switch(
value: _darkMode,
onChanged: (val) =>
setState(() => _darkMode = val),
activeColor: primaryColor,
),
],
),
],
),
),
const SizedBox(height: 16),

// ── Support Card ──
_card(
child: Column(
crossAxisAlignment: [Link],
children: [
const Text(
'SUPPORT',
style: TextStyle(
fontSize: 10,
letterSpacing: 1.2,
fontWeight: FontWeight.w600,
color: muted,
),
),
const SizedBox(height: 8),
...[
{
'icon': Icons.help_outline_rounded,
'label': 'Help & FAQ',
'isFaq': true
},
{
'icon': Icons.shield_outlined,
'label': 'Privacy Policy',
'isFaq': false
},
{
'icon': Icons.star_outline_rounded,
'label': 'Rate the App',
'isFaq': false
},
{
'icon': Icons.chat_bubble_outline_rounded,
'label': 'Send Feedback',
'isFaq': false
},
].map((item) {
return InkWell(
onTap: (item['isFaq'] == true)
? () => _showFaqSheet(context)
: null,
borderRadius: [Link](12),
child: Padding(
padding: const [Link](vertical: 6),
child: Row(
children: [
Container(
width: 36,
height: 36,
decoration: BoxDecoration(
color: [Link](0.1),
borderRadius: [Link](10),
),
child: Icon(
item['icon'] as IconData,
color: primaryColor,
size: 18,
),
),
const SizedBox(width: 12),
Expanded(
child: Text(
item['label'] as String,
style: const TextStyle(
fontSize: 13, color: foreground),
),
),
const Icon(Icons.chevron_right_rounded,
color: muted, size: 18),
],
),
),
);
}).toList(),
],
),
),
const SizedBox(height: 20),

// ── Credits ──
Center(
child: Column(
children: [
ShaderMask(
shaderCallback: (b) => const LinearGradient(
colors: [primaryColor, accentColor],
).createShader(b),
child: const Text(
'Powered by AI Technology',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: [Link],
),
),
),
const SizedBox(height: 4),
const Text(
'Made with ❤️ by PriorityPlus Team',
style: TextStyle(fontSize: 10, color: muted),
),
],
),
),
const SizedBox(height: 80),
],
),
),
),
bottomNavigationBar: _BottomNav(currentIndex: 1),
);
}

Widget _card({required Widget child}) {


return Container(
width: [Link],
decoration: BoxDecoration(
color: [Link],
borderRadius: [Link](24),
border: [Link](color: [Link](0.04)),
boxShadow: [
BoxShadow(
color: [Link](0.03),
blurRadius: 12,
offset: const Offset(0, 4),
),
],
),
padding: const [Link](20),
child: child,
);
}

void _showFaqSheet(BuildContext context) {


const primaryColor = Color(0xFF7C3AED);
const foreground = Color(0xFF14101F);
const muted = Colors.black38;

showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: [Link],
builder: (_) {
return StatefulBuilder(builder: (ctx, setS) {
return Container(
constraints: BoxConstraints(
maxHeight: [Link](context).[Link] * 0.8,
),
decoration: const BoxDecoration(
color: [Link],
borderRadius:
[Link](top: [Link](24)),
),
child: Column(
children: [
Container(
width: 40,
height: 4,
margin: const [Link](vertical: 12),
decoration: BoxDecoration(
color: Colors.black12,
borderRadius: [Link](2),
),
),
const Padding(
padding: [Link](20, 0, 20, 16),
child: Row(
children: [
Icon(Icons.help_outline_rounded,
color: primaryColor, size: 20),
SizedBox(width: 8),
Text(
'Help & FAQ',
style: TextStyle(
fontSize: 18,
fontWeight: [Link],
color: foreground,
),
),
],
),
),
const Divider(height: 1),
Expanded(
child: [Link](
padding: const [Link](16),
itemCount: _faqs.length,
itemBuilder: (_, i) {
final isExp = _expandedFaq == i;
return GestureDetector(
onTap: () =>
setS(() => _expandedFaq = isExp ? null : i),
child: Container(
margin: const [Link](bottom: 10),
decoration: BoxDecoration(
color: [Link](0.03),
borderRadius: [Link](16),
),
padding: const [Link](16),
child: Column(
crossAxisAlignment: [Link],
children: [
Row(
children: [
Expanded(
child: Text(
_faqs[i]['q']!,
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.w500,
color: foreground,
),
),
),
Icon(
isExp
? Icons.expand_less_rounded
: Icons.chevron_right_rounded,
color: muted,
size: 18,
),
],
),
if (isExp) ...[
const SizedBox(height: 8),
Text(
_faqs[i]['a']!,
style: const TextStyle(
fontSize: 12,
color: muted,
height: 1.5,
),
),
],
],
),
),
);
},
),
),
],
),
);
});
},
);
}
}

class _BottomNav extends StatelessWidget {


final int currentIndex;
const _BottomNav({required [Link]});

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);
const muted = Colors.black38;

return Container(
color: const Color(0xFFF8F7FC),
padding: const [Link](16, 0, 16, 16),
child: Container(
height: 64,
decoration: BoxDecoration(
color: [Link],
borderRadius: [Link](20),
border: [Link](color: [Link](0.05)),
boxShadow: [
BoxShadow(
color: [Link](0.07),
blurRadius: 20,
offset: const Offset(0, 4),
),
],
),
child: Row(
children: [
_Item(
icon: Icons.checklist_rounded,
label: 'Tasks',
isActive: currentIndex == 0,
onTap: () => [Link](context).pop(),
),
_Item(
icon: Icons.settings_rounded,
label: 'Settings',
isActive: currentIndex == 1,
onTap: () {},
),
],
),
),
);
}
}

class _Item extends StatelessWidget {


final IconData icon;
final String label;
final bool isActive;
final VoidCallback onTap;
const _Item(
{required [Link],
required [Link],
required [Link],
required [Link]});

@override
Widget build(BuildContext context) {
const primaryColor = Color(0xFF7C3AED);
const muted = Colors.black38;
return Expanded(
child: GestureDetector(
onTap: onTap,
behavior: [Link],
child: AnimatedContainer(
duration: const Duration(milliseconds: 200),
margin: const [Link](6),
decoration: BoxDecoration(
color: isActive
? [Link](0.1)
: [Link],
borderRadius: [Link](14),
),
child: Column(
mainAxisAlignment: [Link],
children: [
Icon(icon,
color: isActive ? primaryColor : muted, size: 22),
const SizedBox(height: 2),
Text(label,
style: TextStyle(
fontSize: 11,
fontWeight:
isActive ? [Link] : [Link],
color: isActive ? primaryColor : muted,
)),
],
),
),
),
);
}
}

📁 Folder Structure
lib/
├── [Link] ← Routes setup
├── splash_screen.dart ← Screen 1
├── task_input_screen.dart ← Screen 2
├── result_screen.dart ← Screen 3
└── settings_screen.dart ← Screen 4

[Link] (Routes)
import 'package:flutter/[Link]';
import 'splash_screen.dart';
import 'task_input_screen.dart';
import 'result_screen.dart';
import 'settings_screen.dart';
void main() => runApp(const PriorityPlusApp());

class PriorityPlusApp extends StatelessWidget {


const PriorityPlusApp({[Link]});

@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'PriorityPlus',
debugShowCheckedModeBanner: false,
theme: ThemeData(
useMaterial3: true,
fontFamily: 'Inter',
colorScheme: [Link](seedColor: const Color(0xFF7C3AED)),
),
initialRoute: '/',
routes: {
'/': (_) => const SplashScreen(),
'/home': (_) => const TaskInputScreen(),
'/settings': (_) => const SettingsScreen(),
},
onGenerateRoute: (settings) {
if ([Link] == '/result') {
final task = [Link] as String;
return MaterialPageRoute(
builder: (_) => ResultScreen(task: task),
);
}
return null;
},
);
}
}

Yeh lo — 5 alag alag files, same exact UI, copy-paste ready! 🎉

You might also like