This file contains hidden or 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
| final size = MediaQuery.of(context).size; | |
| final deviceRatio = size.width / size.height; | |
| final xScale = cameraController.value.aspectRatio / deviceRatio; | |
| // Modify the yScale if you are in Landscape | |
| final yScale = 1; | |
| return Container( | |
| child: AspectRatio( | |
| aspectRatio: deviceRatio, |
This file contains hidden or 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
| apt-get install make git g++ gcc zlib1g zlib1g-dev libxml2 libxml2-dev -y | |
| # https://developers.google.com/speed/webp/docs/compiling#building | |
| cd /usr/local/src | |
| wget http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz | |
| tar -xvzf libwebp-0.4.3.tar.gz | |
| cd libwebp-0.4.3 | |
| ./configure |
This file contains hidden or 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 { useState } from 'react'; | |
| const [missions, setMissions] = useState([{ task: 'Create another task!', done: false }]); | |
| /** | |
| * Add mission to the missions state and modify the first one to be done. | |
| */ | |
| const inputChanged = ev => { | |
| if (ev.key === 'Enter' && ev.target.value.length > 0) { | |
| const value = ev.target.value; |