4
2
Fork 0

Closes #2 - implemented app structure

pull/31/head
Sudharshan S. 2019-02-08 13:46:58 +08:00
parent 0cf06d7bc6
commit 090e36201b
Signed by: sudharshan
GPG Key ID: C861C97AAF3D9559
6 changed files with 25 additions and 18 deletions

View File

@ -1,14 +1,5 @@
import 'package:flutter/material.dart';
import './appbar.dart';
import 'routes.dart';
void main() => runApp(BeepApp());
class BeepApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(children: <Widget>[
AppBar("BeepApp"),
Container(child: Text("Hello World"))
]);
}
void main() {
Routes();
}

View File

@ -0,0 +1,16 @@
import 'package:flutter/material.dart';
import 'screens/home/index.dart';
class Routes {
final routes = <String, WidgetBuilder>{
'/home': (BuildContext context) => Home()
};
Routes() {
runApp(MaterialApp(
title: "Beep",
routes: routes,
home: Home(),
));
}
}

View File

@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
import 'package:frontend_flutter/widgets/app_bar/index.dart';
import 'package:frontend_flutter/widgets/top_bar/index.dart';
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(children: <Widget>[
AppBar("BeepApp"),
TopBar("BeepApp"),
Container(child: Text("Hello World"))
]);
}

View File

@ -1 +0,0 @@
export 'app_bar.dart';

View File

@ -0,0 +1 @@
export 'top_bar.dart';

View File

@ -1,10 +1,10 @@
import "package:flutter/material.dart";
class AppBar extends StatelessWidget {
class TopBar extends StatelessWidget {
final String title;
final double barHeight = 5.0;
final double barHeight = 40.0;
AppBar(title) : title = title;
TopBar(title) : title = title;
@override
Widget build(BuildContext context) {