I have a flutter apllication. In my loging component, I want to separate bottom half of the UI into 4 parts as in the following image
So far, I have implemented upto the Login button. What I don't understand is how to seperate the rest of the UI as in the image. After separating, I should be able to add an image to each separated cell.
How can I achieve this? Thank you for your kind help!
My Implementation upto Login button:-
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bank_app/screens/AccountSummary.dart';
class Login extends StatelessWidget{
Widget _inputField(String title, Color border) {
return TextField(
decoration: InputDecoration(
hintText: title,
hintStyle: TextStyle(color: border),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: border),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: border),
),
border: UnderlineInputBorder(
borderSide: BorderSide(color: border),
),
),
);
}
Widget _buttons(name, BuildContext context){
return Center(
child: ButtonBar(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
ButtonTheme(
minWidth: 200,
child:RaisedButton(
child: new Text(name),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100),
side: BorderSide(color: Colors.white)
),
color: Colors.white,
textColor: Colors.red,
onPressed: (){Navigator.push(context, MaterialPageRoute(builder: (context) => AccountSummary()));},
)
),
],
)
);
}
@override
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
backgroundColor: Colors.red,
appBar: PreferredSize(
preferredSize: Size.fromHeight(150.0),
child: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Image.asset("assets/logo.png", fit: BoxFit.cover, ),
centerTitle: true,
),
),
body: Container(
margin: const EdgeInsets.only(top: 10),
padding: EdgeInsets.symmetric(horizontal: 20),
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: const EdgeInsets.only(left: 25, top: 50, right: 25),
child:_inputField('UserName', Colors.white),
),
Container(
margin: const EdgeInsets.only(left: 25, top: 10, right: 25),
child: _inputField('Password', Colors.white),
),
Container(
margin: const EdgeInsets.only( top: 15),
child: Text('Forgot Password?', style: TextStyle(color: Colors.white),),
),
Container(
margin: const EdgeInsets.only( top: 25),
child: _buttons('Login', context),
),
],
)
)
),
);
}
}