Advertisement
AnoTest

mainCamera.dart

Jan 7th, 2022
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.50 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_application_1_story_camera/screens/camera_test.dart';
  3.  
  4. void main() {
  5.   runApp(const MyApp());
  6. }
  7.  
  8. class MyApp extends StatelessWidget {
  9.   const MyApp({Key? key}) : super(key: key);
  10.  
  11.   @override
  12.   Widget build(BuildContext context) {
  13.     return MaterialApp(
  14.       title: 'Flutter Demo',
  15.       debugShowCheckedModeBanner: false,
  16.       theme: ThemeData(
  17.         primarySwatch: Colors.blue,
  18.       ),
  19.       home: const MyHomePage(title: 'Flutter Demo Home Page'),
  20.     );
  21.   }
  22. }
  23.  
  24. class MyHomePage extends StatefulWidget {
  25.   const MyHomePage({Key? key, required this.title}) : super(key: key);
  26.   final String title;
  27.  
  28.   @override
  29.   State<MyHomePage> createState() => _MyHomePageState();
  30. }
  31.  
  32. class _MyHomePageState extends State<MyHomePage> {
  33.   @override
  34.   Widget build(BuildContext context) {
  35.     return Scaffold(
  36.       appBar: AppBar(
  37.         centerTitle: true,
  38.         title: Text(
  39.           'FootBall',
  40.         ),
  41.       ),
  42.       body: Center(
  43.         child: Column(
  44.           mainAxisAlignment: MainAxisAlignment.center,
  45.           children: [
  46.             ElevatedButton(
  47.                 onPressed: () {
  48.                   Navigator.push(
  49.                     context,
  50.                     MaterialPageRoute(
  51.                       builder: (context) => CameraTest(),
  52.                     ),
  53.                   );
  54.                 },
  55.                 child: Text('New picture/Video'))
  56.           ],
  57.         ),
  58.       ),
  59.     );
  60.   }
  61. }
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement