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

gpu_image for Flutter

example/lib/main.dart

import 'package:flutter/material.dart';

import 'camera_page.dart';

void main() {
  runApp(MyApp());
}

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

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

class IndexPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("GpuImage"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text("手动到设置中开启相机、相册权限,并重启。\n插件不支持主动开启权限,可以使用使用其他权限插件开启权限"),
            MaterialButton(
              color: Colors.blue,
              textColor: Colors.white,
              child: const Text('相机'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => CameraPage(),
                  ),
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}
3
likes
110
pub points
25%
popularity

Publisher

unverified uploader

gpu_image for Flutter

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on gpu_image