Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #31

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "URLShortener",
"program": "lib/main.dart",
"args": ["--verbose","--no-sound-null-safety"],
"request": "launch",
"type": "dart"
}
]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dart.devToolsBrowser": "default",
"git.ignoreLimitWarning": true
}
3 changes: 2 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30
compileSdkVersion(30)
buildToolsVersion("30.0.2")

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.5.10'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:4.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip
Binary file added assets/images/facebook.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 assets/images/github.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 assets/images/google.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 assets/images/ic_login.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 assets/images/ic_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 assets/images/illustration-1.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 assets/images/illustration-2.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 assets/images/login-image.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 assets/images/login_img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:admin/constants.dart';
import 'package:admin/controllers/MenuController.dart';
import 'package:admin/screens/main/main_screen.dart';
import 'package:admin/screens/main/login2_screen.dart';
import 'package:admin/screens/main/login_screen.dart';
import 'package:admin/screens/main/user_screen.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
Expand All @@ -15,7 +17,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Admin Panel',
title: 'NewsClub',
theme: ThemeData.dark().copyWith(
scaffoldBackgroundColor: bgColor,
textTheme: GoogleFonts.poppinsTextTheme(Theme.of(context).textTheme)
Expand All @@ -28,7 +30,8 @@ class MyApp extends StatelessWidget {
create: (context) => MenuController(),
),
],
child: MainScreen(),
//child: UserScreen(),
child: LoginPage(),
),
);
}
Expand Down
28 changes: 14 additions & 14 deletions lib/models/MyFiles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,35 @@ class CloudStorageInfo {

List demoMyFiles = [
CloudStorageInfo(
title: "Documents",
title: "CPM",
numOfFiles: 1328,
svgSrc: "assets/icons/one_drive.svg",
totalStorage: "1GB",
color: Color(0xFFA4CDFF),
percentage: 100,
),
CloudStorageInfo(
title: "Total de Visitas",
numOfFiles: 1328,
svgSrc: "assets/icons/Documents.svg",
totalStorage: "1.9GB",
color: primaryColor,
percentage: 35,
percentage: 100,
),
CloudStorageInfo(
title: "Google Drive",
title: "Ganancias",
numOfFiles: 1328,
svgSrc: "assets/icons/google_drive.svg",
totalStorage: "2.9GB",
color: Color(0xFFFFA113),
percentage: 35,
),
CloudStorageInfo(
title: "One Drive",
numOfFiles: 1328,
svgSrc: "assets/icons/one_drive.svg",
totalStorage: "1GB",
color: Color(0xFFA4CDFF),
percentage: 10,
percentage: 100,
),
CloudStorageInfo(
title: "Documents",
title: "Referidos",
numOfFiles: 5328,
svgSrc: "assets/icons/drop_box.svg",
totalStorage: "7.3GB",
color: Color(0xFF007EE5),
percentage: 78,
percentage: 100,
),
];
27 changes: 8 additions & 19 deletions lib/screens/dashboard/components/file_info_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,18 @@ class FileInfoCard extends StatelessWidget {
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
Text(
info.totalStorage!,
style: Theme.of(context)
.textTheme
.caption!
.copyWith(color: Colors.white),
),
ProgressLine(
color: info.color,
percentage: info.percentage,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"${info.numOfFiles} Files",
style: Theme.of(context)
.textTheme
.caption!
.copyWith(color: Colors.white70),
),
Text(
info.totalStorage!,
style: Theme.of(context)
.textTheme
.caption!
.copyWith(color: Colors.white),
),
],
)

],
),
);
Expand Down
8 changes: 5 additions & 3 deletions lib/screens/dashboard/components/header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ class Header extends StatelessWidget {
if (!Responsive.isDesktop(context))
IconButton(
icon: Icon(Icons.menu),
onPressed: context.read<MenuController>().controlMenu,
onPressed: () =>{
context.read<MenuController>().controlMenu,
},
),
if (!Responsive.isMobile(context))
Text(
"Dashboard",
"Resumen",
style: Theme.of(context).textTheme.headline6,
),
if (!Responsive.isMobile(context))
Expand Down Expand Up @@ -62,7 +64,7 @@ class ProfileCard extends StatelessWidget {
Padding(
padding:
const EdgeInsets.symmetric(horizontal: defaultPadding / 2),
child: Text("Angelina Jolie"),
child: Text("Luis Andres Puerto"),
),
Icon(Icons.keyboard_arrow_down),
],
Expand Down
60 changes: 60 additions & 0 deletions lib/screens/dashboard/components/login_details.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import 'package:flutter/material.dart';

import '../../../constants.dart';
import 'chart.dart';
import 'storage_info_card.dart';

class LoginDetails extends StatelessWidget {
const LoginDetails({
Key? key,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.all(250),
decoration: BoxDecoration(
color: secondaryColor,
borderRadius: const BorderRadius.all(Radius.circular(10)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Login Details",
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
SizedBox(height: defaultPadding),
Chart(),
StorageInfoCard(
svgSrc: "assets/icons/Documents.svg",
title: "Documents Files",
amountOfFiles: "1.3GB",
numOfFiles: 1328,
),
StorageInfoCard(
svgSrc: "assets/icons/media.svg",
title: "Media Files",
amountOfFiles: "15.3GB",
numOfFiles: 1328,
),
StorageInfoCard(
svgSrc: "assets/icons/folder.svg",
title: "Other Files",
amountOfFiles: "1.3GB",
numOfFiles: 1328,
),
StorageInfoCard(
svgSrc: "assets/icons/unknown.svg",
title: "Unknown",
amountOfFiles: "1.3GB",
numOfFiles: 140,
),
],
),
);
}
}
4 changes: 2 additions & 2 deletions lib/screens/dashboard/components/my_fields.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MyFiles extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"My Files",
"Mis Enlaces",
style: Theme.of(context).textTheme.subtitle1,
),
ElevatedButton.icon(
Expand All @@ -32,7 +32,7 @@ class MyFiles extends StatelessWidget {
),
onPressed: () {},
icon: Icon(Icons.add),
label: Text("Add New"),
label: Text("Nuevo Enlace"),
),
],
),
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/dashboard/components/my_files.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MyFiles extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"My Files",
"Mis Enlaces",
style: Theme.of(context).textTheme.subtitle1,
),
ElevatedButton.icon(
Expand All @@ -32,7 +32,7 @@ class MyFiles extends StatelessWidget {
),
onPressed: () {},
icon: Icon(Icons.add),
label: Text("Add New"),
label: Text("Nuevo Enlace"),
),
],
),
Expand Down
53 changes: 53 additions & 0 deletions lib/screens/dashboard/logindashboard_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import 'package:admin/responsive.dart';
import 'package:admin/screens/dashboard/components/login_details.dart';
import 'package:admin/screens/dashboard/components/my_fields.dart';
import 'package:flutter/material.dart';

