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'; ...@@ -7,148 +7,153 @@ import 'package:flutter/material.dart';
class I_guider extends StatelessWidget { class I_guider extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final mesure = MediaQuery.of(context);
return Scaffold( return Scaffold(
backgroundColor: Colors.grey[200], backgroundColor: Colors.white,
appBar: AppBar( appBar: AppBar(
centerTitle: true,
title: Text('I-Guider'), title: Text('I-Guider'),
// elevation: 0, // elevation: 0,
), ),
body: Column( body: SingleChildScrollView(
children: [ child: Column(
Row( children: [
children: [ Row(
Expanded( children: [
child: Container( Expanded(
decoration: BoxDecoration( child: Container(
image: DecorationImage( height: mesure.size.height/3,
image: AssetImage('lib/assets/images/hero.gif'), decoration: BoxDecoration(
fit: BoxFit.cover)), image: DecorationImage(
height: 300, image: AssetImage('lib/assets/images/hero.gif'),
fit: BoxFit.cover)),
),
), ),
), ],
], ),
), //------------------------------------
//------------------------------------
SizedBox( SizedBox(
height: 50, height: 50,
), ),
Row( Row(
children: [ children: [
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0), padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
child: ButtonTheme( child: ButtonTheme(
minWidth: 100.0, minWidth: 100.0,
height: 150.0, height: 150.0,
child: RaisedButton.icon( child: RaisedButton.icon(
icon: Icon( icon: Icon(
Icons.bluetooth_audio_rounded, Icons.bluetooth_audio_rounded,
size: 40, size: 40,
color: Colors.white, 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(
Expanded( child: Padding(
child: Padding( padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0), child: ButtonTheme(
child: ButtonTheme( minWidth: 100.0,
minWidth: 100.0, height: 150.0,
height: 150.0, child: RaisedButton.icon(
child: RaisedButton.icon( color: Colors.greenAccent,
color: Colors.greenAccent, icon: Icon(
icon: Icon( Icons.face_unlock_sharp,
Icons.face_unlock_sharp, size: 60,
size: 60, color: Colors.white,
color: Colors.white, ),
), label: Text(
label: Text( '',
'', style: TextStyle(fontWeight: FontWeight.bold),
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),
SizedBox(height: 30), Row(
Row( children: [
children: [ Expanded(
Expanded( child: Padding(
child: Padding( padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0), child: ButtonTheme(
child: ButtonTheme( minWidth: 100.0,
minWidth: 100.0, height: 150.0,
height: 150.0, child: RaisedButton.icon(
child: RaisedButton.icon( icon: Icon(
icon: Icon( Icons.view_stream_outlined,
Icons.view_stream_outlined, size: 40,
size: 40, color: Colors.white,
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(
Expanded( child: Padding(
child: Padding( padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0), child: ButtonTheme(
child: ButtonTheme( minWidth: 100.0,
minWidth: 100.0, height: 150.0,
height: 150.0, child: RaisedButton.icon(
child: RaisedButton.icon( color: Colors.purple[200],
color: Colors.purple[200], icon: Icon(
icon: Icon( Icons.online_prediction_sharp,
Icons.online_prediction_sharp, size: 60,
size: 60, color: Colors.white,
color: Colors.white, ),
), label: Text(
label: Text( '',
'', style: TextStyle(fontWeight: FontWeight.bold),
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