Commit 89e16a8b authored by wonko's avatar wonko

Sponsoren-page mit logos

parent ee91f8f2
......@@ -4,6 +4,7 @@ import 'tours.dart';
import 'campus.dart';
import 'schedule.dart';
import 'data.dart';
import 'sponsors.dart';
void main() => runApp(MyApp());
......@@ -18,6 +19,10 @@ class MyApp extends StatelessWidget {
//brightness: Brightness.dark,
),
home: NoSHomePage(title: 'Night of Science'),
initialRoute: '/',
routes: {
'/second': (context) => Sponsors(),
},
);
}
}
......@@ -67,13 +72,8 @@ class _NoSHomePageState extends State<NoSHomePage> {
ListTile(
title: Text('Sponsoren'),
onTap: () {
Navigator.pop(context);
},
),
ListTile(
title: Text('Item 2'),
onTap: () {
Navigator.pop(context);
Navigator.pushNamed(context, '/second');
//Navigator.pop(context);
},
),
],
......
import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show rootBundle;
class Sponsors extends StatelessWidget {
static const List<String> sponsors = <String>[
'aventis-foundation.jpg',
"biotest.jpg",
"celanese.png",
"deutschebahn.png",
"freunde-der-uni.jpg",
"heraeus.png",
"hertie-stiftung.jpg",
"kuraray.png",
"lyondellbasell.png",
"newenglandbiolabs.png",
"oswaltstiftung.png",
"sanofi.png",
"schott.png",
"spardabank.png",
"vetter.png",
];
List<Widget> logos() {
List<Widget> logos = [];
for (String image in sponsors) {
logos.add(Image.asset('assets/graphics/sponsors/${image}'));
}
return logos;
}
@override
Widget build(BuildContext context) {
print(rootBundle);
return Scaffold(
appBar: AppBar(
title: Text('Sponsoren'),
),
body: GridView.count(
primary: false,
padding: const EdgeInsets.all(20.0),
crossAxisSpacing: 10.0,
crossAxisCount: 2,
children: logos()),
);
}
}
......@@ -48,6 +48,7 @@ flutter:
- assets/data/
- assets/graphics/davinci_bg.png
- assets/graphics/lageplan.png
- assets/graphics/sponsors/
# To add assets to your application, add an assets section, like this:
......
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