Skip to content

Commit

Permalink
sales_dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
justkawal committed Aug 6, 2024
1 parent 9878014 commit cd1cbd3
Show file tree
Hide file tree
Showing 63 changed files with 4,136 additions and 0 deletions.
43 changes: 43 additions & 0 deletions sales_dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
36 changes: 36 additions & 0 deletions sales_dashboard/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: "b0850beeb25f6d5b10426284f506557f66181b36"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
- platform: android
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
- platform: ios
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
- platform: macos
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
base_revision: b0850beeb25f6d5b10426284f506557f66181b36

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
Binary file added sales_dashboard/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions sales_dashboard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# sales_dashboard

A new Flutter project.

## Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
12 changes: 12 additions & 0 deletions sales_dashboard/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
analyzer:
errors:
constant_identifier_names: ignore
deprecated_member_use: ignore
library_private_types_in_public_api: ignore
include: package:flutter_lints/flutter.yaml

linter:
rules:
use_super_parameters: false
prefer_const_constructors: false
prefer_const_literals_to_create_immutables: false
Binary file added sales_dashboard/assets/circular_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sales_dashboard/assets/profile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions sales_dashboard/lib/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import 'package:flutter/material.dart';
import 'package:sales_dashboard/pages/home_page.dart';
import 'package:window_manager/window_manager.dart';

const WINDOWSIZE = Size(1160, 800);

void main() async {
WidgetsFlutterBinding.ensureInitialized();
await windowManager.ensureInitialized();

const windowOptions = WindowOptions(
size: WINDOWSIZE,
minimumSize: WINDOWSIZE,
center: true,
backgroundColor: Colors.transparent,
skipTaskbar: false,
titleBarStyle: TitleBarStyle.hidden,
);
windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});

runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(),
);
}
}
36 changes: 36 additions & 0 deletions sales_dashboard/lib/models/bar_chart_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
class BarChartModel {
final List<Revenue> income;
final List<Revenue> expense;

const BarChartModel({
required this.income,
required this.expense,
});

static const dummyList = BarChartModel(
income: [
Revenue(amountPercent: 98),
Revenue(amountPercent: 75),
Revenue(amountPercent: 87),
Revenue(amountPercent: 90),
Revenue(amountPercent: 99),
Revenue(amountPercent: 91),
],
expense: [
Revenue(amountPercent: 77),
Revenue(amountPercent: 94),
Revenue(amountPercent: 72),
Revenue(amountPercent: 66),
Revenue(amountPercent: 88),
Revenue(amountPercent: 80),
],
);
}

class Revenue {
final double amountPercent;

const Revenue({
required this.amountPercent,
});
}
44 changes: 44 additions & 0 deletions sales_dashboard/lib/models/menu_item_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import 'package:flutter/cupertino.dart';

class MenuItemModel {
final String title;
final IconData iconData;
final int? messageCount;
final bool? showArrowDownIcon;

MenuItemModel({
required this.title,
required this.iconData,
this.messageCount = 0,
this.showArrowDownIcon = false,
});

static final dummyList = <MenuItemModel>[
MenuItemModel(
title: 'Overview',
iconData: CupertinoIcons.square_grid_2x2_fill,
),
MenuItemModel(
title: 'Statistics',
iconData: CupertinoIcons.chart_bar_square_fill,
),
MenuItemModel(
title: 'Customers',
iconData: CupertinoIcons.person_2_square_stack_fill,
),
MenuItemModel(
title: 'Product',
iconData: CupertinoIcons.cube_box_fill,
showArrowDownIcon: true,
),
MenuItemModel(
title: 'Messages',
iconData: CupertinoIcons.chat_bubble_2_fill,
messageCount: 16,
),
MenuItemModel(
title: 'Transactions',
iconData: CupertinoIcons.money_dollar_circle,
),
];
}
34 changes: 34 additions & 0 deletions sales_dashboard/lib/models/sales_report_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class SalesReportModel {
final List<Sales> sales;

const SalesReportModel({
required this.sales,
});

static const dummySalesReportModel = SalesReportModel(
sales: [
Sales(
productName: 'Product Launched',
quantity: 303,
),
Sales(
productName: 'Ongoing Product',
quantity: 200,
),
Sales(
productName: 'Product Sold',
quantity: 340,
),
],
);
}

class Sales {
final String productName;
final int quantity;

const Sales({
required this.productName,
required this.quantity,
});
}
96 changes: 96 additions & 0 deletions sales_dashboard/lib/models/transaction_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import 'package:flutter/cupertino.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

class TransactionModel {
final String title;
final String date;
final String transactionId;
final IconData icon;
final TransactionCompletionStatus status;

const TransactionModel({
required this.title,
required this.date,
required this.transactionId,
required this.icon,
required this.status,
});

static final transactionsList = [
TransactionModel(
title: 'Premium T-Shirt',
date: 'Jul 13th 2024',
transactionId: 'TRX9HJH2DJ30',
icon: FontAwesomeIcons.shirt,
status: TransactionCompletionStatus.Completed,
),
TransactionModel(
title: 'Playstation 5',
date: 'Jul 13th 2024',
transactionId: 'TRX9HJH2DJ30',
icon: FontAwesomeIcons.gamepad,
status: TransactionCompletionStatus.Pending,
),
TransactionModel(
title: 'Hoodie',
date: 'Jul 2nd 2024',
transactionId: 'TRX9HJH2DJ30',
icon: FontAwesomeIcons.tshirt,
status: TransactionCompletionStatus.Pending,
),
TransactionModel(
title: 'Lotse',
date: 'Jul 1nd 2024',
transactionId: 'TRX9HJH2DJ30',
icon: FontAwesomeIcons.coffee,
status: TransactionCompletionStatus.Completed,
),
TransactionModel(
title: 'iPhone 15 Pro Max',
date: 'June 25th 2024',
transactionId: 'TRX9HJH2DJ30',
icon: FontAwesomeIcons.mobileAlt,
status: TransactionCompletionStatus.Completed,
),
TransactionModel(
title: 'Starbucks',
date: 'June 20th 2024',
transactionId: 'TRX9HJH2DJ30',
icon: FontAwesomeIcons.coffee,
status: TransactionCompletionStatus.Completed,
),
TransactionModel(
title: 'Tesla T-Shirt',
date: 'June 15th 2024',
transactionId: 'TRX9HJH2DJ30',
icon: FontAwesomeIcons.tshirt,
status: TransactionCompletionStatus.Completed,
),
TransactionModel(
title: 'Apple Watch',
date: 'June 10th 2024',
transactionId: 'TRX9HJH2DJ30',
icon: FontAwesomeIcons.apple,
status: TransactionCompletionStatus.Completed,
),
TransactionModel(
title: 'Asus Zenbook',
date: 'June 5th 2024',
transactionId: 'TRX9HJH2DJ30',
icon: FontAwesomeIcons.laptop,
status: TransactionCompletionStatus.Completed,
),
TransactionModel(
title: 'KFC',
date: 'June 1st 2024',
transactionId: 'TRX9HJH2DJ30',
icon: FontAwesomeIcons.hamburger,
status: TransactionCompletionStatus.Completed,
),
];
}

enum TransactionCompletionStatus {
Completed,
Pending,
}
Loading

0 comments on commit cd1cbd3

Please sign in to comment.