add frontend and put backend in seperate folder
This commit is contained in:
		
							
								
								
									
										289
									
								
								frontend/lib/models/daily_info_model.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										289
									
								
								frontend/lib/models/daily_info_model.dart
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,289 @@
 | 
			
		||||
import 'package:fl_chart/fl_chart.dart';
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
 | 
			
		||||
import '../core/constants/color_constants.dart';
 | 
			
		||||
 | 
			
		||||
class DailyInfoModel {
 | 
			
		||||
  IconData? icon;
 | 
			
		||||
  String? title;
 | 
			
		||||
  String? totalStorage;
 | 
			
		||||
  int? volumeData;
 | 
			
		||||
  int? percentage;
 | 
			
		||||
  Color? color;
 | 
			
		||||
  List<Color>? colors;
 | 
			
		||||
  List<FlSpot>? spots;
 | 
			
		||||
 | 
			
		||||
  DailyInfoModel({
 | 
			
		||||
    this.icon,
 | 
			
		||||
    this.title,
 | 
			
		||||
    this.totalStorage,
 | 
			
		||||
    this.volumeData,
 | 
			
		||||
    this.percentage,
 | 
			
		||||
    this.color,
 | 
			
		||||
    this.colors,
 | 
			
		||||
    this.spots,
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  DailyInfoModel.fromJson(Map<String, dynamic> json) {
 | 
			
		||||
    title = json['title'];
 | 
			
		||||
    volumeData = json['volumeData'];
 | 
			
		||||
    icon = json['icon'];
 | 
			
		||||
    totalStorage = json['totalStorage'];
 | 
			
		||||
    color = json['color'];
 | 
			
		||||
    percentage = json['percentage'];
 | 
			
		||||
    colors = json['colors'];
 | 
			
		||||
    spots = json['spots'];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  Map<String, dynamic> toJson() {
 | 
			
		||||
    final Map<String, dynamic> data = new Map<String, dynamic>();
 | 
			
		||||
    data['title'] = this.title;
 | 
			
		||||
    data['volumeData'] = this.volumeData;
 | 
			
		||||
    data['icon'] = this.icon;
 | 
			
		||||
    data['totalStorage'] = this.totalStorage;
 | 
			
		||||
    data['color'] = this.color;
 | 
			
		||||
    data['percentage'] = this.percentage;
 | 
			
		||||
    data['colors'] = this.colors;
 | 
			
		||||
    data['spots'] = this.spots;
 | 
			
		||||
    return data;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
List<DailyInfoModel> dailyDatas =
 | 
			
		||||
    dailyData.map((item) => DailyInfoModel.fromJson(item)).toList();
 | 
			
		||||
 | 
			
		||||
//List<FlSpot> spots = yValues.asMap().entries.map((e) {
 | 
			
		||||
//  return FlSpot(e.key.toDouble(), e.value);
 | 
			
		||||
//}).toList();
 | 
			
		||||
 | 
			
		||||
var dailyData = [
 | 
			
		||||
  {
 | 
			
		||||
    "title": "Employee",
 | 
			
		||||
    "volumeData": 1328,
 | 
			
		||||
    "icon": Icons.ac_unit,
 | 
			
		||||
    "totalStorage": "+ %20",
 | 
			
		||||
    "color": primaryColor,
 | 
			
		||||
    "percentage": 35,
 | 
			
		||||
    "colors": [
 | 
			
		||||
      Color(0xff23b6e6),
 | 
			
		||||
      Color(0xff02d39a),
 | 
			
		||||
    ],
 | 
			
		||||
    "spots": [
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        1,
 | 
			
		||||
        2,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        2,
 | 
			
		||||
        1.0,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        3,
 | 
			
		||||
        1.8,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        4,
 | 
			
		||||
        1.5,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        5,
 | 
			
		||||
        1.0,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        6,
 | 
			
		||||
        2.2,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        7,
 | 
			
		||||
        1.8,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        8,
 | 
			
		||||
        1.5,
 | 
			
		||||
      )
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "title": "On Leave",
 | 
			
		||||
    "volumeData": 1328,
 | 
			
		||||
    "icon": Icons.ac_unit,
 | 
			
		||||
    "totalStorage": "+ %5",
 | 
			
		||||
    "color": Color(0xFFFFA113),
 | 
			
		||||
    "percentage": 35,
 | 
			
		||||
    "colors": [Color(0xfff12711), Color(0xfff5af19)],
 | 
			
		||||
    "spots": [
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        1,
 | 
			
		||||
        1.3,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        2,
 | 
			
		||||
        1.0,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        3,
 | 
			
		||||
        4,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        4,
 | 
			
		||||
        1.5,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        5,
 | 
			
		||||
        1.0,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        6,
 | 
			
		||||
        3,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        7,
 | 
			
		||||
        1.8,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        8,
 | 
			
		||||
        1.5,
 | 
			
		||||
      )
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "title": "Onboarding",
 | 
			
		||||
    "volumeData": 1328,
 | 
			
		||||
    "icon": Icons.ac_unit,
 | 
			
		||||
    "totalStorage": "+ %8",
 | 
			
		||||
    "color": Color(0xFFA4CDFF),
 | 
			
		||||
    "percentage": 10,
 | 
			
		||||
    "colors": [Color(0xff2980B9), Color(0xff6DD5FA)],
 | 
			
		||||
    "spots": [
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        1,
 | 
			
		||||
        1.3,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        2,
 | 
			
		||||
        5,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        3,
 | 
			
		||||
        1.8,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        4,
 | 
			
		||||
        6,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        5,
 | 
			
		||||
        1.0,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        6,
 | 
			
		||||
        2.2,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        7,
 | 
			
		||||
        1.8,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        8,
 | 
			
		||||
        1,
 | 
			
		||||
      )
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "title": "Open Position",
 | 
			
		||||
    "volumeData": 1328,
 | 
			
		||||
    "icon": Icons.ac_unit,
 | 
			
		||||
    "totalStorage": "+ %8",
 | 
			
		||||
    "color": Color(0xFFd50000),
 | 
			
		||||
    "percentage": 10,
 | 
			
		||||
    "colors": [Color(0xff93291E), Color(0xffED213A)],
 | 
			
		||||
    "spots": [
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        1,
 | 
			
		||||
        3,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        2,
 | 
			
		||||
        4,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        3,
 | 
			
		||||
        1.8,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        4,
 | 
			
		||||
        1.5,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        5,
 | 
			
		||||
        1.0,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        6,
 | 
			
		||||
        2.2,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        7,
 | 
			
		||||
        1.8,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        8,
 | 
			
		||||
        1.5,
 | 
			
		||||
      )
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "title": "Efficiency",
 | 
			
		||||
    "volumeData": 5328,
 | 
			
		||||
    "icon": Icons.ac_unit,
 | 
			
		||||
    "totalStorage": "- %5",
 | 
			
		||||
    "color": Color(0xFF00F260),
 | 
			
		||||
    "percentage": 78,
 | 
			
		||||
    "colors": [Color(0xff0575E6), Color(0xff00F260)],
 | 
			
		||||
    "spots": [
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        1,
 | 
			
		||||
        1.3,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        2,
 | 
			
		||||
        1.0,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        3,
 | 
			
		||||
        1.8,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        4,
 | 
			
		||||
        1.5,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        5,
 | 
			
		||||
        1.0,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        6,
 | 
			
		||||
        2.2,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        7,
 | 
			
		||||
        1.8,
 | 
			
		||||
      ),
 | 
			
		||||
      FlSpot(
 | 
			
		||||
        8,
 | 
			
		||||
        1.5,
 | 
			
		||||
      )
 | 
			
		||||
    ]
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
//final List<double> yValues = [
 | 
			
		||||
//  2.3,
 | 
			
		||||
//  1.8,
 | 
			
		||||
//  1.9,
 | 
			
		||||
//  1.5,
 | 
			
		||||
//  1.0,
 | 
			
		||||
//  2.2,
 | 
			
		||||
//  1.8,
 | 
			
		||||
//  1.5,
 | 
			
		||||
//];
 | 
			
		||||
							
								
								
									
										64
									
								
								frontend/lib/models/slider_model.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								frontend/lib/models/slider_model.dart
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,64 @@
 | 
			
		||||
class SliderModel {
 | 
			
		||||
  String? image;
 | 
			
		||||
  String? text;
 | 
			
		||||
  String? altText;
 | 
			
		||||
  String? bAltText;
 | 
			
		||||
  String? productImage;
 | 
			
		||||
  int? kBackgroundColor;
 | 
			
		||||
 | 
			
		||||
  SliderModel(this.image, this.text, this.altText, this.bAltText,
 | 
			
		||||
      this.productImage, this.kBackgroundColor);
 | 
			
		||||
 | 
			
		||||
  SliderModel.fromJson(Map<String, dynamic> json) {
 | 
			
		||||
    image = json['image'];
 | 
			
		||||
    kBackgroundColor = json['kBackgroundColor'];
 | 
			
		||||
    text = json['text'];
 | 
			
		||||
    altText = json['altText'];
 | 
			
		||||
    bAltText = json['bAltText'];
 | 
			
		||||
    productImage = json['productImage'];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  Map<String, dynamic> toJson() {
 | 
			
		||||
    final Map<String, dynamic> data = new Map<String, dynamic>();
 | 
			
		||||
    data['image'] = this.image;
 | 
			
		||||
    data['kBackgroundColor'] = this.kBackgroundColor;
 | 
			
		||||
    data['text'] = this.text;
 | 
			
		||||
    data['altText'] = this.altText;
 | 
			
		||||
    data['bAltText'] = this.bAltText;
 | 
			
		||||
    data['productImage'] = this.productImage;
 | 
			
		||||
    return data;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
List<SliderModel> slides =
 | 
			
		||||
    slideData.map((item) => SliderModel.fromJson(item)).toList();
 | 
			
		||||
 | 
			
		||||
var slideData = [
 | 
			
		||||
  {
 | 
			
		||||
    "image": "assets/slides/background-1.jpeg",
 | 
			
		||||
    "kBackgroundColor": 0xFF2c614f,
 | 
			
		||||
    "text": "Welcome to the Smart Smart Admin Dashboard!",
 | 
			
		||||
    "altText": "You can access & track your services in real-time.",
 | 
			
		||||
    "bAltText": "Are you ready for the next generation AI supported Dashboard?",
 | 
			
		||||
    "productImage": "assets/images/mockup.png"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "image": "assets/slides/background-2.jpeg",
 | 
			
		||||
    "kBackgroundColor": 0xFF8a1a4c,
 | 
			
		||||
    "text": "¡Bienvenido al tablero Smart Admin Dashboard!",
 | 
			
		||||
    "altText": "Puede acceder y rastrear sus servicios en tiempo real.",
 | 
			
		||||
    "bAltText":
 | 
			
		||||
        "¿Estás listo para el panel de control impulsado por IA de próxima generación?",
 | 
			
		||||
    "productImage": "assets/images/mockup-2.png"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "image": "assets/slides/background-3.jpeg",
 | 
			
		||||
    "kBackgroundColor": 0xFF0ab3ec,
 | 
			
		||||
    "text": "Willkommen im Smart Admin Dashboard!",
 | 
			
		||||
    "altText":
 | 
			
		||||
        "Sie können in Echtzeit auf Ihre Dienste zugreifen und diese verfolgen.",
 | 
			
		||||
    "bAltText":
 | 
			
		||||
        "Sind Sie bereit für das AI-unterstützte Dashboard der nächsten Generation?",
 | 
			
		||||
    "productImage": "assets/images/mockup-3.png"
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
		Reference in New Issue
	
	Block a user