Commit a869be02 authored by Indika NK's avatar Indika NK

Adjusted some renderflex errors

parent 4df3ba21
......@@ -7,148 +7,153 @@ import 'package:flutter/material.dart';
class I_guider extends StatelessWidget {
@override
Widget build(BuildContext context) {
final mesure = MediaQuery.of(context);
return Scaffold(
backgroundColor: Colors.grey[200],
backgroundColor: Colors.white,
appBar: AppBar(
centerTitle: true,
title: Text('I-Guider'),
// elevation: 0,
),
body: Column(
children: [
Row(
children: [
Expanded(
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('lib/assets/images/hero.gif'),
fit: BoxFit.cover)),
height: 300,
body: SingleChildScrollView(
child: Column(
children: [
Row(
children: [
Expanded(
child: Container(
height: mesure.size.height/3,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('lib/assets/images/hero.gif'),
fit: BoxFit.cover)),
),
),
),
],
),
//------------------------------------
],
),
//------------------------------------
SizedBox(
height: 50,
),
SizedBox(
height: 50,
),
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: ButtonTheme(
minWidth: 100.0,
height: 150.0,
child: RaisedButton.icon(
icon: Icon(
Icons.bluetooth_audio_rounded,
size: 40,
color: Colors.white,
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: ButtonTheme(
minWidth: 100.0,
height: 150.0,
child: RaisedButton.icon(
icon: Icon(
Icons.bluetooth_audio_rounded,
size: 40,
color: Colors.white,
),
label: Text('',
style: TextStyle(fontWeight: FontWeight.bold)),
onPressed: () {},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
color: Colors.blue[200],
),
label: Text('',
style: TextStyle(fontWeight: FontWeight.bold)),
onPressed: () {},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
color: Colors.blue[200],
),
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: ButtonTheme(
minWidth: 100.0,
height: 150.0,
child: RaisedButton.icon(
color: Colors.greenAccent,
icon: Icon(
Icons.face_unlock_sharp,
size: 60,
color: Colors.white,
),
label: Text(
'',
style: TextStyle(fontWeight: FontWeight.bold),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: ButtonTheme(
minWidth: 100.0,
height: 150.0,
child: RaisedButton.icon(
color: Colors.greenAccent,
icon: Icon(
Icons.face_unlock_sharp,
size: 60,
color: Colors.white,
),
label: Text(
'',
style: TextStyle(fontWeight: FontWeight.bold),
),
onPressed: () {
print('face mask detection');
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => invoker())
);
// Navigator.pushNamed(context, '/invoker');
},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
),
onPressed: () {
print('face mask detection');
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => invoker())
);
// Navigator.pushNamed(context, '/invoker');
},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
),
),
),
)
],
),
SizedBox(height: 30),
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: ButtonTheme(
minWidth: 100.0,
height: 150.0,
child: RaisedButton.icon(
icon: Icon(
Icons.view_stream_outlined,
size: 40,
color: Colors.white,
)
],
),
SizedBox(height: 30),
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: ButtonTheme(
minWidth: 100.0,
height: 150.0,
child: RaisedButton.icon(
icon: Icon(
Icons.view_stream_outlined,
size: 40,
color: Colors.white,
),
label: Text('',
style: TextStyle(fontWeight: FontWeight.bold)),
onPressed: () {
// action when button is pressed route to heart rate measurer
Navigator.push(context, MaterialPageRoute(builder: (context) => HeartRateScreen() ));
},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
color: Colors.redAccent,
),
label: Text('',
style: TextStyle(fontWeight: FontWeight.bold)),
onPressed: () {
// action when button is pressed route to heart rate measurer
Navigator.push(context, MaterialPageRoute(builder: (context) => HeartRateScreen() ));
},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
color: Colors.redAccent,
),
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: ButtonTheme(
minWidth: 100.0,
height: 150.0,
child: RaisedButton.icon(
color: Colors.purple[200],
icon: Icon(
Icons.online_prediction_sharp,
size: 60,
color: Colors.white,
),
label: Text(
'',
style: TextStyle(fontWeight: FontWeight.bold),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: ButtonTheme(
minWidth: 100.0,
height: 150.0,
child: RaisedButton.icon(
color: Colors.purple[200],
icon: Icon(
Icons.online_prediction_sharp,
size: 60,
color: Colors.white,
),
label: Text(
'',
style: TextStyle(fontWeight: FontWeight.bold),
),
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context)=> SC_main()));
},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
),
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context)=> SC_main()));
},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
),
),
),
)
],
),
],
)
],
),
],
),
),
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment