Skip to content
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
83 changes: 83 additions & 0 deletions lib/Card/Card_main_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import 'package:book_store_app/page1/ListView.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';

import '../model.dart';
import '../page1/Stack_part.dart';
import '../page1/Title_OF_list.dart';
import '../page1/main_page1.dart';
import '../page2_Add_books/App_bar.dart';

class Card1 extends StatefulWidget {
const Card1({Key? key}) : super(key: key);

@override
State<Card1> createState() => _Card1State();
}

class _Card1State extends State<Card1> {
late final Books books;

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFFEFEFEF),
body: Padding(
padding: const EdgeInsets.only(left: 30, right: 30, top: 55),
child: Stack(
children: [
Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
IconButton(
onPressed: () {
Get.to(Main_page1(),
duration: Duration(
milliseconds:
200), //duration of transitions, default 1 sec
transition: Transition.fadeIn);
},
icon: Icon(
Icons.arrow_back_ios,
size: 30,
),
),
IconButton(
onPressed: () {},
icon: Icon(
Icons.more_vert,
size: 30,
),
),
],
),
Title_OF_list(
title: "Card",
),
Expanded(
child: ListView(
children: Books.bookList
.where((e) => e.isBuy.value)
.map((e) => books_card(
books: e,
color: Colors.red,
))
.toList(),
))
],
),
Stack_part(
color_home: Colors.black26,
color_shopping: Colors.black,
color_favorite: Colors.black26,
)
],
),
),
);
}
}
28 changes: 28 additions & 0 deletions lib/View_book/Description.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import 'package:flutter/cupertino.dart';

class Description11 extends StatelessWidget {
const Description11({
Key? key,
required this.Description1,
}) : super(key: key);
final String Description1;

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(bottom: 20),
child: Container(

child: Text(
Description1,
style: const TextStyle(
fontWeight: FontWeight.w400,
fontSize: 15,
color: Color(0xFF06070D),
height: 1.6,
),
),
),
);
}
}
105 changes: 105 additions & 0 deletions lib/View_book/Name+Aother.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class books_name extends StatelessWidget {
const books_name({
Key? key, required this.Books_name, required this.Aother_name,
}) : super(key: key);
final String Books_name;
final String Aother_name;

@override
Widget build(BuildContext context) {
return Container(
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 22),
child: Text(
Books_name,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 24),
),
),
Padding(
padding: const EdgeInsets.only(top: 12),
child: Text(
Aother_name,
style: TextStyle(fontWeight: FontWeight.w500, fontSize: 14),
),
),
star()
],
),
);
}
}

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

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(top: 12,bottom: 10
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.star,
size: 16,
color: Color(0xFFFFC41F),
),
Icon(
Icons.star,
size: 16,
color: Color(0xFFFFC41F),
),
Icon(
Icons.star,
size: 16,
color: Color(0xFFFFC41F),
),
Icon(
Icons.star,
size: 16,
color: Color(0xFFFFC41F),
),
HalfFilledIcon(
icon: Icons.star_rate,
size: 16,
color: Color(0xFFFFC41F)),
],
),
);
}
}

class HalfFilledIcon extends StatelessWidget {
final IconData icon;
final double size;
final Color color;

HalfFilledIcon({required this.icon, required this.size, required this.color});

@override
Widget build(BuildContext context) {
return ShaderMask(
blendMode: BlendMode.srcATop,
shaderCallback: (Rect rect) {
return LinearGradient(
stops: [0, 0.5, 0.5],
colors: [color, color, color.withOpacity(0)],
).createShader(rect);
},
child: SizedBox(
width: size,
height: size,
child: Icon(icon, size: size, color: Colors.grey[300]),
),
);
}
}
34 changes: 34 additions & 0 deletions lib/View_book/Row_of_button.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class Row_of_button extends StatelessWidget {
const Row_of_button({
Key? key, required this.text, required this.icon,
}) : super(key: key);
final String text;
final Widget icon;

@override
Widget build(BuildContext context) {
return Container(
width: 160,
height: 40,
child: ElevatedButton.icon(
label: Text(text,
style: TextStyle(
fontSize: 16, fontWeight: FontWeight.w500)),
style: ButtonStyle(
foregroundColor:
MaterialStateProperty.all<Color>(Colors.black87),
backgroundColor:
MaterialStateProperty.all<Color>(Colors.white),
shape:
MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
)),
),
onPressed: () {},
icon: icon));
}
}
Loading