19 lines
433 B
Dart
19 lines
433 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class HeaderButton extends StatelessWidget {
|
|
final String buttonText;
|
|
final Widget page;
|
|
|
|
const HeaderButton(this.buttonText, this.page, {super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ElevatedButton(onPressed: (){
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(builder: (context) => page),
|
|
);
|
|
}, child: Text(buttonText));
|
|
}
|
|
}
|