pages/home_page.dart
unknown
dart
a month ago
1.1 kB
1
Indexable
Never
import 'package:flutter/material.dart'; import 'routines_page.dart'; import 'add_exercise_page.dart'; class HomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Fitness App'), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ ElevatedButton( onPressed: () { Navigator.push( context, MaterialPageRoute(builder: (context) => RoutinesPage()), ); }, child: Text('View Routines'), ), ElevatedButton( onPressed: () { Navigator.push( context, MaterialPageRoute(builder: (context) => AddExercisePage()), ); }, child: Text('Add Exercise'), ), ], ), ), ); } }
Leave a Comment