In this tutorial we will be discussing drag and drop items. First, we will create a new folder. Right click on the ‘ drag_and_drop ’ folder, new /Directory . Enter the directory name, in my case I used ‘images’ , look up the image that you want to use. Copy the image and paste it on the folder. Go to ‘ pubspec.yalm ’ under the comment section write ‘ assets:’ a dash and the name of the folder in my case it’s called ‘images’ then the name of the image. (example below) After doing this we will now begin to work on the draggable item. Draggable is a class and it has a widget that can be dragged. In the main we will execute MyApp , which is a class that returns a MaterialApp and the part that we will be working on is the ‘body’ the body calls the ‘App( )’ . Creating the Dragbox…Our dragbox will have three variables: the initial position, a label and a color. And the constructor. The App( ) class and the AppState( ) class… T...
Welcome to this simple Flutter tutorial for navigating between multiple pages, or routing. This tutorial was made as a class assignment and since we are exploring Flutter for our class project, we decided to do a simple tutorial to help others learn a bit more about it. This was created using Tensor Programming’s video Tensor Programming's Video and adapted as a small tutorial you see here by me, Carmelo González, and my class partner Zuleyka González. In flutter, when we want to cycle through different pages we have to create routes. These are classes that belong to the Navigation family ( More info here ) and we can invoke when we trigger an action, for example onPressed when we use Buttons. The Navigators works in stacks, you push a page when you want to access one and pop when you wish to return to a previous one. Let’s write a simple code to check this out. (In Android a route is equivalent to an activity , in iOS its equivale...