update layout builder
This commit is contained in:
@@ -28,17 +28,11 @@ class _MIHActionState extends State<MIHAction> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Positioned(
|
return IconButton(
|
||||||
top: 5,
|
iconSize: widget.iconSize,
|
||||||
left: 5,
|
padding: const EdgeInsets.all(0),
|
||||||
width: 50,
|
onPressed: widget.onTap,
|
||||||
height: 50,
|
icon: widget.icon,
|
||||||
child: IconButton(
|
|
||||||
iconSize: widget.iconSize,
|
|
||||||
padding: const EdgeInsets.all(0),
|
|
||||||
onPressed: widget.onTap,
|
|
||||||
icon: widget.icon,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class _MIHHeaderState extends State<MIHHeader> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 60,
|
height: 50,
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: widget.headerAlignment,
|
mainAxisAlignment: widget.headerAlignment,
|
||||||
|
|||||||
@@ -41,6 +41,24 @@ class _MIHLayoutBuilderState extends State<MIHLayoutBuilder> {
|
|||||||
// _scaffoldKey.currentState!.openEndDrawer();
|
// _scaffoldKey.currentState!.openEndDrawer();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
Widget getLayoutHeader() {
|
||||||
|
List<Widget> temp = [];
|
||||||
|
temp.add(widget.actionButton);
|
||||||
|
temp.add(Flexible(child: widget.header));
|
||||||
|
if (widget.secondaryActionButton != null) {
|
||||||
|
temp.add(widget.secondaryActionButton!);
|
||||||
|
} else {
|
||||||
|
temp.add(const SizedBox(
|
||||||
|
width: 50,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
return Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: temp,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
@@ -62,17 +80,11 @@ class _MIHLayoutBuilderState extends State<MIHLayoutBuilder> {
|
|||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: screenSize.width,
|
width: screenSize.width,
|
||||||
height: screenSize.height,
|
height: screenSize.height,
|
||||||
child: Stack(
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Builder(builder: (context) {
|
getLayoutHeader(),
|
||||||
return widget.actionButton;
|
Expanded(child: widget.body),
|
||||||
}),
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
widget.header,
|
|
||||||
Expanded(child: widget.body),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -231,7 +231,13 @@ class _RegisterState extends State<Register> {
|
|||||||
|
|
||||||
MIHAction getActionButton() {
|
MIHAction getActionButton() {
|
||||||
return MIHAction(
|
return MIHAction(
|
||||||
icon: Image.asset('images/logo_light.png'),
|
icon: Padding(
|
||||||
|
padding: const EdgeInsets.all(10.0),
|
||||||
|
child: SizedBox(
|
||||||
|
height: 50,
|
||||||
|
child: Image.asset('images/logo_light.png'),
|
||||||
|
),
|
||||||
|
),
|
||||||
iconSize: 35,
|
iconSize: 35,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
|
|||||||
@@ -258,7 +258,13 @@ class _ResetPasswordState extends State<ResetPassword> {
|
|||||||
|
|
||||||
MIHAction getActionButton() {
|
MIHAction getActionButton() {
|
||||||
return MIHAction(
|
return MIHAction(
|
||||||
icon: Image.asset('images/logo_light.png'),
|
icon: Padding(
|
||||||
|
padding: const EdgeInsets.all(10.0),
|
||||||
|
child: SizedBox(
|
||||||
|
height: 50,
|
||||||
|
child: Image.asset('images/logo_light.png'),
|
||||||
|
),
|
||||||
|
),
|
||||||
iconSize: 35,
|
iconSize: 35,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// Navigator.of(context).pushNamed(
|
// Navigator.of(context).pushNamed(
|
||||||
|
|||||||
@@ -262,7 +262,13 @@ class _SignInState extends State<SignIn> {
|
|||||||
|
|
||||||
MIHAction getActionButton() {
|
MIHAction getActionButton() {
|
||||||
return MIHAction(
|
return MIHAction(
|
||||||
icon: Image.asset('images/logo_light.png'),
|
icon: Padding(
|
||||||
|
padding: const EdgeInsets.all(10.0),
|
||||||
|
child: SizedBox(
|
||||||
|
height: 50,
|
||||||
|
child: Image.asset('images/logo_light.png'),
|
||||||
|
),
|
||||||
|
),
|
||||||
iconSize: 35,
|
iconSize: 35,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
|
|||||||
Reference in New Issue
Block a user