Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- void main() => runApp(App());
- class App extends StatelessWidget {
- // This widget is the root of your application.
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- title: 'Flutter Demo',
- theme: ThemeData(
- // This is the theme of your application.
- //
- // Try running your application with "flutter run". You'll see the
- // application has a blue toolbar. Then, without quitting the app, try
- // changing the primarySwatch below to Colors.green and then invoke
- // "hot reload" (press "r" in the console where you ran "flutter run",
- // or simply save your changes to "hot reload" in a Flutter IDE).
- // Notice that the counter didn't reset back to zero; the application
- // is not restarted,
- ),
- home: HomePage(title: 'Wo ist mein Lehrer?'),
- );
- }
- }
- class HomePage extends StatefulWidget {
- HomePage({Key key, this.title}) : super(key: key);
- final String title;
- @override
- _HomePageState createState() => _HomePageState();
- }
- class _HomePageState extends State<HomePage> {
- @override
- Widget build(BuildContext context) {
- return new MaterialApp(
- home: new Scaffold(
- backgroundColor: Colors.white,
- body: new Column(
- children: [
- new Flexible(
- child: new SizedBox(
- height: 175,
- child: new Container(
- child: new SizedBox(
- width: MediaQuery.of(context).size.width,
- child : Center(child: Text('Wo ist mein Lehrer?', style: TextStyle(fontSize: 30.0))),
- ),
- decoration: new BoxDecoration(
- color: Colors.red,
- borderRadius: new BorderRadius.only(
- bottomLeft: const Radius.circular(20.0),
- bottomRight: const Radius.circular(20.0))),
- ),
- ),
- ),
- new SizedBox(height: 25),
- new Column(
- children: [
- new Container(
- child: Center(child: Text('LoJ entfällt: 1. - 12.')),
- width: MediaQuery.of(context).size.width,
- height: 75,
- decoration: BoxDecoration(color: Colors.grey[600],borderRadius: BorderRadius.only(topLeft: const Radius.circular(15.0), topRight: const Radius.circular(15.0), bottomLeft: const Radius.circular(15.0), bottomRight: const Radius.circular(15.0))),
- ),
- ]
- ),
- ]
- ),
- bottomNavigationBar: new BottomAppBar(
- color: Colors.grey[600],
- shape: const CircularNotchedRectangle(),
- child: Container(height: 50.0),
- ),
- floatingActionButton: FloatingActionButton(
- child: Icon(Icons.assignment_ind),
- backgroundColor: Colors. red,
- onPressed: () => {
- Navigator.push(context, MaterialPageRoute(builder: (context) => ProfileInfo()),),
- }
- ),
- floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
- ),
- );
- }
- }
- class ProfileInfo extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return new Scaffold(
- body: new Container(
- color: Colors.black,
- width: MediaQuery.of(context).size.width,
- height: MediaQuery.of(context).size.height-200,
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement