diff --git a/lib/adding_page/add.dart b/lib/adding_page/add.dart new file mode 100644 index 0000000..afb592c --- /dev/null +++ b/lib/adding_page/add.dart @@ -0,0 +1,218 @@ + +import 'package:book_store_app/page1/default_page.dart'; +import 'package:book_store_app/page1/page_1_model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class Add extends StatelessWidget { + Add({Key? key}) : super(key: key); + + + final TextEditingController BookController = TextEditingController(); + final TextEditingController AutherController = TextEditingController(); + final TextEditingController PriceController = TextEditingController(); + final TextEditingController ImageController = TextEditingController(); + final TextEditingController DescController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + //resizeToAvoidBottomInset: false, + appBar: AppBar( + systemOverlayStyle: const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + statusBarIconBrightness: Brightness.dark, + ), + backgroundColor: const Color(0xfff0f0f0), + elevation: 0, + toolbarHeight: 10, + ), + body: Center( + child: SingleChildScrollView( + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + TextButton( + onPressed:(){ + Navigator.push(context, + MaterialPageRoute(builder: (context) => const DefaultPage())); + }, + child:const Icon(Icons.arrow_back_ios_new, color: Colors.black,)), + const Icon(Icons.more_vert, color: Colors.black,), + ] + ), + Padding( + padding: const EdgeInsets.all(32), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children:const [ + Text("Add Book", style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.w600, + ),), + ], + ), + ), + ///TextFields + Container( + margin: const EdgeInsets.symmetric(horizontal: 24), + child: Column( + children: [ + Padding( + padding: const EdgeInsets.only(bottom: 22), + child: TextField( + controller: BookController, + maxLines: 2, + minLines: 1, + decoration: InputDecoration( + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + filled: true, + fillColor:const Color.fromRGBO(255, 255, 255, 1), + border: InputBorder.none, + hintText: 'Book Name', + hintStyle:const TextStyle(fontSize: 18), + ) + ), + ), + Padding( + padding: const EdgeInsets.only(bottom: 22), + child: TextField( + controller: AutherController, + maxLines: 2, + minLines: 1, + decoration: InputDecoration( + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + filled: true, + fillColor:const Color.fromRGBO(255, 255, 255, 1), + border: InputBorder.none, + hintText: 'Author Name', + hintStyle:const TextStyle(fontSize: 18), + ) + ), + ), + Padding( + padding: const EdgeInsets.only(bottom: 22), + child: TextField( + controller: PriceController, + maxLines: 2, + minLines: 1, + decoration: InputDecoration( + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + filled: true, + fillColor:const Color.fromRGBO(255, 255, 255, 1), + border: InputBorder.none, + hintText: 'Price', + hintStyle:const TextStyle(fontSize: 18), + ), + ), + ), + Padding( + padding: const EdgeInsets.only(bottom: 22), + child: TextField( + controller: ImageController, + maxLines: 2, + minLines: 1, + decoration: InputDecoration( + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + filled: true, + fillColor:const Color.fromRGBO(255, 255, 255, 1), + border: InputBorder.none, + hintText: 'Image link', + hintStyle: TextStyle(fontSize: 18), + ), + ), + ), + Padding( + padding: const EdgeInsets.only(bottom: 22), + child: TextField( + controller: DescController, + maxLines: 5, + minLines: 5, + decoration: InputDecoration( + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + filled: true, + fillColor:const Color.fromRGBO(255, 255, 255, 1), + border: InputBorder.none, + hintText: 'Description', + hintStyle:const TextStyle(fontSize: 18), + ), + ), + ), + ], + ), + ), + TextButton( + onPressed: (){ + BooksList(BookController.text, + AutherController.text, + PriceController.text, + ImageController.text, + DescController.text).addBook(); + BookController.clear(); + AutherController.clear(); + PriceController.clear(); + ImageController.clear(); + DescController.clear(); + + }, + child:Container( + width: double.maxFinite, + height: 60, + decoration: BoxDecoration( + color: Colors.black, + borderRadius: BorderRadius.circular(16) + ), + child:const Center( + child: Text("Add", style: TextStyle( + fontWeight: FontWeight.w500, + color: Colors.white, + fontSize: 16 + ), + ), + ), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/cart/cart_model.dart b/lib/cart/cart_model.dart new file mode 100644 index 0000000..f08affe --- /dev/null +++ b/lib/cart/cart_model.dart @@ -0,0 +1,13 @@ + + +import 'package:book_store_app/page1/page_1_model.dart'; + +class BooksAdded{ + + static List Added = [ + + BooksList("Yves Saint Laurent", "Suzy Menkes", "46.99", "https://images-na.ssl-images-amazon.com/images/I/31zSzxEMQ8L._SX340_BO1,204,203,200_.jpg", "A spectacular visual journey through 40 years of haute couture from one of the best-known and most trend-setting brands in fashion."), + BooksList("The Book of Sign", "Rudolf Koch", "99.99", "https://i2.books-express.ro/bt/9780486201627/the-book-of-signs.jpg", "great"), + ]; + +} \ No newline at end of file diff --git a/lib/cart/cart_page.dart b/lib/cart/cart_page.dart new file mode 100644 index 0000000..a5307a4 --- /dev/null +++ b/lib/cart/cart_page.dart @@ -0,0 +1,97 @@ + + + + +import 'package:book_store_app/adding_page/add.dart'; +import 'package:book_store_app/cart/cart_page_list.dart'; +import 'package:book_store_app/page1/default_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class Orders extends StatelessWidget { + const Orders ({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + systemOverlayStyle: const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + statusBarIconBrightness: Brightness.dark, + ), + backgroundColor: const Color(0xfff0f0f0), + elevation: 0, + toolbarHeight: 10, + ), + body: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + TextButton( + onPressed:(){ + Navigator.push(context, + MaterialPageRoute(builder: (context) => const DefaultPage())); + }, + child:const Icon(Icons.arrow_back_ios_new, color: Colors.black,)), + const Icon(Icons.more_vert, color: Colors.black,), + ] + ), + Padding( + padding: const EdgeInsets.all(32), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children:const [ + Text("Cart", style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.w600, + ),), + ], + ), + ), + Expanded(child: Stack( + children: [ + const CartListView(), + Align( + alignment: Alignment.bottomCenter, + child: Container( + width:227 , + height: 72, + margin: const EdgeInsets.only(bottom: 42), + //color: Colors.cyan, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22), + color: const Color.fromRGBO(255, 255, 255, 1), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + TextButton( + onPressed:(){ + Navigator.push(context, + MaterialPageRoute(builder: (context) => const DefaultPage())); + }, + child: const Icon(Icons.home_filled, color: Colors.black,), + ), + TextButton( + onPressed:(){ + print(""); + }, + child: const Icon(Icons.shopping_cart, color: Colors.black,),), + TextButton( + onPressed:(){ + Navigator.push(context, + MaterialPageRoute(builder: (context) => Add())); + }, + child: const Icon(Icons.add, color: Colors.black,),) + ], + ), + ), + ) + ], + )) + ], + ), + ); + } +} diff --git a/lib/cart/cart_page_list.dart b/lib/cart/cart_page_list.dart new file mode 100644 index 0000000..986d669 --- /dev/null +++ b/lib/cart/cart_page_list.dart @@ -0,0 +1,81 @@ + + + + +import 'package:get/get.dart'; +import 'package:book_store_app/page1/page_1_model.dart'; +import 'package:flutter/material.dart'; + +class CartListView extends StatelessWidget { + const CartListView({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Obx(() { + return ListView( + children: BooksList.cartList.map((e) => Container( + padding: const EdgeInsets.only(bottom: 23), + child: Row( + children: [ + Container( + width: 72, + height: 106, + margin: const EdgeInsets.only(left: 36), + child: Image.network(e.imageLink)), + Container( + height: 106, + //color: Colors.cyan, + padding: EdgeInsets.only(left: 26), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(bottom: 4), + child: Text(e.Bookname, style:const TextStyle( + fontWeight: FontWeight.w600, + fontSize: 16, + fontFamily: 'Poppins' + ),), + ), + Padding( + padding: const EdgeInsets.only(bottom: 7), + child: Text(e.Author, style:const TextStyle( + fontWeight: FontWeight.w500, + fontSize: 12, + color: Color.fromRGBO(6, 7, 13, 1), + fontFamily: 'Poppins' + )), + ), + Padding( + padding: const EdgeInsets.only(bottom: 15), + child: Text("\$${e.Price}", style:const TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14, + fontFamily: 'Poppins' + ),), + ), + Row( + children:const [ + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(237, 237, 239, 1), size: 14,), + ], + ) + + ], + ), + ), + const Spacer(), + + ], + ), + )).toList(), + ); + } + ); + } +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index bcc58f7..9246f93 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,8 @@ + +import 'package:book_store_app/page1/default_page.dart'; import 'package:flutter/material.dart'; + void main() { runApp(const MyApp()); } @@ -9,12 +12,16 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return const MaterialApp( - home: Scaffold( - body: Center( - child: Text("Book Store App"), - ), + return MaterialApp( + debugShowCheckedModeBanner: false, + title: 'app_store', + theme: ThemeData( + primarySwatch: Colors.blue, ), + home: const DefaultPage(), ); } } + + + diff --git a/lib/page1/default_page.dart b/lib/page1/default_page.dart new file mode 100644 index 0000000..2bd04d9 --- /dev/null +++ b/lib/page1/default_page.dart @@ -0,0 +1,94 @@ + +import 'package:book_store_app/adding_page/add.dart'; +import 'package:book_store_app/cart/cart_page.dart'; +import 'package:book_store_app/page1/home_page_list.dart'; +import 'package:book_store_app/page1/searchBar.dart'; +import 'package:book_store_app/page1/user_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + + +class DefaultPage extends StatefulWidget { + const DefaultPage({ + Key? key, + }) : super(key: key); + + @override + State createState() => _DefaultPageState(); +} + +class _DefaultPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + systemOverlayStyle: const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + statusBarIconBrightness: Brightness.dark, + ), + backgroundColor: const Color(0xfff0f0f0), + elevation: 0, + toolbarHeight: 10, + ), + body: Column( + children: [ + UserWidget(), + SerachWidget(), + Padding( + padding: const EdgeInsets.all(32), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children:const [ + Text("Book List", style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.w600, + ),), + ], + ), + ), + Expanded( + child: Stack( + children: [ + const DefaultListView(), + Align( + alignment: Alignment.bottomCenter, + child: Container( + width:227 , + height: 72, + margin: const EdgeInsets.only(bottom: 42), + //color: Colors.cyan, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22), + color: const Color.fromRGBO(255, 255, 255, 1), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + TextButton(onPressed: (){ + print(""); + }, child:const Icon(Icons.home_filled, color: Colors.black,),), + TextButton( + onPressed:(){ + Navigator.push(context, + MaterialPageRoute(builder: (context) => const Orders())); + }, + child: const Icon(Icons.shopping_cart, color: Colors.black,),), + TextButton( + onPressed:(){ + Navigator.push(context, + MaterialPageRoute(builder: (context) => Add())); + }, + child: const Icon(Icons.add, color: Colors.black,),) + ], + ), + ), + ) + ], + ), + ) + ], + ), + ); + } +} + diff --git a/lib/page1/home_page_list.dart b/lib/page1/home_page_list.dart new file mode 100644 index 0000000..ad442b3 --- /dev/null +++ b/lib/page1/home_page_list.dart @@ -0,0 +1,94 @@ + + + +import 'package:book_store_app/page1/page_1_model.dart'; +import 'package:book_store_app/showing_page/book_page.dart'; +import 'package:flutter/material.dart'; + +class DefaultListView extends StatelessWidget { + const DefaultListView({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return ListView( + children: BooksList.Books.map((e) => Container( + padding: const EdgeInsets.only(bottom: 23), + child: Row( + children: [ + Container( + width: 72, + height: 106, + margin: const EdgeInsets.only(left: 36), + child: TextButton( + onPressed: (){ + Navigator.push(context, + MaterialPageRoute(builder: (context) => Show(Bookname: e.Bookname, Author: e.Author, Price: e.Price, imageLink: e.imageLink, Description: e.Description,))); + }, + child: Image.network(e.imageLink))), + Container( + height: 106, + //color: Colors.cyan, + padding: EdgeInsets.only(left: 26), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(bottom: 4), + child: Text(e.Bookname, style: const TextStyle( + fontWeight: FontWeight.w600, + fontSize: 16, + fontFamily: 'Poppins' + ),), + ), + Padding( + padding: const EdgeInsets.only(bottom: 7), + child: Text(e.Author, style:const TextStyle( + fontWeight: FontWeight.w500, + fontSize: 12, + color: Color.fromRGBO(6, 7, 13, 1), + fontFamily: 'Poppins' + )), + ), + Padding( + padding: const EdgeInsets.only(bottom: 15), + child: Text("\$${e.Price}", style: const TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14, + fontFamily: 'Poppins' + ),), + ), + Row( + children:const [ + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(237, 237, 239, 1), size: 14,), + ], + ) + + ], + ), + ), + Spacer(), + Padding( + padding: const EdgeInsets.only(right: 8.0), + child: IconButton( + icon: const Icon(Icons.add_shopping_cart), + onPressed: (){ + BooksList(e.Bookname, e.Author, e.Price, e.imageLink, e.Description).add(); + print(BooksList.cartList); + }, + + ) + ), + + ], + ), + )).toList(), + + ); + } +} \ No newline at end of file diff --git a/lib/page1/page_1_model.dart b/lib/page1/page_1_model.dart new file mode 100644 index 0000000..177a93e --- /dev/null +++ b/lib/page1/page_1_model.dart @@ -0,0 +1,59 @@ +import 'package:get/get.dart'; + + +class BooksList{ + + final String Bookname; + final String Author; + final String Price; + final String imageLink; + final String Description; + + BooksList(this.Bookname, this.Author, this.Price, this.imageLink, this.Description); + + static List Books = [ + BooksList("Yves Saint Laurent", "Suzy Menkes", "46.99", "https://images-na.ssl-images-amazon.com/images/I/31zSzxEMQ8L._SX340_BO1,204,203,200_.jpg", "A spectacular visual journey through 40 years of haute couture from one of the best-known and most trend-setting brands in fashion."), + BooksList("The Book of Sign", "Rudolf Koch", "99.99", "https://i2.books-express.ro/bt/9780486201627/the-book-of-signs.jpg", " a really great book"), + BooksList("Yves Saint Laurent", "Suzy Menkes", "46.99", "https://images-na.ssl-images-amazon.com/images/I/31zSzxEMQ8L._SX340_BO1,204,203,200_.jpg", " a really great book"), + BooksList("The Book of Sign", "Rudolf Koch", "99.99", "https://i2.books-express.ro/bt/9780486201627/the-book-of-signs.jpg", "A spectacular visual journey through 40 years of haute couture from one of the best-known and most trend-setting brands in fashion."), + BooksList("Yves Saint Laurent", "Suzy Menkes", "46.99", "https://images-na.ssl-images-amazon.com/images/I/31zSzxEMQ8L._SX340_BO1,204,203,200_.jpg", " a really great book"), + BooksList("The Book of Sign", "Rudolf Koch", "99.99", "https://i2.books-express.ro/bt/9780486201627/the-book-of-signs.jpg", "A spectacular visual journey through 40 years of haute couture from one of the best-known and most trend-setting brands in fashion."), + ]; + + void addBook() { + Books.add(this); + } + + + + +///cart page=============================================== + static RxList cartList = [ + + BooksList("Yves Saint Laurent", "Suzy Menkes", "46.99", "https://images-na.ssl-images-amazon.com/images/I/31zSzxEMQ8L._SX340_BO1,204,203,200_.jpg", " a really great book"), + BooksList("The Book of Sign", "Rudolf Koch", "99.99", "https://i2.books-express.ro/bt/9780486201627/the-book-of-signs.jpg", "A spectacular visual journey through 40 years of haute couture from one of the best-known and most trend-setting brands in fashion."), + + + ].obs; + + + void add() { + cartList.add(this); + } + + + +///show page================== + static RxList showList = [].obs; + + void addSelected() { + showList.clear(); + showList.add(this); + } + + + + + + +} diff --git a/lib/page1/searchBar.dart b/lib/page1/searchBar.dart new file mode 100644 index 0000000..83e8d35 --- /dev/null +++ b/lib/page1/searchBar.dart @@ -0,0 +1,48 @@ + + + +import 'package:flutter/material.dart'; + +class SerachWidget extends StatelessWidget { + SerachWidget({ + Key? key, + }) : super(key: key); + + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.only(left: 29, right: 29, top: 10), + child: Column( + children: [ + TextField( + maxLines: 5, + minLines: 1, + decoration: InputDecoration( + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: BorderSide.none, + ), + filled: true, + fillColor: const Color.fromRGBO(255, 255, 255, 1), + border: InputBorder.none, + hintText: 'Search...', + hintStyle: const TextStyle(fontSize: 18), + suffixIcon:IconButton( + icon: const Icon(Icons.search, size: 26, color: Color.fromRGBO(132, 136, 158, 1),), + color: Colors.white, + onPressed: () { + print("hiiii"); + }, + ), + ) + ), + ], + ) + ); + } +} \ No newline at end of file diff --git a/lib/page1/user_widget.dart b/lib/page1/user_widget.dart new file mode 100644 index 0000000..671effa --- /dev/null +++ b/lib/page1/user_widget.dart @@ -0,0 +1,35 @@ + + +import 'package:flutter/material.dart'; + +class UserWidget extends StatelessWidget { + const UserWidget({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Row( + children: [ + Container( + height: 40, + width: 40, + margin: const EdgeInsets.only(left: 28, right: 12), + child: + ClipRRect( + borderRadius: BorderRadius.circular(10), + child: Image.network("https://www.diethelmtravel.com/wp-content/uploads/2016/04/bill-gates-wealthiest-person.jpg"))), + const Text("Hi, Murtada!", style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + fontFamily: "Poppins", + color: Color.fromRGBO(6, 7, 13, 1) + ),), + Spacer(), + Container( + margin: const EdgeInsets.only(right: 28), + child: const Icon(Icons.more_vert, )), + ], + ); + } +} \ No newline at end of file diff --git a/lib/showing_page/book_page.dart b/lib/showing_page/book_page.dart new file mode 100644 index 0000000..c142890 --- /dev/null +++ b/lib/showing_page/book_page.dart @@ -0,0 +1,163 @@ + + + +import 'package:book_store_app/page1/default_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class Show extends StatelessWidget { + const Show({Key? key, required this.Bookname, required this.Author, required this.Price, required this.imageLink,required this.Description}) : super(key: key); + + final String Bookname; + final String Author; + final String Price; + final String imageLink; + final String Description; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + systemOverlayStyle: const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + statusBarIconBrightness: Brightness.dark, + ), + backgroundColor: const Color(0xfff0f0f0), + elevation: 0, + toolbarHeight: 10, + ), + body: Center( + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + TextButton( + onPressed:(){ + Navigator.push(context, + MaterialPageRoute(builder: (context) => const DefaultPage())); + }, + child:const Icon(Icons.arrow_back_ios_new, color: Colors.black,)), + const Icon(Icons.more_vert, color: Colors.black,), + ] + ), + Padding( + padding: const EdgeInsets.all(22), + child: SizedBox( + height: 320, + width: 216, + child: Image.network(imageLink)), + ), + Padding( + padding: const EdgeInsets.only(bottom: 12), + child: Text(Bookname, style: const TextStyle( + fontSize: 24, + fontWeight: FontWeight.w600, + ),), + ), + Padding( + padding: const EdgeInsets.only(bottom: 11), + child: Text(Author, style: const TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14, + color: Color.fromRGBO(6, 7, 13, 1) + ),), + ), + Padding( + padding: const EdgeInsets.only(bottom: 19), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children:const [ + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(255, 196, 31, 1), size: 14,), + Icon(Icons.star, color: Color.fromRGBO(237, 237, 239, 1), size: 14,), + Text(" \$4.5"), + Text("/5.0", style: TextStyle( + color: Color.fromRGBO(130, 130, 133, 1) + ),), + ], + ), + ), + SizedBox( + width: 319, + height:96 , + child: Text(Description, style: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + fontFamily: 'Poppins' + ),), + ), + Padding( + padding: const EdgeInsets.only(bottom: 36), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: 154, + height: 40, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children:const [ + Icon(Icons.table_rows), + SizedBox(width: 13,), + Text("Preview", style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500 + ),) + ], + ), + ), + const SizedBox(width: 13,), + Container( + width: 154, + height: 40, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: const [ + Icon(Icons.display_settings), + SizedBox(width: 13,), + Text("Reviews", style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500 + ),) + ], + ), + ), + ], + ), + ), + Container( + height: 60, + width: 319, + decoration: BoxDecoration( + color: Colors.black, + borderRadius: BorderRadius.circular(16) + + ), + child: const Center( + child: Text("Buy Now for \$46.99 ", style: TextStyle( + color: Colors.white, + fontSize: 14, + fontWeight: FontWeight.w500 + ), + ), + ) + ) + ], + ), + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 7bc8bdd..a45ff75 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -74,6 +74,13 @@ packages: description: flutter source: sdk version: "0.0.0" + get: + dependency: "direct dev" + description: + name: get + url: "https://pub.dartlang.org" + source: hosted + version: "4.6.5" lints: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index cd0f457..4fcb1b2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,6 +38,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + get: any # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is @@ -59,6 +60,7 @@ flutter: # To add assets to your application, add an assets section, like this: # assets: + # //- assets/bill_gates.jpg # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg