Skip to content

Commit

Permalink
Init product screen skelaton
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-Amin committed Aug 2, 2019
1 parent 2ead8a2 commit 7c7adfc
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/screens/product/product_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'package:flutter/material.dart';
import 'package:shoptronics/screens/product/widgets/widgets.dart';

class ProductScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: ProductScreenAppBar(
height: MediaQuery.of(context).size.height,
),
body: ListView(
physics: BouncingScrollPhysics(),
children: <Widget>[
// ImagePageView(),
// ProductInfo(),
],
),
);
}
}
Empty file.
29 changes: 29 additions & 0 deletions lib/screens/product/widgets/product_appbar/product_appbar.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
import 'package:shoptronics/common/cart_icon.dart';
import 'package:shoptronics/common/common.dart';

class ProductScreenAppBar extends StatelessWidget
implements PreferredSizeWidget {
final num height;
ProductScreenAppBar({Key key, @required this.height}) : super(key: key);

@override
Size get preferredSize => Size.fromHeight(height * 0.28);

@override
Widget build(BuildContext context) {
return AppBar(
elevation: 0,
leading: Padding(
padding: const EdgeInsets.only(left: 16.0, top: 16.0),
child: BackIcon(),
),
actions: <Widget>[
Padding(
padding: const EdgeInsets.only(right: 8.0, top: 16.0),
child: CartIcon(),
),
],
);
}
}
Empty file.
3 changes: 3 additions & 0 deletions lib/screens/product/widgets/widgets.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export 'image_page_view/image_page_view.dart';
export 'product_appbar/product_appbar.dart';
export 'product_info/product_info.dart';
1 change: 1 addition & 0 deletions lib/screens/screens.dart
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export 'home/home_screen.dart';
export 'product/product_screen.dart';

0 comments on commit 7c7adfc

Please sign in to comment.