flutter_draw
flutter_draw copied to clipboard
A beautiful drawing view for a your flutter application with single line of code
Flutter Draw
A beautiful drawing view for a your flutter application with single line of code.
To start with this, we need to simply add the dependencies in the gradle file of our app module like this
Don't forget to star ⭐ the repo it motivates me to share more open source
Installation
First, add flutter_draw:
as a dependency in your pubspec.yaml file.
Import
import 'package:flutter_draw/flutter_draw.dart';
iOS
Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist
:
-
NSPhotoLibraryUsageDescription
- describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor. -
NSCameraUsageDescription
- describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor. -
NSMicrophoneUsageDescription
- describe why your app needs access to the microphone, if you intend to record videos. This is called Privacy - Microphone Usage Description in the visual editor.
Or in text format add the key:
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSCameraUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSMicrophoneUsageDescription</key>
<string>Used to capture audio for image picker plugin</string>
Android
No configuration required - the plugin should work out of the box.
Add this function to Your StateFull Widget Check the Example
File _drawImage;
Future<void> getDrawing() {
final getDraw = Navigator.push(context, MaterialPageRoute(
builder: (context){
return HomePage();
}
)).then((getDraw){
if(getDraw != null){
setState(() {
_drawImage = getDraw;
});
}
}).catchError((er){print(er);});
}
Developed & Maintained By
Sanskar Tiwari (@theindianappguy) (YouTube)
License
Copyright 2020 Sanskar Tiwari
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Special Thanks
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.