Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ketan-sharmaa committed Jul 1, 2024
1 parent f88246c commit 74f2842
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 64 deletions.
Binary file added assets/images/illustro/phone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 28 additions & 40 deletions lib/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@ import 'package:portfolio_flutter/screens/routes/leaderboard/leaderboard_screen.
import 'package:portfolio_flutter/screens/routes/parallax.dart';
import 'package:portfolio_flutter/screens/routes/quiz/quiz_play_screen.dart';
import 'package:portfolio_flutter/screens/routes/slot_machine.dart';
import 'package:portfolio_flutter/utils/assets.dart';

final List<Map> projectsDATA = [
{
"title": "Qlan",
"subtitle": "The Gamer's Social Network",
"screenshots": [
"assets/images/qlan/4.jpg",
"assets/images/qlan/5.jpg",
"assets/images/qlan/6.jpg",
"assets/images/qlan/7.jpg",
"assets/images/qlan/8.jpg"
],
"thumbnail": "assets/images/qlan/thumbnail/4_small.png",
"thumbnail_web": "assets/images/qlan/thumbnail/qlan_web_thumb.png",
"tags": ["Flutter"],
"thumbnail": qlanThumb,
"thumbnail_web": qlanThumbWeb,
"tags": ["Flutter, Firebase, Admob"],
"link": "https://play.google.com/store/apps/details?id=com.qlan",
"description":
"Qlan is a social networking and chat communication app dedicated to gamers. It is suited for everyone who is looking to collaborate or network with other gamers through chat. Users can create custom profiles, sync their in-game statistics, access AI based matchmaking, build squads, share gaming content and much more.\n**Key Responsibilities:**\n\n - Full application setup.\n - Mentorship over the duration of development.",
Expand All @@ -25,8 +19,7 @@ final List<Map> projectsDATA = [
{
"title": "ThinkRight",
"subtitle": "Meditation & Sleep",
"screenshots": [],
"thumbnail": "assets/images/thinkright/thumbnail/phone.png",
"thumbnail": thinkRightThumb,
"tags": ["Flutter"],
"link":
"https://play.google.com/store/apps/details?id=in.publicam.thinkrightme&hl=en_IN",
Expand All @@ -37,14 +30,7 @@ final List<Map> projectsDATA = [
{
"title": "Infoflight",
"subtitle": "Resource Management and Resume Builder Web App",
"screenshots": [
"assets/images/infoflight/1.png",
"assets/images/infoflight/2.png",
"assets/images/infoflight/3.png",
"assets/images/infoflight/4.png",
"assets/images/infoflight/5.png"
],
"thumbnail_web": "assets/images/infoflight/thumbnail/thumb.png",
"thumbnail_web": infoFlightThumbWeb,
"tags": ["Flutter", "Firebase"],
"description":
"Infoflight is an In-house webapp for managing resources. It manages kinds of resource such as technology content and tutorials, Project documentation, Resume builder and employee project allocation.\nResumes can be sent to clients and can be modified at runtime.Content display is achieved using markdown.\n**Key Responsibilities:**\n\n- Full application setup with flutter and firebase.\n- UI creation.\n- Mentorship over the duration of development.\n",
Expand All @@ -53,61 +39,61 @@ final List<Map> projectsDATA = [
{
"title": "TRP ",
"subtitle": "Inventory Management App",
// "screenshots": [
// "assets/images/TRP/1.png",
// "assets/images/TRP/2.png",
// "assets/images/TRP/3.png",
// "assets/images/TRP/4.png"
// ],
"thumbnail": "assets/images/TRP/thumbnail/phone.png",
"thumbnail": tRPThumb,
"tags": ["Flutter", "Firebase", "CSV"],
"description":
"Inventory management app for a clothing store.It Manages to store all the stock, calculate profit or loss, generate invoices and sales csv data.\n It also has a feature of custom billing calculator.",
"Inventory management app for a clothing store. It Manages to store all the stock, calculate profit or loss, generate invoices and sales csv data.\n It also has a feature of custom billing calculator.",
"year": "2020"
},
{
"title": "Illustro-AI",
"subtitle": "Convert portrait images into vector art",
// "screenshots": [

// ],
// "thumbnail": [

// ],
"tags": ["Flutter"],
"thumbnail": illustroThumb,
"tags": ["Flutter, Flask, Leonardo AI, AWS, Firebase, Admob"],
"link":
"https://play.google.com/store/apps/details?id=com.rattler.illustro&hl=en",
"description": "",
"description":
"""Illustro is creative app that uses third party image generation services.User's face is taken as input and processed through AI model to create stunning vector illustrations of given input.
\n**Key Responsibilities:**\n
\n - Front-End setup using flutter.
\n - Back-End setup using flask and Leonardo Api integration.
\n - Deployment on AWS ec2 using github actions.
""",
"year": "2023"
}
];

// _______________________________________________________________________

final List<Map> showcaseLeftDATA = [
{
"title": "Landscape Parallax",
"subtitle": "The Parallax effect from package: parallax",
"routeName": Parallax.routeName,
"image": "showcase_banner/parallax_logo.png"
"image": parallax
},
{
"title": "Slot Machine",
"subtitle": "The Parallax effect",
"routeName": SlotMachine.routeName,
"image": "showcase_banner/slotmachine.png"
"image": slotmachine
},
{
"title": "Arcade Quiz",
"subtitle": "Quiz",
"routeName": QuizPlayScreen.routeName,
"image": "showcase_banner/quiz.png"
"image": quiz
},
{
"title": "Leaderboard",
"subtitle": "leaderboard",
"routeName": LeaderBoardScreen.routeName,
"image": "showcase_banner/leaderboard.png"
"image": leaderboard
},
];

// _______________________________________________________________________

final List<Map<String, dynamic>> quizQuesstion = [
{
"Question_id": 0,
Expand Down Expand Up @@ -139,6 +125,8 @@ final List<Map<String, dynamic>> quizQuesstion = [
},
];

// _______________________________________________________________________

List scoreList = [
{
"name": "Vidya Chaudhry",
Expand Down
8 changes: 7 additions & 1 deletion lib/screens/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:portfolio_flutter/provider/quiz_provider.dart';
import 'package:portfolio_flutter/screens/routes/projects.dart';
import 'package:portfolio_flutter/screens/routes/showcase.dart';
import 'package:portfolio_flutter/theme.dart';
import 'package:portfolio_flutter/utils/strings.dart';
import 'package:portfolio_flutter/utils/assets.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';

Expand Down Expand Up @@ -41,6 +41,12 @@ class _HomeState extends State<Home> {
slotMachineBall,
quizBgBlur,
quizBg,
qlanThumb,
qlanThumbWeb,
thinkRightThumb,
infoFlightThumbWeb,
tRPThumb,
illustroThumb,
]) {
precacheImage(
AssetImage(e),
Expand Down
21 changes: 13 additions & 8 deletions lib/screens/routes/components/mockup_card.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'dart:async';
import 'dart:developer';
import 'dart:math' as math;

import 'package:flutter/foundation.dart';
Expand Down Expand Up @@ -29,8 +28,9 @@ class _MockupCardState extends State<MockupCard> {

String data = '';
double hoverSensitivity = 0.3;
// double hoverSensitivity = 0.3;
Matrix4 calculateTiltMatrix() {
Matrix4 tiltMatrix = Matrix4.identity();
Matrix4 tiltMatrix = Matrix4.identity()..translate(0.0, 0.0, -1.0 / 0.2);
tiltMatrix.rotateX(-tiltY);
tiltMatrix.rotateY(-tiltX);
tiltMatrix.rotateZ(tiltX * 0.1);
Expand All @@ -41,9 +41,10 @@ class _MockupCardState extends State<MockupCard> {

StreamSubscription<GyroscopeEvent>? _streamSubscription;

@override
void initState() {
super.initState();
if (kIsWeb) {
if (!kIsWeb) {
_streamSubscription = gyroscopeEvents.listen((event) {
// Process gyroscope data (x, y, z values)
setState(() {
Expand All @@ -67,17 +68,20 @@ class _MockupCardState extends State<MockupCard> {
super.dispose();
_streamSubscription?.cancel(); // Cancel subscription when done
}

@override
Widget build(BuildContext context) {
return GestureDetector(
onLongPressStart: (details) {
setState(() {
Provider.of<DataProvider>(context,listen:false).updatesSrollOffAndTiltOn=true;
Provider.of<DataProvider>(context, listen: false)
.updatesSrollOffAndTiltOn = true;
});
},
onLongPressEnd: (details) {
onLongPressEnd: (details) {
setState(() {
Provider.of<DataProvider>(context,listen:false).updatesSrollOffAndTiltOn=false;
Provider.of<DataProvider>(context, listen: false)
.updatesSrollOffAndTiltOn = false;
});
},
onLongPressMoveUpdate: (details) {
Expand All @@ -97,7 +101,7 @@ class _MockupCardState extends State<MockupCard> {
math.cos(normalizedY * math.pi); // Adjust PI for desired curve
tiltX = value * hoverSensitivity; // Adjust tilt based on value
tiltY = (value1 * hoverSensitivity); // Adjust tilt based on value
data = " y:$tiltY";
data = " y:$tiltX";
});
},
child: MouseRegion(
Expand All @@ -117,7 +121,7 @@ class _MockupCardState extends State<MockupCard> {
-math.cos(normalizedY * math.pi); // Adjust PI for desired curve
tiltX = value * hoverSensitivity; // Adjust tilt based on value
tiltY = (value1 * hoverSensitivity); // Adjust tilt based on value
data = " y:$tiltY";
data = " x:$tiltY";
});
},
onExit: (event) {
Expand Down Expand Up @@ -145,6 +149,7 @@ class _MockupCardState extends State<MockupCard> {
),
height: 50.h,
),
if (kDebugMode) Container(color: Colors.white, child: Text(data))
],
),
),
Expand Down
3 changes: 0 additions & 3 deletions lib/screens/routes/components/project_description_map.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import 'dart:developer';

import 'package:animate_do/animate_do.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:markdown_widget/markdown_helper.dart';
import 'package:markdown_widget/markdown_widget.dart';
import 'package:portfolio_flutter/constants.dart';
import 'package:portfolio_flutter/provider/quiz_provider.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:portfolio_flutter/constants.dart';
import 'package:responsive_sizer/responsive_sizer.dart';

import 'profile.dart';
import 'package:flutter/material.dart';
Expand All @@ -22,7 +23,7 @@ class _TopLeaderBoardAnimationState extends State<TopLeaderBoardAnimation>
)..forward();
Animation<Offset> anima(int rank) {
return Tween<Offset>(
end: Offset(0, 0.3 + (rank / 10)),
end: Offset(0, 0.03.h + (rank / 10)),
begin: const Offset(0, 1),
).animate(
CurvedAnimation(
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/routes/quiz/components/options_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:portfolio_flutter/screens/routes/quiz/components/ques_widget.dar
import 'package:portfolio_flutter/screens/routes/quiz/components/quiz_timer.dart';
import 'package:portfolio_flutter/theme.dart';
import 'package:portfolio_flutter/utils/logger.dart';
import 'package:portfolio_flutter/utils/strings.dart';
import 'package:portfolio_flutter/utils/assets.dart';
import 'package:provider/provider.dart';

class OptionsBox extends StatefulWidget {
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/routes/quiz/quiz_end_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:portfolio_flutter/screens/routes/quiz/components/ques_widget.dar
import 'package:portfolio_flutter/screens/routes/quiz/quiz_bg.dart';
import 'package:portfolio_flutter/theme.dart';
import 'package:portfolio_flutter/utils/logger.dart';
import 'package:portfolio_flutter/utils/strings.dart';
import 'package:portfolio_flutter/utils/assets.dart';
import 'package:provider/provider.dart';

class QuizEndScreen extends StatefulWidget {
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/routes/slot_machine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:lottie/lottie.dart';
import 'package:portfolio_flutter/constants.dart';
import 'package:portfolio_flutter/screens/routes/components/bulb_widget.dart';
import 'package:portfolio_flutter/theme.dart';
import 'package:portfolio_flutter/utils/strings.dart';
import 'package:portfolio_flutter/utils/assets.dart';
import 'package:responsive_sizer/responsive_sizer.dart';
// import 'package:lottie/lottie.dart';

Expand Down
1 change: 0 additions & 1 deletion lib/theme.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:portfolio_flutter/constants.dart';

Color scaffoldBackground = const Color.fromARGB(255, 245, 245, 245);
Expand Down
24 changes: 24 additions & 0 deletions lib/utils/assets.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const slotMachinBG = 'assets/slotmachine/bg.png';
const slotMachinPlayButton = 'assets/slotmachine/button.png';
const slotMachineImage = 'assets/slotmachine/slot.png';
const slotMachineHandle = 'assets/slotmachine/handle.png';
const slotMachineBall = 'assets/slotmachine/ball.png';
const quizBgBlur = 'assets/images/arcade/bg_end.jpg';
const quizBg = 'assets/images/arcade/quiz_gradient_bg.png';

const qlanThumb = "assets/images/qlan/thumbnail/4_small.png";
const qlanThumbWeb = "assets/images/qlan/thumbnail/qlan_web_thumb.png";

const thinkRightThumb = "assets/images/thinkright/thumbnail/phone.png";

const infoFlightThumbWeb = "assets/images/infoflight/thumbnail/thumb.png";

const tRPThumb = "assets/images/TRP/thumbnail/phone.png";

const illustroThumb = "assets/images/illustro/phone.png";

const parallax = "showcase_banner/parallax_logo.png";
const slotmachine = "showcase_banner/slotmachine.png";
const quiz = "showcase_banner/quiz.png";
const leaderboard = "showcase_banner/leaderboard.png";

7 changes: 0 additions & 7 deletions lib/utils/strings.dart

This file was deleted.

1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ flutter:
- assets/images/infoflight/thumbnail/
- assets/images/thinkright/
- assets/images/arcade/
- assets/images/illustro/
- assets/images/thinkright/thumbnail/
- assets/images/TRP/
- assets/images/TRP/thumbnail/
Expand Down
30 changes: 30 additions & 0 deletions test/widget_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:portfolio_flutter/main.dart';

void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());

// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);

// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();

// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}

0 comments on commit 74f2842

Please sign in to comment.