camera_recorder 1.0.0 camera_recorder: ^1.0.0 copied to clipboard
A package that uses a camera to record video and take pictures
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:camera_recorder/camera_recorder.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter EasyLoading',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: HomePage(),
builder: EasyLoading.init(),
);
}
}
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
State<HomePage> createState() => _SplashPageState();
}
class _SplashPageState extends State<HomePage> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Material(
color: Theme.of(context).canvasColor,
child: Center(
child: TextButton(
onPressed: () async {
final AssetEntity? result =
await CameraView.showCameraView(context);
},
child: Text('show camera')),
),
);
}
}