take_photo.dart 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import 'package:flutter/material.dart';
  2. import 'package:fun_selfie_app/widgets/home_button.dart';
  3. class TakePhotoPage extends StatefulWidget {
  4. const TakePhotoPage({Key? key}) : super(key: key);
  5. @override
  6. State<StatefulWidget> createState() => _TakePhotoPageState();
  7. }
  8. class _TakePhotoPageState extends State<TakePhotoPage> {
  9. @override
  10. Widget build(BuildContext context) {
  11. final screenSize = MediaQuery.of(context).size;
  12. return Scaffold(
  13. body: SizedBox(
  14. width: screenSize.width,
  15. height: screenSize.height,
  16. child: Stack(children: <Widget>[
  17. Container(
  18. color: Colors.black38,
  19. child: Align(
  20. child: SizedBox(
  21. width: 180,
  22. height: 60,
  23. child: ElevatedButton(
  24. child: const Text(
  25. '下一步',
  26. style: TextStyle(fontSize: 20),
  27. ),
  28. onPressed: () {
  29. Navigator.pushNamed(context, "/photo_over");
  30. },
  31. )))),
  32. const HomeButton()
  33. ]),
  34. ));
  35. }
  36. }