diff --git a/assets/icons/chat_icon.svg b/assets/icons/chat_icon.svg new file mode 100644 index 0000000..acdc168 --- /dev/null +++ b/assets/icons/chat_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/home_icon.svg b/assets/icons/home_icon.svg new file mode 100644 index 0000000..8ee81c9 --- /dev/null +++ b/assets/icons/home_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/list_icon.svg b/assets/icons/list_icon.svg new file mode 100644 index 0000000..9235d82 --- /dev/null +++ b/assets/icons/list_icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/three-dots-vertical.svg b/assets/icons/three-dots-vertical.svg new file mode 100644 index 0000000..cd0c79a --- /dev/null +++ b/assets/icons/three-dots-vertical.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assets/images/Rectangle 14.png b/assets/images/Rectangle 14.png new file mode 100644 index 0000000..d48c9f1 Binary files /dev/null and b/assets/images/Rectangle 14.png differ diff --git a/lib/main.dart b/lib/main.dart index bcc58f7..784d0fb 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,17 @@ + +import 'package:book_store_app/screens/add_book/add_book_screen.dart'; + +import 'package:book_store_app/screens/cart/cart_screen.dart'; +import 'package:get/get.dart'; +import 'package:book_store_app/screens/detais_book_screen.dart'; +import 'package:book_store_app/screens/home/home_screens.dart'; + + + import 'package:flutter/material.dart'; + + void main() { runApp(const MyApp()); } @@ -9,12 +21,9 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return const MaterialApp( - home: Scaffold( - body: Center( - child: Text("Book Store App"), - ), - ), + return const GetMaterialApp( + debugShowCheckedModeBanner: false, + home: HomeScreen(), ); } } diff --git a/lib/models/my_models.dart b/lib/models/my_models.dart new file mode 100644 index 0000000..8e3490b --- /dev/null +++ b/lib/models/my_models.dart @@ -0,0 +1,20 @@ + + +class ModCardOfBook{ + String img; + String title; + String prise; + String auth; + String rate; + String dsc; + int IsCart; + ModCardOfBook({required this.img,required this.title, required this.auth,required this.prise ,required this.rate,required this.dsc, this.IsCart=1}); + +} +List listOfBookCard=[ + ModCardOfBook(img: 'https://m.media-amazon.com/images/I/31Kaxk93VmL._AC_SY580_.jpg',title: 'Letting go',auth: 'david hawkins', rate:'2' ,prise: '29', dsc:'A spectacular visual journey through 40 years of haute couture from one of the best-known and most trend-setting brands in fashion.',IsCart: 2), + ModCardOfBook(img: 'https://images-na.ssl-images-amazon.com/images/I/41L9zGuDGHL.jpg',title: 'The Book of Man',auth: 'Osho', rate:'5' ,prise: '33', dsc: 'B spectacular visual journey through 40 years of haute couture from one of the best-known and most trend-setting brands in fashion.',IsCart: 1), + ModCardOfBook(img: 'https://images-na.ssl-images-amazon.com/images/I/41ZwJeOY7jL._SX336_BO1,204,203,200_.jpg',title: 'The Book of Life',auth: 'J.Krishnamurti', rate:'4' ,prise: '34', dsc: 'C spectacular visual journey through 40 years of haute couture from one of the best-known and most trend-setting brands in fashion.',IsCart: 2), + ModCardOfBook(img: 'https://images-na.ssl-images-amazon.com/images/I/91JxEYMbYbL.jpg',title: 'Why we sleep',auth: 'Matthew Walker', rate:'3' ,prise: '24.99', dsc: 'D spectacular visual journey through 40 years of haute couture from one of the best-known and most trend-setting brands in fashion.',IsCart: 3), + +]; \ No newline at end of file diff --git a/lib/screens/add_book/add_book_screen.dart b/lib/screens/add_book/add_book_screen.dart new file mode 100644 index 0000000..0c0e8bb --- /dev/null +++ b/lib/screens/add_book/add_book_screen.dart @@ -0,0 +1,90 @@ +import 'package:book_store_app/screens/home/home_screens.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 '../../models/my_models.dart'; +import '../widgets/custom_app_bar.dart'; +import '../widgets/my_button.dart'; +import '../widgets/my_text_field.dart'; +import '../widgets/title_text.dart'; + +class AddBook extends StatefulWidget { + const AddBook({Key? key}) : super(key: key); + + @override + State createState() => _AddBookState(); +} + +class _AddBookState extends State { + TextEditingController nameContoroller=TextEditingController(); + TextEditingController authorContoroller=TextEditingController(); + TextEditingController priceContoroller=TextEditingController(); + TextEditingController imageContoroller=TextEditingController(); + TextEditingController desContoroller=TextEditingController(); + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppBar(), + body: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 24), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TitleText(text: "Add Book"), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: Column( + children: [ + MyTextField( + hint: 'Book Name', + maxLine: 1, controller: nameContoroller, + ), + MyTextField( + hint: 'Author Name', + maxLine: 1, + controller: authorContoroller, + ), + MyTextField( + hint: 'Price', + maxLine: 1, + controller: priceContoroller, + ), + MyTextField( + hint: 'Image link', + maxLine: 1, + controller: imageContoroller, + ), + MyTextField( + hint: 'Description', + maxLine: 4, + controller: desContoroller, + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 16.0), + child: MyButton( + myOnTap: (){ + listOfBookCard.add(ModCardOfBook(img: imageContoroller.text, auth: authorContoroller.text, dsc: desContoroller.text, rate: '0', title: nameContoroller.text, prise: priceContoroller.text)); + Get.to(HomeScreen()); + print(listOfBookCard.length); + + }, + height: MediaQuery.of(context).size.width * 0.15, + width: MediaQuery.of(context).size.width, + tex: "Add", + bgColor: Colors.black, + texColor: Colors.white, + ), + ), + ], + ), + ) + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/cart/cart_screen.dart b/lib/screens/cart/cart_screen.dart new file mode 100644 index 0000000..d84e714 --- /dev/null +++ b/lib/screens/cart/cart_screen.dart @@ -0,0 +1,61 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart'; + +import '../../models/my_models.dart'; +import '../widgets/card_of_book.dart'; +import '../widgets/custom_app_bar.dart'; +import '../widgets/my_bottom_nav_bar.dart'; +import '../widgets/title_text.dart'; + +class CartScreen extends StatefulWidget { + const CartScreen({Key? key}) : super(key: key); + + @override + State createState() => _CartScreenState(); +} + +class _CartScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppBar(), + body: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: Stack( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TitleText(text: "Cart"), + Container( + margin: EdgeInsets.symmetric(horizontal: 16), + height: MediaQuery.of(context).size.height * 0.77, + width: double.infinity, + child: ListView.separated( + itemBuilder: (BuildContext context, int index) => listOfBookCard[index].IsCart%2==0? + CardBook(index: index, + title: listOfBookCard[index].title, + rate: listOfBookCard[index].rate, + auth: listOfBookCard[index].auth, + img: listOfBookCard[index].img, + prise: listOfBookCard[index].prise, + dsc: listOfBookCard[index].dsc, + isCard: listOfBookCard[index].IsCart, + ):Container(), + itemCount: listOfBookCard.length, + separatorBuilder: (BuildContext context, int index) => + const SizedBox( + height: 16, + ), + )), + ], + ), + MybottomNavBar(), + ], + ), + ), + ); + } +} diff --git a/lib/screens/detais_book_screen.dart b/lib/screens/detais_book_screen.dart new file mode 100644 index 0000000..ace8a16 --- /dev/null +++ b/lib/screens/detais_book_screen.dart @@ -0,0 +1,114 @@ + +import 'package:book_store_app/screens/widgets/custom_app_bar.dart'; +import 'package:book_store_app/screens/widgets/my_button.dart'; +import 'package:book_store_app/screens/widgets/start_rate.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:get/get.dart'; +import 'package:get/get_core/src/get_main.dart'; + +import 'widgets/card_of_book.dart'; + +class DetaisBook extends StatefulWidget { + String img; + String title; + String auth; + String prise; + String rate; + String dsc; + DetaisBook({ + Key? key, + required this.img, + required this.title, + required this.auth, + required this.prise, + required this.rate, + required this.dsc, + }) : super(key: key); + + + + @override + State createState() => _DetaisBookState(); +} + +class _DetaisBookState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppBar(), + body: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Center(child: Image.network(widget.img,height: MediaQuery.of(context).size.height*0.4,)), + Padding( + padding: EdgeInsets.only(top: 16.0), + child: Text( + widget.title, + style: const TextStyle( + fontWeight: FontWeight.bold, fontSize: 22), + ), + ), + Text( + widget.auth, + style: const TextStyle( + color: Colors.grey, + fontWeight: FontWeight.w400, + fontSize: 14), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: const [ + StartRate(rate:5), + SizedBox(width: 8,), + Text( + '5.0', + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.w400, + fontSize: 14), + ), + Text( + '/5.0', + style: TextStyle( + color: Colors.grey, + fontWeight: FontWeight.w400, + fontSize: 14), + ), + ], + ), + ), + Text( + widget.dsc, + style: TextStyle( + color: Colors.grey, + fontWeight: FontWeight.w400, + fontSize: 14), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + MyButton(icon:"assets/icons/list_icon.svg",height:MediaQuery.of(context).size.width*0.12,width: MediaQuery.of(context).size.width*0.4,tex: "Preview",bgColor: Colors.white,), + SizedBox(width: 16,), + MyButton(icon: "assets/icons/chat_icon.svg",height: MediaQuery.of(context).size.width*0.12,width: MediaQuery.of(context).size.width*0.4,tex: "Reviews",bgColor: Colors.white,), + ], + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 32), + child: MyButton(height: MediaQuery.of(context).size.width*0.15,width: MediaQuery.of(context).size.width,tex: "Buy Now for \$${widget.prise}",bgColor: Colors.black,texColor: Colors.white,), + ), + + + ], + ), + ), + ); + } +} + + diff --git a/lib/screens/home/home_screens.dart b/lib/screens/home/home_screens.dart new file mode 100644 index 0000000..a354eec --- /dev/null +++ b/lib/screens/home/home_screens.dart @@ -0,0 +1,77 @@ +import 'package:book_store_app/screens/add_book/add_book_screen.dart'; +import 'package:book_store_app/screens/cart/cart_screen.dart'; +import 'package:book_store_app/screens/home/widget/my_app_bar.dart'; +import 'package:book_store_app/screens/widgets/my_bottom_nav_bar.dart'; +import 'package:book_store_app/screens/widgets/my_text_field.dart'; +import 'package:book_store_app/screens/widgets/title_text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import '../../models/my_models.dart'; +import '../widgets/card_of_book.dart'; + +class HomeScreen extends StatefulWidget { + const HomeScreen({Key? key}) : super(key: key); + + @override + State createState() => _HomeScreenState(); +} + +class _HomeScreenState extends State { + TextEditingController searchController = TextEditingController(); + + + @override + Widget build(BuildContext context) { + return Scaffold( + body: SafeArea( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + MyAppBar(), + MyTextField( + hint: "Search...", + icon: Icons.search_rounded, + maxLine: 1, + controller: searchController, + ), + TitleText( + text: "Book List", + ), + Container( + height: MediaQuery.of(context).size.height * 0.66, + width: double.infinity, + child: ListView.separated( + itemBuilder: (BuildContext context, int index) => + CardBook( + index: index, + title: listOfBookCard[index].title, + rate: listOfBookCard[index].rate, + auth: listOfBookCard[index].auth, + img: listOfBookCard[index].img, + prise: listOfBookCard[index].prise, + dsc: listOfBookCard[index].dsc, + isCard: listOfBookCard[index].IsCart, + ), + itemCount: listOfBookCard.length, + separatorBuilder: (BuildContext context, int index) => + const SizedBox( + height: 16, + ), + ), + ), + ], + ), + MybottomNavBar() + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/screens/home/widget/my_app_bar.dart b/lib/screens/home/widget/my_app_bar.dart new file mode 100644 index 0000000..d7b9eb1 --- /dev/null +++ b/lib/screens/home/widget/my_app_bar.dart @@ -0,0 +1,32 @@ + +import 'package:flutter/cupertino.dart'; +import 'package:flutter_svg/svg.dart'; + +class MyAppBar extends StatelessWidget { + const MyAppBar({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Padding( + padding: + const EdgeInsets.symmetric(horizontal: 0, vertical: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Image.asset("assets/images/Rectangle 14.png"), + SizedBox( + width: 4, + ), + Text( + "Hi, Ali!", + style: TextStyle(fontWeight: FontWeight.bold), + ), + Spacer(), + SvgPicture.asset("assets/icons/three-dots-vertical.svg") + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/widgets/card_of_book.dart b/lib/screens/widgets/card_of_book.dart new file mode 100644 index 0000000..177ba77 --- /dev/null +++ b/lib/screens/widgets/card_of_book.dart @@ -0,0 +1,99 @@ +import 'package:book_store_app/screens/widgets/start_rate.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 '../../models/my_models.dart'; +import '../detais_book_screen.dart'; + +class CardBook extends StatelessWidget { + RxInt IsCart; + + String img; + String title; + String auth; + String prise; + String rate; + String dsc; + int index; + CardBook({ + Key? key, + required this.index, + required int isCard , + required this.img, + required this.title, + required this.auth, + required this.prise, + required this.rate, + required this.dsc, + }) : IsCart = (isCard).obs,super(key: key); + + @override + Widget build(BuildContext context) { + return Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + InkWell( + onTap: () { + Get.to(DetaisBook( + img: img, + title: title, + auth: auth, + rate: rate, + prise: prise, + dsc: dsc, + )); + }, + child: Image.network( + img, + height: 100, + ), + ), + const SizedBox( + width: 32, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 18), + ), + const SizedBox( + height: 8, + ), + Text( + auth, + style: const TextStyle( + color: Colors.grey, + fontWeight: FontWeight.w400, + fontSize: 14), + ), + const SizedBox( + height: 8, + ), + const Text( + "\$ 23", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16), + ), + const SizedBox( + height: 8, + ), + StartRate(rate: int.parse(rate)) + ], + ), + Spacer(), + IconButton( + onPressed: () { + IsCart.value++; + listOfBookCard.elementAt(index).IsCart=IsCart.value; + }, + icon: Obx(() => Icon( + Icons.shopping_cart, + color: IsCart.value % 2 == 0 ? Colors.black : Colors.grey, + ))) + ], + ); + } +} diff --git a/lib/screens/widgets/custom_app_bar.dart b/lib/screens/widgets/custom_app_bar.dart new file mode 100644 index 0000000..8ace0e5 --- /dev/null +++ b/lib/screens/widgets/custom_app_bar.dart @@ -0,0 +1,37 @@ +import 'package:book_store_app/screens/home/home_screens.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:get/get.dart'; +import 'package:get/get_core/src/get_main.dart'; + +import 'my_bottom_nav_bar.dart'; + +class MyAppBar extends StatelessWidget with PreferredSizeWidget { + int selected; + MyAppBar({ + this.selected=0, + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return AppBar( + backgroundColor: Colors.transparent, + elevation: 0, + leading: IconButton(onPressed: (){ + Get.to(HomeScreen()); + MybottomNavBar.selected.value=selected; + },icon:const Icon(Icons.arrow_back_ios,color: Colors.black,size: 20,)), + actions: [ + Padding( + padding: const EdgeInsets.only(right: 16.0), + child: SvgPicture.asset("assets/icons/three-dots-vertical.svg",color: Colors.black,height: 20,width: 20,), + ) + ], + ); + } + + @override + Size get preferredSize => Size.fromHeight(kToolbarHeight); +} \ No newline at end of file diff --git a/lib/screens/widgets/my_bottom_nav_bar.dart b/lib/screens/widgets/my_bottom_nav_bar.dart new file mode 100644 index 0000000..7f0f96a --- /dev/null +++ b/lib/screens/widgets/my_bottom_nav_bar.dart @@ -0,0 +1,62 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:get/get.dart'; +import 'package:get/get_core/src/get_main.dart'; + +import '../add_book/add_book_screen.dart'; +import '../cart/cart_screen.dart'; +import '../home/home_screens.dart'; + +class MybottomNavBar extends StatelessWidget { + static RxInt selected=0.obs ; + MybottomNavBar({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Positioned( + bottom: 32, + left: 72, + right: 72, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(14), + color: Colors.white, + ), + child:Obx(()=> Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + IconButton( + onPressed: () { + Get.to(HomeScreen()); + selected.value=0; + }, + icon: SvgPicture.asset( + "assets/icons/home_icon.svg", + color:selected==0?Colors.black: Colors.grey, + )), + IconButton( + onPressed: () { + Get.to((CartScreen())); + selected.value=1; + }, + icon: Icon(Icons.shopping_cart_outlined), + color: selected==1?Colors.black: Colors.grey, + ), + IconButton( + onPressed: () { + Get.to(AddBook()); + selected.value=2; + }, + icon: Icon(Icons.add), + color: selected==2?Colors.black: Colors.grey, + ) + ], + ),) + ), + ); + } +} diff --git a/lib/screens/widgets/my_button.dart b/lib/screens/widgets/my_button.dart new file mode 100644 index 0000000..36c6f47 --- /dev/null +++ b/lib/screens/widgets/my_button.dart @@ -0,0 +1,48 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; + +class MyButton extends StatelessWidget { + double height; + double width; + String tex; + var icon; + Color bgColor; + Color texColor; + var myOnTap; + MyButton({ + Key? key, + this.myOnTap, + this.icon, + this.texColor = Colors.black, + this.bgColor = Colors.white, + required this.width, + required this.height, + required this.tex, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: myOnTap, + child: Container( + height: height, + width: width, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(height / 4), + color: bgColor, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + icon != null ? SvgPicture.asset(icon) : Container(), + SizedBox( + width: 16, + ), + Text(tex,style: TextStyle(color: texColor),), + ], + ), + ), + ); + } +} diff --git a/lib/screens/widgets/my_text_field.dart b/lib/screens/widgets/my_text_field.dart new file mode 100644 index 0000000..c21d856 --- /dev/null +++ b/lib/screens/widgets/my_text_field.dart @@ -0,0 +1,51 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class MyTextField extends StatelessWidget { + String hint; + var icon; + int maxLine; + TextEditingController controller; + MyTextField({ + required this.controller, + required this.maxLine, + this.icon, + required this.hint, + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: TextField( + controller: controller, + maxLines: maxLine, + textAlign: TextAlign.left, + keyboardType: TextInputType.text, + decoration: InputDecoration( + suffixIcon: icon != null + ? Icon( + icon, + color: Colors.grey, + ) + : Text(""), + hintText: hint, + hintStyle: TextStyle( + fontSize: 16, + ), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + borderSide: const BorderSide( + width: 0, + style: BorderStyle.none, + ), + ), + filled: true, + contentPadding: EdgeInsets.all(16), + fillColor: Colors.white, + ), + ), + ); + } +} diff --git a/lib/screens/widgets/start_rate.dart b/lib/screens/widgets/start_rate.dart new file mode 100644 index 0000000..6d4191b --- /dev/null +++ b/lib/screens/widgets/start_rate.dart @@ -0,0 +1,32 @@ + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class StartRate extends StatelessWidget { + const StartRate({ + Key? key, + required this.rate, + }) : super(key: key); + + final int rate; + + @override + Widget build(BuildContext context) { + return Row( + children: [ + for (int i=0; i0; i--) + const Icon( + Icons.star, + color: Colors.grey, + size: 14, + ), + ], + ); + } +} \ No newline at end of file diff --git a/lib/screens/widgets/title_text.dart b/lib/screens/widgets/title_text.dart new file mode 100644 index 0000000..ec9c3d2 --- /dev/null +++ b/lib/screens/widgets/title_text.dart @@ -0,0 +1,21 @@ + +import 'package:flutter/cupertino.dart'; + +class TitleText extends StatelessWidget { + String text; + TitleText({ + required this.text, + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 16.0), + child: Text( + text, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 24), + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 7bc8bdd..6d0e364 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -57,6 +57,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" + floating_bottom_navigation_bar: + dependency: "direct main" + description: + name: floating_bottom_navigation_bar + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" flutter: dependency: "direct main" description: flutter @@ -69,11 +76,25 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.4" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + get: + dependency: "direct main" + description: + name: get + url: "https://pub.dartlang.org" + source: hosted + version: "4.6.5" lints: dependency: transitive description: @@ -109,6 +130,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.1" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.0" sky_engine: dependency: transitive description: flutter @@ -163,5 +205,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.2" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.0" sdks: dart: ">=2.17.6 <3.0.0" + flutter: ">=2.11.0-0.1.pre" diff --git a/pubspec.yaml b/pubspec.yaml index cd0f457..0aebba8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -34,6 +34,9 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 + flutter_svg: ^1.1.4 + get: any + floating_bottom_navigation_bar: ^1.5.2 dev_dependencies: flutter_test: @@ -58,8 +61,9 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg + assets: + - assets/images/ + - assets/icons/ # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see