Skip to content
Snippets Groups Projects
Commit 46058d6d authored by Thi Huyen Trang Nguyen's avatar Thi Huyen Trang Nguyen
Browse files

KAT-50: Deleted the unnecessary import and reformated in main.dart

parent ea3fa796
No related branches found
No related tags found
Loading
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:rescueapp/Ambulatory.dart'; import 'package:rescueapp/Ambulatory.dart';
import 'package:rescueapp/SpontaneousBreathingPresent.dart';
void main() { void main() {
runApp(MyApp()); runApp(MyApp());
...@@ -14,15 +11,16 @@ class MyApp extends StatelessWidget { ...@@ -14,15 +11,16 @@ class MyApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MaterialApp( return MaterialApp(
title: 'KatApp', title: 'KatApp',
theme: ThemeData( theme: ThemeData(
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
), ),
home: MyHomePage() home: MyHomePage()
//home: MyHomePage(title: 'KatApp Home Page'), //home: MyHomePage(title: 'KatApp Home Page'),
); );
} }
} }
class MyHomePage extends StatelessWidget { class MyHomePage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -30,45 +28,49 @@ class MyHomePage extends StatelessWidget { ...@@ -30,45 +28,49 @@ class MyHomePage extends StatelessWidget {
appBar: AppBar( appBar: AppBar(
title: Text('KatApp Hompage'), title: Text('KatApp Hompage'),
), ),
body: Center(
body: Center(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 250, height: 250,
), ),
SizedBox( SizedBox(
width: 200, width: 200,
height: 50, height: 50,
child: Container ( child: Container(
child: RaisedButton( child: RaisedButton(
child: Text('ÜBUNG', style: TextStyle(fontSize: 22, color: Colors.white,)), child: Text('ÜBUNG',
style: TextStyle(
fontSize: 22,
color: Colors.white,
)),
color: Colors.green, color: Colors.green,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Ambulatory()),
);
},
))
),
SizedBox (
height: 20,
),
SizedBox (
width: 200,
height: 50,
child: Container (
child: RaisedButton(
child: Text('REAL',style: TextStyle(fontSize: 22, color: Colors.white)),
color: Colors.red,
onPressed: () { onPressed: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute(builder: (context) => MyHomePage()), MaterialPageRoute(builder: (context) => Ambulatory()),
);} );
) ),), },
], ))),
SizedBox(
height: 20,
),
SizedBox(
width: 200,
height: 50,
child: Container(
child: RaisedButton(
child: Text('REAL',
style: TextStyle(fontSize: 22, color: Colors.white)),
color: Colors.red,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => MyHomePage()),
);
})),
),
],
), ),
), ),
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment