box_in_camera 1.0.0 copy "box_in_camera: ^1.0.0" to clipboard
box_in_camera: ^1.0.0 copied to clipboard

discontinued
PlatformAndroidiOS

A new flutter plugin project.

example/lib/main.dart

import 'dart:async';
import 'dart:typed_data';

import 'package:box_in_camera/box_in_camera.dart';
import 'package:flutter/material.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await BoxInCamera.initialize();
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(debugShowCheckedModeBanner: false, home: HomePage());
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return BoxInCamera(
      visiblePopButton: false,
      onTake: (Uint8List imageBytes) => showModalBottomSheet(
        context: context,
        backgroundColor: Colors.transparent,
        builder: (context) => Container(
          padding: EdgeInsets.symmetric(vertical: 6.0, horizontal: 14.0),
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.only(
              topLeft: Radius.circular(14.0),
              topRight: Radius.circular(14.0),
            ),
          ),
          child: Column(
            children: [
              Text(
                "Croped Image",
                style: TextStyle(
                  fontSize: 22.0,
                  fontWeight: FontWeight.w600,
                ),
              ),
              SizedBox(height: 4.0),
              SizedBox(
                width: double.infinity,
                child: Image.memory(imageBytes),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
2
likes
95
points
17
downloads

Publisher

unverified uploader

Weekly Downloads

A new flutter plugin project.

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

camera, dotted_border, flutter, image

More

Packages that depend on box_in_camera

Packages that implement box_in_camera