import '../../constants.dart';
import 'components/header.dart';

import 'components/recent_files.dart';
import 'components/storage_details.dart';

class LoginDashboardScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SafeArea(
child: SingleChildScrollView(
padding: EdgeInsets.all(defaultPadding),
child: Column(
children: [
// Header(),
// SizedBox(height: defaultPadding),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
/*Expanded(
flex: 5,
child: Column(
children: [
MyFiles(),
SizedBox(height: defaultPadding),
RecentFiles(),
if (Responsive.isMobile(context))
SizedBox(height: defaultPadding),
if (Responsive.isMobile(context)) StarageDetails(),
],
),
),
if (!Responsive.isMobile(context))
SizedBox(width: defaultPadding),
// On Mobile means if the screen is less than 850 we dont want to show it
if (!Responsive.isMobile(context))*/
Expanded(
flex: 2,
child: LoginDetails(),
),
],
)
],
),
),
);
}
}
50 changes: 50 additions & 0 deletions lib/screens/dashboard/userdashboard_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import 'package:admin/responsive.dart';
import 'package:admin/screens/dashboard/components/my_fields.dart';
import 'package:flutter/material.dart';
import '../../constants.dart';
import 'components/header.dart';
import 'components/recent_files.dart';
import 'components/storage_details.dart';

class UserDashboardScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SafeArea(
child: SingleChildScrollView(
padding: EdgeInsets.all(defaultPadding),
child: Column(
children: [
Header(),
SizedBox(height: defaultPadding),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 5,
child: Column(
children: [
MyFiles(),
SizedBox(height: defaultPadding),
RecentFiles(),
if (Responsive.isMobile(context))
SizedBox(height: defaultPadding),
if (Responsive.isMobile(context)) StarageDetails(),
],
),
),
if (!Responsive.isMobile(context))
SizedBox(width: defaultPadding),
// On Mobile means if the screen is less than 850 we dont want to show it
if (!Responsive.isMobile(context))
Expanded(
flex: 2,
child: StarageDetails(),
),
],
)
],
),
),
);
}
}
Loading