We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the example app is crashed when building.
Flutter SDK version 3.22.2 custom_image_crop: ^0.0.13
the entire code:
import 'dart:math'; import 'package:custom_image_crop/custom_image_crop.dart'; import 'package:flutter/material.dart'; void main() => runApp(MyHomePage( title: 'test', )); class MyHomePage extends StatefulWidget { final String title; MyHomePage({ required this.title, Key? key, }) : super(key: key); @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { late CustomImageCropController controller; @override void initState() { super.initState(); controller = CustomImageCropController(); } @override void dispose() { controller.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Column( children: [ Expanded( child: CustomImageCrop( cropController: controller, image: const AssetImage( 'assets/test.png'), // Any Imageprovider will work, try with a NetworkImage for example... ), ), Row( children: [ IconButton( icon: const Icon(Icons.refresh), onPressed: controller.reset), IconButton( icon: const Icon(Icons.zoom_in), onPressed: () => controller.addTransition(CropImageData(scale: 1.33))), IconButton( icon: const Icon(Icons.zoom_out), onPressed: () => controller.addTransition(CropImageData(scale: 0.75))), IconButton( icon: const Icon(Icons.rotate_left), onPressed: () => controller .addTransition(CropImageData(angle: -pi / 4))), IconButton( icon: const Icon(Icons.rotate_right), onPressed: () => controller.addTransition(CropImageData(angle: pi / 4))), IconButton( icon: const Icon(Icons.crop), onPressed: () async { final image = await controller.onCropImage(); if (image != null) { showDialog( context: context, builder: (_) => Image(image: image)); } }, ), ], ), SizedBox(height: MediaQuery.of(context).padding.bottom), ], ), ), ); } }
The text was updated successfully, but these errors were encountered:
Running on M1 pro and iPhone 15 Emulator
Sorry, something went wrong.
No branches or pull requests
the example app is crashed when building.
Flutter SDK version 3.22.2
custom_image_crop: ^0.0.13
the entire code:
The text was updated successfully, but these errors were encountered: