rd-android-app/lib/screens/report/sales_data_screen.dart
2024-08-26 11:04:37 +05:30

191 lines
7.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';
class SalesDataScreen extends StatefulWidget {
const SalesDataScreen({super.key});
@override
State<SalesDataScreen> createState() => _SalesDataScreenState();
}
class _SalesDataScreenState extends State<SalesDataScreen> {
final List<String> _filterList = [
"Order Status",
"Date Range",
];
@override
Widget build(BuildContext context) {
return Scaffold(
extendBodyBehindAppBar: true,
appBar: AppBar(
centerTitle: true,
backgroundColor: Colors.transparent,
elevation: 0,
leading: GestureDetector(
onTap: () {},
child: Padding(
padding: const EdgeInsets.all(16.0),
child: SvgPicture.asset(
'assets/svg/menu.svg',
),
),
),
actions: [
GestureDetector(
onTap: () => Get.back(),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset(
'assets/svg/back_arrow.svg',
),
),
),
],
title: const Text(
"Sales Data Report",
),
),
body: Stack(
fit: StackFit.expand,
children: [
Image.asset(
'assets/images/image_1.png',
fit: BoxFit.cover,
),
SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(height: Get.height * 0.02),
Card(
margin: const EdgeInsets.symmetric(horizontal: 18),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(19),
side: const BorderSide(color: Color(0xFFFDFDFD)),
),
color: const Color(0xFFB4D1E5).withOpacity(0.9),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
height: Get.height * 0.05,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
itemCount: _filterList.length,
itemBuilder: (context, index) => Padding(
padding:
const EdgeInsets.symmetric(horizontal: 4),
child: Chip(
label: Text(
_filterList[index],
style: GoogleFonts.roboto(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
),
),
),
),
SizedBox(height: Get.height * 0.02),
SizedBox(
width: Get.width,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: Get.height * 0.4,
width: Get.width * 0.7,
decoration: BoxDecoration(
border: Border.all(
width: 4,
color: Colors.white,
),
borderRadius: BorderRadius.circular(15),
),
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Image.asset(
"assets/images/chart.png",
fit: BoxFit.cover,
),
),
),
),
),
SizedBox(height: Get.height * 0.02),
SizedBox(
width: Get.width,
child: Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding:
const EdgeInsets.fromLTRB(16, 8, 8, 0),
child: Text(
"Report Title: Sales Data Report",
style: GoogleFonts.roboto(
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
),
Padding(
padding:
const EdgeInsets.fromLTRB(16, 8, 8, 8),
child: Text(
"Description: Overview of sales data",
style: GoogleFonts.roboto(
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
),
SizedBox(
width: Get.width * 0.5,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
onPressed: (){},
style: ElevatedButton.styleFrom(
foregroundColor: Colors.white,
backgroundColor:
const Color(0xFF004791),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10),
),
),
child: Text(
"Generate Report",
style: GoogleFonts.roboto(
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
),
),
)
],
),
),
),
],
),
),
),
],
),
),
],
),
);
}
}