diff --git a/emma/lib/main.dart b/emma/lib/main.dart index e630061..7dd9edd 100644 --- a/emma/lib/main.dart +++ b/emma/lib/main.dart @@ -188,7 +188,7 @@ class _MyFormPageState extends State { } } -/*class TypePage extends StatelessWidget { +class TypePage extends StatelessWidget { const TypePage({Key? key, required this.title}) : super(key: key); final String title; @override @@ -198,30 +198,146 @@ class _MyFormPageState extends State { title: Text("Type"), ), body: Center( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - TextButton( - onPressed: () { - Navigator.pop(context); - }, - child: const Text('Go Back'), + child: + Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [ + Expanded( + child: Row( + children: [ + SizedBox( + height: 100, //height of button + width: (MediaQuery.of(context).size.width - 30) / + 3, //width of button + child: ElevatedButton( + style: ElevatedButton.styleFrom( + elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + ), + child: Text('Essen'), + onPressed: () { + Navigator.push(context, + MaterialPageRoute(builder: (context) { + return CategoriePage(); + })); + }, + ), + ), + SizedBox( + height: 100, //height of button + width: (MediaQuery.of(context).size.width - 30) / + 3, //width of button + child: ElevatedButton( + style: ElevatedButton.styleFrom( + elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + ), + child: Text('Party'), + onPressed: () { + Navigator.push(context, + MaterialPageRoute(builder: (context) { + return CategoriePage(); + })); + }, + ), + ), + SizedBox( + height: 100, //height of button + width: (MediaQuery.of(context).size.width - 30) / + 3, //width of button + child: ElevatedButton( + style: ElevatedButton.styleFrom( + elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + ), + child: Text('Sport'), + onPressed: () { + Navigator.push(context, + MaterialPageRoute(builder: (context) { + return CategoriePage(); + })); + }, + ), + ), + ], ), - ElevatedButton( - child: Text('Go to About Page'), - onPressed: () { - Navigator.push(context, MaterialPageRoute(builder: (context) { - return CategoriePage(); - })); - }, + ), + Expanded( + child: Row( + children: [ + SizedBox( + height: 100, //height of button + width: (MediaQuery.of(context).size.width - 30) / + 3, //width of button + child: ElevatedButton( + style: ElevatedButton.styleFrom( + elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + ), + child: Text('Musik'), + onPressed: () { + Navigator.push(context, + MaterialPageRoute(builder: (context) { + return CategoriePage(); + })); + }, + ), + ), + SizedBox( + height: 100, //height of button + width: (MediaQuery.of(context).size.width - 30) / + 3, //width of button + child: ElevatedButton( + style: ElevatedButton.styleFrom( + elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + ), + child: Text('Kunst'), + onPressed: () { + Navigator.push(context, + MaterialPageRoute(builder: (context) { + return CategoriePage(); + })); + }, + ), + ), + SizedBox( + height: 100, //height of button + width: (MediaQuery.of(context).size.width - 30) / + 3, //width of button + child: ElevatedButton( + style: ElevatedButton.styleFrom( + elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + ), + child: Text('Sozial'), + onPressed: () { + Navigator.push(context, + MaterialPageRoute(builder: (context) { + return CategoriePage(); + })); + }, + ), + ), + ], ), - ], - ), + ), + ]), ), ); } -}*/ -class TypePage extends StatelessWidget { +} +/*class TypePage extends StatelessWidget { TypePage({Key? key, required this.title}) : super(key: key); final String title; final List myProducts = @@ -260,7 +376,7 @@ class TypePage extends StatelessWidget { ), ); } -} +}*/ class CategoriePage extends StatelessWidget { @override