Skip to content

Instantly share code, notes, and snippets.

@Wizpna
Last active August 30, 2021 07:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wizpna/1217c9002789a75ac6c6f1370f6cd03a to your computer and use it in GitHub Desktop.
Save Wizpna/1217c9002789a75ac6c6f1370f6cd03a to your computer and use it in GitHub Desktop.
How I Built a Photo Editing App with 80 lines of code using Flutter and IMG.LY
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
import 'package:imgly_sdk/imgly_sdk.dart';
import 'package:photo_editor_sdk/photo_editor_sdk.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: Scaffold(
appBar: AppBar(
title: const Text('PhotoEditor SDK Example'),
centerTitle: true,
),
body: GestureDetector(
onTap: ()=> imgFromGallery(),
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [Text("Click to open photo editor"), Icon(Icons.edit)],
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment