gecko/lib/widgets/commons/next_button.dart

41 lines
1.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:gecko/globals.dart';
import 'package:gecko/models/widgets_keys.dart';
import 'package:gecko/widgets/commons/fader_transition.dart';
class NextButton extends StatelessWidget {
const NextButton({
Key? key,
required this.text,
required this.nextScreen,
required this.isFast,
}) : super(key: key);
final String text;
final Widget nextScreen;
final bool isFast;
@override
Widget build(BuildContext context) {
return SizedBox(
width: 370,
height: 60,
child: ElevatedButton(
key: keyGoNext,
style: ElevatedButton.styleFrom(
foregroundColor: Colors.white, backgroundColor: orangeC,
elevation: 4, // foreground
),
onPressed: () {
Navigator.push(
context, FaderTransition(page: nextScreen, isFast: isFast));
},
child: Text(
text,
style: const TextStyle(fontSize: 23, fontWeight: FontWeight.w600),
),
),
);
}
}