Skip to content

Commit

Permalink
🤖 added bootstrap to minimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
shashiben committed Apr 22, 2021
1 parent c72992f commit 1f215aa
Show file tree
Hide file tree
Showing 35 changed files with 720 additions and 1,355 deletions.
22 changes: 11 additions & 11 deletions lib/app/colors.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import 'package:flutter/material.dart';

//** Theme Colors
const primaryColor = Color(0xFF2D4CC8);
const backgroundColor = Color(0xFFe6e7ee);
const surfaceColor = Color(0xFFe5e6ed);
// //** Theme Colors
// const primaryColor = Color(0xFF2D4CC8);
// const backgroundColor = Color(0xFFe6e7ee);
// const surfaceColor = Color(0xFFe5e6ed);

//** Text Colors
const Color textPrimaryColor = Color(0xFF31344b);
const Color textSecondaryColor = Color(0xFF53577b);
// //** Text Colors
// const Color textPrimaryColor = Color(0xFF31344b);
// const Color textSecondaryColor = Color(0xFF53577b);

const Color dividerColor = Colors.black54;
// const Color dividerColor = Colors.black54;

const Color successColor = Colors.green;
const Color failureColor = Colors.red;
// const Color successColor = Colors.green;
// const Color failureColor = Colors.red;

mixin lightColor {
//** Theme Colors
Expand All @@ -34,7 +34,7 @@ mixin darkColor {

//**Text Colors
static const Color textPrimaryColor = Color(0xFFCCD6F6);
static const Color textSecondaryColor = Colors.white60;
static const Color textSecondaryColor = Colors.white30;

static const Color dividerColor = Colors.white60;
}
22 changes: 21 additions & 1 deletion lib/app/configs.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:portfolio/app/icons.dart';
import 'package:portfolio/core/models/project.dart';
import 'package:portfolio/core/models/skill_display.dart';
import 'package:portfolio/core/models/skill_model.dart';
import 'package:portfolio/core/models/technologies.dart';
import 'package:portfolio/core/models/timeline_experience.dart';
Expand Down Expand Up @@ -40,6 +42,24 @@ mixin EducationDetails {

//*Personal details
mixin PersonalDetails {
static const List<SkillDisplay> skillDisplayList = [
SkillDisplay(
title: "Mobile Application Developement",
color: Color(0xFFE2A599),
iconData: SkillDisplayIcons.appIcon),
SkillDisplay(
title: "Full Stack Web Developement",
color: Color(0xFF5E57BB),
iconData: SkillDisplayIcons.websiteIcon),
SkillDisplay(
title: "AI/ML Engineering",
color: Color(0xFFE45447),
iconData: SkillDisplayIcons.mlIcon),
SkillDisplay(
title: "Database Management",
color: Color(0xFFFFB300),
iconData: SkillDisplayIcons.databaseIcon)
];
static const String resumeLink =
"https://drive.google.com/file/d/1zgGpQfz1sgvG-8eiCDXzmBIu59mJ7Jho/view?usp=sharing";
static const String whatsappLink = "https://wa.me/7997217156";
Expand Down Expand Up @@ -238,7 +258,7 @@ mixin PersonalDetails {

static String userName = "Shashi Kumar";
static String shortIntro =
"A dexterous builder for mobile and web application.";
"I’m Shashi Kumar and I’m a full stack developer, and I specialize in efficient Flutter Applications that just work across all platforms and browsers. I care deeply about building interfaces that are usable and pleasant for the most number of people possible.And my main motto whenever building any application is to always build pixel perfect high performant applications that provide user with a rich experience.";
static String intro =
"I started my career into developement as android developer.First I built android applications in native android.Later I heared about flutter which helps in building cross platform applications.After gaining experience in flutter,I applied to internships,through which I was able to learn communication skills and code architectures.After that I worked as a freelancer and gained experience of how to build applications in production level.Presently I'm focusing on web developement.I learnt MERN Stack.And working projects on it.";
}
7 changes: 7 additions & 0 deletions lib/app/icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,10 @@ mixin TechnologiesIcon {
static const IconData pythonIcon = FlutterIcons.language_python_mco;
static const IconData githubIcon = FlutterIcons.github_fea;
}

mixin SkillDisplayIcons {
static const IconData appIcon = FlutterIcons.device_mobile_oct;
static const IconData websiteIcon = FlutterIcons.laptop_mac_mco;
static const IconData mlIcon = FlutterIcons.brain_mco;
static const IconData databaseIcon = FlutterIcons.database_fea;
}
35 changes: 0 additions & 35 deletions lib/app/snackbar_config.dart

This file was deleted.

9 changes: 9 additions & 0 deletions lib/core/models/skill_display.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import 'package:flutter/cupertino.dart';

class SkillDisplay {
final String title;
final IconData iconData;
final Color color;

const SkillDisplay({this.title, this.iconData, this.color});
}
37 changes: 29 additions & 8 deletions lib/core/utils/ScreenUiHelper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter_neumorphic/flutter_neumorphic.dart';
import 'package:portfolio/app/colors.dart';
import 'package:portfolio/app/configs.dart';
import 'package:portfolio/core/utils/scaling.dart';
import 'package:responsive_builder/responsive_builder.dart';

class ScreenUiHelper {
double width;
Expand All @@ -18,6 +19,10 @@ class ScreenUiHelper {
TextStyle body;
TextStyle buttonStyle;

double headlineSize;
double titleSize;
double bodySize;

Color surfaceColor;
Color backgroundColor;
Color primaryColor;
Expand Down Expand Up @@ -67,16 +72,32 @@ class ScreenUiHelper {

scalingHelper = ScalingHelper(width: screenWidth);

headlineSize = getDeviceType(mediaQuery.size) == DeviceScreenType.desktop
? 24
: getDeviceType(mediaQuery.size) == DeviceScreenType.tablet
? 24
: 20;
titleSize = getDeviceType(mediaQuery.size) == DeviceScreenType.desktop
? 20
: getDeviceType(mediaQuery.size) == DeviceScreenType.tablet
? 18
: 16;
bodySize = getDeviceType(mediaQuery.size) == DeviceScreenType.desktop
? 14
: getDeviceType(mediaQuery.size) == DeviceScreenType.tablet
? 14
: 12;

headline = TextStyle(
fontWeight: FontWeight.bold,
color: textPrimaryColor,
fontSize: 24,
fontSize: headlineSize,
decoration: TextDecoration.none,
fontFamily: SystemProperties.titleFont);

title = TextStyle(
fontWeight: FontWeight.w600,
fontSize: 18,
fontSize: titleSize,
color: textPrimaryColor,
decoration: TextDecoration.none,
fontFamily: SystemProperties.titleFont);
Expand All @@ -85,35 +106,35 @@ class ScreenUiHelper {
decoration: TextDecoration.none,
fontWeight: FontWeight.bold,
color: textPrimaryColor,
fontSize: 14);
fontSize: bodySize);

body = TextStyle(
color: textSecondaryColor,
fontWeight: FontWeight.w400,
fontSize: 14,
fontSize: bodySize,
decoration: TextDecoration.none,
fontFamily: SystemProperties.fontName);

headlineTextStyle = NeumorphicTextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
fontSize: headlineSize,
decoration: TextDecoration.none,
fontFamily: SystemProperties.titleFont);

titleTextStyle = NeumorphicTextStyle(
fontWeight: FontWeight.w600,
fontSize: 18,
fontSize: titleSize,
decoration: TextDecoration.none,
fontFamily: SystemProperties.titleFont);
buttonTextStyle = NeumorphicTextStyle(
fontFamily: SystemProperties.titleFont,
decoration: TextDecoration.none,
fontWeight: FontWeight.bold,
fontSize: 14);
fontSize: bodySize);

bodyTextStyle = NeumorphicTextStyle(
fontWeight: FontWeight.w400,
fontSize: 14,
fontSize: bodySize,
decoration: TextDecoration.none,
fontFamily: SystemProperties.fontName);

Expand Down
2 changes: 0 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter_neumorphic/flutter_neumorphic.dart';
import 'package:portfolio/app/locator.dart';
import 'package:portfolio/app/snackbar_config.dart';

import 'package:flutter/material.dart';
import 'package:portfolio/app/theme.dart';
Expand All @@ -11,7 +10,6 @@ import 'ui/views/main/main_view.dart';
Future main() async {
setPathUrlStrategy();
await setupLocator();
setupSnackbarUi();
runApp(MyApp());
}

Expand Down
1 change: 1 addition & 0 deletions lib/ui/views/about me/about_view_all_size.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class AboutViewResponsive extends StatelessWidget {
),
SizedBox(height: 15),
Timeline(
indicatorSize: 16,
indicatorColor: uiHelpers.primaryColor,
lineColor: uiHelpers.textSecondaryColor,
shrinkWrap: true,
Expand Down
7 changes: 3 additions & 4 deletions lib/ui/views/contact me/contact_desktop_view.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_neumorphic/flutter_neumorphic.dart';
import 'package:portfolio/app/colors.dart';
import 'package:portfolio/app/configs.dart';
import 'package:portfolio/app/icons.dart';
import 'package:portfolio/core/utils/ScreenUiHelper.dart';
Expand Down Expand Up @@ -170,7 +169,7 @@ class ContactDesktopView extends StatelessWidget {
prefixIcon: Icon(
FormIcon.nameIcon,
color: model.hasFocusMap["name"]
? primaryColor
? uiHelpers.primaryColor
: uiHelpers
.textPrimaryColor,
),
Expand Down Expand Up @@ -227,7 +226,7 @@ class ContactDesktopView extends StatelessWidget {
FormIcon.nameIcon,
color:
model.hasFocusMap["email"]
? primaryColor
? uiHelpers.primaryColor
: uiHelpers
.textPrimaryColor,
),
Expand Down Expand Up @@ -280,7 +279,7 @@ class ContactDesktopView extends StatelessWidget {
FormIcon.nameIcon,
color:
model.hasFocusMap["subject"]
? primaryColor
? uiHelpers.primaryColor
: uiHelpers
.textPrimaryColor,
),
Expand Down
Loading

0 comments on commit 1f215aa

Please sign in to comment.