remove the custom scaffold
parent
e20e90c20c
commit
bb96201c2e
@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class IconWithBg extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final Color color;
|
||||
final Function onPress;
|
||||
|
||||
const IconWithBg({Key key, this.icon, this.color, this.onPress})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(left: 25),
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[300],
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
child: IconButton(
|
||||
icon: Icon(icon),
|
||||
color: color,
|
||||
onPressed: () async {
|
||||
onPress();
|
||||
},
|
||||
));
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
|
||||
import '../cart-order-page.dart';
|
||||
import 'CustomIcon.dart';
|
||||
|
||||
class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
IconWithBg(
|
||||
icon: Icons.arrow_back_ios,
|
||||
color: Colors.grey,
|
||||
onPress: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
IconWithBg(
|
||||
icon: Icons.shopping_cart,
|
||||
color: Colors.grey,
|
||||
onPress: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => CartOrderPage()),
|
||||
);
|
||||
}),
|
||||
IconWithBg(
|
||||
icon: FontAwesomeIcons.ellipsisV,
|
||||
color: Colors.grey,
|
||||
onPress: () {
|
||||
//TODO Elham*
|
||||
// settingModalBottomSheet(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
// TODO: implement preferredSize
|
||||
@override
|
||||
Size get preferredSize => Size(double.maxFinite, 50);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue