Last active
August 30, 2021 07:47
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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