Skip to content

Commit

Permalink
few changes
Browse files Browse the repository at this point in the history
  • Loading branch information
justkawal committed Mar 13, 2024
1 parent 0d3517c commit 5cd7eed
Show file tree
Hide file tree
Showing 99 changed files with 636 additions and 2,222 deletions.
46 changes: 46 additions & 0 deletions book_store/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
ios
android
test
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
33 changes: 33 additions & 0 deletions book_store/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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: "7482962148e8d758338d8a28f589f317e1e42ba4"
channel: "stable"

project_type: app

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

# 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'
16 changes: 16 additions & 0 deletions book_store/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# book_store

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.
30 changes: 30 additions & 0 deletions book_store/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
use_super_parameters: false
prefer_const_constructors: false
prefer_const_literals_to_create_immutables: false


# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Binary file added book_store/images/audio_visualizer.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 book_store/images/books/book1.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 book_store/images/books/book2.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 book_store/images/books/book3.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 book_store/images/books/book4.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 book_store/images/books/book5.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 book_store/images/books/book6.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 book_store/images/books/book7.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 book_store/images/books/book8.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 book_store/images/books/book9.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 book_store/images/gradient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions book_store/lib/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'package:book_store/pages/home_page.dart';
import 'package:flutter/material.dart';

void main() {
runApp(const MyApp());
}

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

// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
home: HomePage(),
);
}
}
74 changes: 74 additions & 0 deletions book_store/lib/pages/home_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import 'package:book_store/utils/utils_colors.dart';
import 'package:flutter/material.dart';

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

@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
const SizedBox(height: 60),
ClipRRect(
borderRadius: BorderRadius.circular(20),
child: Container(
height: 200,
width: 350,
color: BookStoreColors.darkBlue,
child: Stack(
children: [
Positioned.fill(
child: Container(
decoration: BoxDecoration(
gradient: RadialGradient(
center: Alignment(-1.9, 1),
colors: [
BookStoreColors.veryLightSand,
BookStoreColors.darkBlue,
BookStoreColors.darkGreen,
Colors.yellow,
BookStoreColors.darkRed,
],
radius: 3,
focalRadius: 10,
stops: [0, 0.3, 0.464, 0.665, 1],
),
),
),
),
Positioned.fill(
child: Container(
decoration: BoxDecoration(
gradient: RadialGradient(
center: Alignment(-0.9, -1.7),
colors: [
BookStoreColors.darkRed,
BookStoreColors.darkRed.withOpacity(0.3),
],
radius: 1,
focalRadius: 1,
stops: [0, 1],
),
),
),
),
],
),
),
),
/* BookWidget(
bookLeftVerticalStrip: Colors.red,
bookBottomHorizontalStrip: Colors.red,
bookPagesColor: Colors.red,
bookCover: Icon(Icons.book, size: 50, color: Colors.red),
), */
Image.asset('images/books.png'),
],
),
),
);
}
}
25 changes: 25 additions & 0 deletions book_store/lib/utils/utils_colors.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import 'package:flutter/material.dart';

class BookStoreColors {
static const Color darkPurple = Color(0xFF625986);
static const Color lightPurple = Color(0xFF74699c);

static const Color mediumGreen = Color(0xFF598d5a);
static const Color darkGreen = Color(0xFF50955d);
static const Color lightGreen = Color(0xFF79a963);

static const Color mediumRed = Color(0xFFdc4d51);
static const Color darkRed = Color(0xFFc2424a);
static const Color lightRed = Color(0xFFf47171);

static const Color mediumBlue = Color(0xFF3b899b);
static const Color darkBlue = Color(0xFF246b7b);
static const Color lightBlue = Color(0xFF4f9bad);

static const Color lightSand = Color(0xFFf2eae0);
static const Color mediumSand = Color(0xFFe6dbce);

static const Color veryLightSand = Color(0xFFfbf8f6);

static const Color darkBrown = Color(0xFF7e655c);
}
90 changes: 90 additions & 0 deletions book_store/lib/widgets/book_widget.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import 'package:flutter/material.dart';

class BookWidget extends StatelessWidget {
final double width;
final Color bookLeftVerticalStrip;
final Color bookBottomHorizontalStrip;
final Color bookPagesColor;
final Widget bookCover;
const BookWidget({
required this.bookLeftVerticalStrip,
required this.bookBottomHorizontalStrip,
required this.bookPagesColor,
required this.bookCover,
this.width = 50,
super.key,
});

// 167 / 260
@override
Widget build(BuildContext context) {
final height = (65 / 42) * width;
final radiusRight = (15 / 168) * width;
final radiusLeft = (25 / 168) * width;
final radiusBookBottom = (26 / 168) * width;
return ClipRRect(
borderRadius: BorderRadius.only(
topRight: Radius.circular(radiusRight),
bottomRight: Radius.circular(radiusRight),
topLeft: Radius.circular(radiusLeft),
bottomLeft: Radius.circular(radiusLeft),
),
child: SizedBox(
width: width,
height: height,
child: Stack(
children: [
Positioned(
top: 0,
left: 0,
width: (35 / 168) * width,
height: (256 / 260) * height,
child: Container(
decoration: BoxDecoration(
color: bookLeftVerticalStrip,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radiusLeft),
bottomLeft: Radius.circular(radiusLeft),
),
),
),
),
Positioned(
bottom: 0,
left: 0,
width: ((168 + 10) / 168) * width,
height: (52 / 260) * height,
child: Container(
decoration: BoxDecoration(
border: Border.all(
color: bookBottomHorizontalStrip,
width: (10 / 168) * width,
),
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Colors.grey,
bookPagesColor,
],
),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radiusBookBottom),
bottomLeft: Radius.circular(radiusBookBottom),
),
),
),
),
Positioned(
top: 0,
right: 0,
width: (133 / 168) * width,
height: (208 / 260) * height,
child: bookCover,
),
],
),
),
);
}
}
Loading

0 comments on commit 5cd7eed

Please sign in to comment.